txt2dat
txt2dat | ||||||||||||||||||||
| ||||||||||||||||||||
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.