Txt2dat: Difference between revisions

From LDraw.org Wiki
Jump to navigation Jump to search
(Created page with "{{Software |name=txt2dat |image=CMD icon.png |developer=Ross Crawford |function=Pattern creator |version=0.2.3 |platform=Microsoft Windows, Mac OS, Linux |license=GNU GPL 2.0 ...")
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:txt2dat}}
{{Software
{{Software
|name=txt2dat
|title            = txt2dat
|image=CMD icon.png
|logo            = {{software/logo|CMD icon.png}}
|developer=Ross Crawford
|developer       = Ross Crawford
|function=Pattern creator
|version         = 0.2.3
|version=0.2.3
|operating system = Microsoft Windows<br>Mac OS<br>Linux
|platform=Microsoft Windows, Mac OS, Linux
|language        = English
|license=GNU GPL 2.0
|genre            = LDraw part authoring
|website=[http://www.br-eng.info/my-lego-roscomenu-29/my-ldraw-roscomenu-45/50-txt2dat Brickley Roscowicz Engineering]
|license         = GNU GPL 2.0
|website         = [http://www.br-eng.info/my-lego-roscomenu-29/my-ldraw-roscomenu-45/50-txt2dat www.br-eng.info]
}}
}}
'''txt2dat''' is a tool used for creating text-based patterns for LDraw parts. By defining a font file and the required text, a pattern can be created.
'''txt2dat''' is a tool used for creating text-based patterns for LDraw parts. By defining a font file and the required text, a pattern can be created.



Latest revision as of 17:05, 26 January 2015

txt2dat
Developer(s) Ross Crawford
Initial release unknown
Current version 0.2.3
Development status unknown
Operating system Microsoft Windows
Mac OS
Linux
Available in English
Type LDraw part authoring
License GNU GPL 2.0
Website www.br-eng.info
Software infobox

txt2dat is a tool used for creating text-based patterns for LDraw parts. By defining a font file and the required text, a pattern can be created.

The following example would produce the file "hello.dat" containing the string "Hello" in red 72 point Arial on a white background.

txt2dat -s Hello -c 4 -p 72 c:\windows\fonts\arial.ttf >hello.dat

Usage

txt2dat: Create LDraw files from text
-----------------------------------------------------------

Usage: txt2dat [options] [fontfile]

  -a        Add an ASCII character to the output.
             Characters are added in the order they appear on the command line.
  -b        Specify standard LDraw background colour or - for transparent.
             Default background colour is 15 (white).
  -c        Specify standard LDraw font colour or - for transparent.
             Default font colour is 0 (black).
  -d        Specify part description line. This is output as a comment on the
             first line.
             Default is "Sticker file".
  -e        Specify error log file. All error information will go to this file.
             Default is stderr
  -f        Specify part filename. This is output as a "0 Name: " line. This
             is for information only - the file will NOT be created.
             Default is "sticker.dat".
  -g        Draw edges on glyphs. Only if either -b- or -c- (not both) is used.
  -h        Specify height of bounding box (in LDU).
             Default height is least multiple of 8 LDU (one plate)
             greater than total height of characters.
             The font baseline will be on the x axis
  -k        Kern glyph pairs.
  -l        Don't draw edge lines on glyphs or bounding box.
  -m        Specify minimum angle between segments for non-conditional line.
             This is only used with the -g option, must be 0 <= A < 90.
             Default is 10 degrees.
  -o        Specify output file. All LDraw output will go to this file.
             Overrides -f if specified.
             Default is stdout
  -p        Specify point size for text.
             Default point size is 12.
  -r        Spline Resolution. Must be 0 or greater.
             0 = Best guess (default)
             1 = Maximum
             >1 = Reduces resolution.
  -s        Add a string of characters to the output.
             Characters are added in the order they appear on the command line.
  -w        Specify width of bounding box (in LDU).
             Default width is least multiple of 20 LDU (one stud)
             greater than total width of characters.
             The text will be centred in the bounding box, and about the z axis
  -x        Don't create bounding box.

  fontfile  is the full path to an existing scalable font file. If not
             supplied, the default internal font will be used.