1XGRIDFIT(1) General Commands Manual XGRIDFIT(1)
2
3
4
6 xgridfit - a program for gridfitting, or "hinting," TrueType fonts
7
9 xgridfit [options] file.{xgf or xml}...
10
12 Xgridfit is a simple program that implements an XML-based language for
13 gridfitting, or "hinting," TrueType fonts. It compiles an XML source
14 file into tables and instructions that relate to the gridfitting of
15 glyphs. Xgridfit does not insert these elements into a font itself,
16 but rather relies on FontForge, the Open Source font editor, to do
17 this.
18
19 For each input file specified on the command line, the xgridfit command
20 generates a script named file.py. You may run this script in FontForge
21 thus:
22
23 $ fontforge -script file.py
24
25 Alternatively, you can skip generation of a script file and execute the
26 script (the FontForge Python bindings are required for this):
27
28 $ xgridfit --execute file.xgf
29
30 For more information about Xgridfit, point your browser to
31 file:///usr/share/doc/xgridfit/html/index.html or
32 http://xgridfit.sourceforge.net
33
35 Note that many of these options can also be specified by "default"
36 elements in the program file. However, command-line options always
37 override these defaults.
38
39 -a value, --max-stack=value
40 Size of TrueType stack (default is 256)
41
42 -A, --auto-instr
43 Auto-instruct all glyphs in the font before installing Xgridfit
44 programming. This option has no effect except in merge-mode
45 (option -m).
46
47 -b value, --delta-break=value
48 Delta Break value: formerly the maximum number of delta pairs
49 that could be placed on the stack with a single push
50 instruction. As of version 1.11 it approximates that behavior
51 by setting -p option to twice the specified value. This option
52 has no effect in Python mode (option -l py).
53
54 -c yes|no, --compile-globals=yes|no
55 Compile functions, control values, pre-program and maxp entries
56 (default is "yes")
57
58 -C gray|grey|black|white, --color=gray|grey|black|white
59 Use this color for rounded distances except where specified
60 otherwise (default is "gray").
61
62 --config=file
63 Read this configuration file instead of the default.
64
65 -d, --debug-mode
66 Run in debug mode. Output is file.debug rather than file.py
67
68 -D, --delete-all
69 Delete all instruction-related programming and data before
70 installing Xgridfit programming. This option has no effect
71 except in merge-mode (option -m). Otherwise, when the output
72 language is Python, TrueType data is deleted except when
73 --compile-globals=no.
74
75 -e Display diagnostic messages (mainly for debugging Xgridfit).
76
77 -E, --elapsed-time
78 Report the time (in seconds) used to run Xgridfit.
79
80 -f, --execute
81 Execute the generated script, and do not save it in a file.
82 This option overrides -O, and it is incompatible with -d, -S and
83 -z.
84
85 -F file, --data-file=file
86 In merge-mode, Xgridfit stores and reads information about the
87 font's state. By default, this is stored in FontForge's
88 font.persistent object, which can be stored only in an .sfd
89 file. Use this option to store font information in a file
90 instead.
91
92 -g glyph+list, --glyph-select=glyph+list
93 Compile only the specified glyphs, ignoring all others. The
94 argument is a list of one or more glyph names, delimited by plus
95 signs ("+"). The list must contain no spaces.
96
97 -G yes|no, --init-graphics=yes|no
98 Include or omit at the beginning of each glyph program a
99 function call that initializes variables used to track the
100 graphics state. The default is "yes." This option can be
101 overridden with the init-graphics attribute on any glyph
102 element.
103
104 -h, --help
105 Display a help message and exit.
106
107 -H yes|no, --auto-hint=yes|no
108 Auto-hint all glyphs in the font before auto-instructing. This
109 option has no effect except when auto-instructing is requested
110 (option -A).
111
112 -i file, --infile=file
113 File to be input by generated script. Must have extension .sfd
114 or .ttf
115
116 -l py|ff, --language=py|ff
117 Whether the output of Xgridfit should be a Python script or one
118 in the native FontForge scripting language. The default is py.
119 Alternatively, set the environment variable XGRIDFIT_OUTPUT_LANG
120 to "ff" or "py".
121
122 -m, --merge-mode
123 Run in merge-mode. Xgridfit produces a Python script that merges
124 Xgridfit programming with TrueType programming already present
125 in the font.
126
127 -o file, --outfile=file
128 File to be output by generated script. Must have extension .sfd
129 or .ttf
130
131 -O file, --output-script=file
132 Name of script file to be output by Xgridfit, rather than the
133 default, which replaces .xgf in the input file with .py
134
135 -p value, --push-break=value
136 The number of values that can be pushed with a single PUSHB or
137 PUSHW instruction. The default is 255, except when the output
138 language is ff (-l ff); then the default is 20.
139
140 -P yes|no, --combine-prep=yes|no
141 Combine the Xgridfit pre-program with the prep table already
142 present in the font (merge-mode only; default is yes).
143
144 --processor=libxslt|lxml|xsltproc|saxon-6|saxon-9|xalan-j|xalan-c|4xslt
145 Select a preferred XSLT processsor. Xgridfit will use this one
146 if possible.
147
148 -q, --quiet
149 Run in quiet mode. Routine messages are suppressed.
150
151 -s value, --max-storage=value
152 Maximum places in TrueType storage area. This area is used to
153 store variables, and also Xgridfit's own run-time data. The
154 number must always be 24 or greater
155
156 -S name, --output-base=name
157 Save script for each glyph in a separate file named name_glyph-
158 name.py - or .pe or .debug
159
160 --skip-validation
161 Do not validate the Xgridfit program before compiling.
162
163 -t value, --max-twilight=value
164 Maximum number of points in Twilight zone. The default is 25,
165 but few fonts require so many
166
167 -T file, --temp-file=file
168 Name of a temporary file in which to store result of XInclude
169 processing: the compiler and/or validator is run against this
170 file. If this option is used, the file is not deleted after
171 processing; if it is not used, the file (named by Xgridfit) is
172 deleted. This option is ignored when a temporary file is not
173 needed.
174
175 -v, --version
176 Print version number and exit
177
178 -V Validate the Xgridfit program against a schema before compiling.
179 Compilation is performed only if validation suceeds. By default
180 xmllint is used for validation; run xgfconfig to choose another
181 validator.
182
183 --validator=libxml2|lxml|jing|msv|rnv
184 Select a preferred Relax NG validator. Xgridfit will use this
185 validator if possible.
186
187 -x, --skip-compilation
188 Do not compile. Validation is performed unless suppressed.
189
190 -X, --no-xinclude
191 Assume that XInclude processing is unnecessary; do not check.
192
193 -z file, --output-outfile-script=file
194 When the -S option is present and the -o option or the <outfile>
195 element has been used to make the output script save a font or
196 FontForge source file, the output of the <outfile> script is
197 saved in a separate script file. Xgridfit will supply a default
198 name for this file, but this option lets you supply your own
199 name.
200
202 /usr/share/xml/xgridfit/lib/*.xsl
203 All XSLT scripts of the Xgridfit program.
204
206 fontforge(1), xgfconfig(1), ttx2xgf(1), xgfupdate(1).
207
209 xgridfit was written by Peter Baker <psb6m@virginia.edu>.
210
211 This manual page was written by Kestutis Biliunas
212 <kebil@kaunas.init.lt>, for the Debian project (but may be used by oth‐
213 ers). Revised and OPTIONS section added by P. Baker.
214
215
216
217 2009-12-18 XGRIDFIT(1)