DOKK / manpages / debian 10 / xgridfit / xgridfit.1.en
XGRIDFIT(1) General Commands Manual XGRIDFIT(1)

xgridfit - a program for gridfitting, or "hinting," TrueType fonts

xgridfit [options] file.{xgf or xml}...

Xgridfit is a simple program that implements an XML-based language for gridfitting, or "hinting," TrueType fonts. It compiles an XML source file into tables and instructions that relate to the gridfitting of glyphs. Xgridfit does not insert these elements into a font itself, but rather relies on FontForge, the Open Source font editor, to do this.

For each input file specified on the command line, the xgridfit command generates a script named file.py. You may run this script in FontForge thus:


$ fontforge -script file.py

Alternatively, you can skip generation of a script file and execute the script (the FontForge Python bindings are required for this):


$ xgridfit --execute file.xgf

For more information about Xgridfit, point your browser to file:///usr/share/doc/xgridfit/html/index.html or http://xgridfit.sourceforge.net

Note that many of these options can also be specified by "default" elements in the program file. However, command-line options always override these defaults.

Size of TrueType stack (default is 256)
Auto-instruct all glyphs in the font before installing Xgridfit programming. This option has no effect except in merge-mode (option -m).
Delta Break value: formerly the maximum number of delta pairs that could be placed on the stack with a single push instruction. As of version 1.11 it approximates that behavior by setting -p option to twice the specified value. This option has no effect in Python mode (option -l py).
Compile functions, control values, pre-program and maxp entries (default is "yes")
Use this color for rounded distances except where specified otherwise (default is "gray").
Read this configuration file instead of the default.
Run in debug mode. Output is file.debug rather than file.py
Delete all instruction-related programming and data before installing Xgridfit programming. This option has no effect except in merge-mode (option -m). Otherwise, when the output language is Python, TrueType data is deleted except when --compile-globals=no.
Display diagnostic messages (mainly for debugging Xgridfit).
Report the time (in seconds) used to run Xgridfit.
Execute the generated script, and do not save it in a file. This option overrides -O, and it is incompatible with -d, -S and -z.
In merge-mode, Xgridfit stores and reads information about the font's state. By default, this is stored in FontForge's font.persistent object, which can be stored only in an .sfd file. Use this option to store font information in a file instead.
Compile only the specified glyphs, ignoring all others. The argument is a list of one or more glyph names, delimited by plus signs ("+"). The list must contain no spaces.
Include or omit at the beginning of each glyph program a function call that initializes variables used to track the graphics state. The default is "yes." This option can be overridden with the init-graphics attribute on any glyph element.
Display a help message and exit.
Auto-hint all glyphs in the font before auto-instructing. This option has no effect except when auto-instructing is requested (option -A).
File to be input by generated script. Must have extension .sfd or .ttf
Whether the output of Xgridfit should be a Python script or one in the native FontForge scripting language. The default is py. Alternatively, set the environment variable XGRIDFIT_OUTPUT_LANG to "ff" or "py".
Run in merge-mode. Xgridfit produces a Python script that merges Xgridfit programming with TrueType programming already present in the font.
File to be output by generated script. Must have extension .sfd or .ttf
Name of script file to be output by Xgridfit, rather than the default, which replaces .xgf in the input file with .py
The number of values that can be pushed with a single PUSHB or PUSHW instruction. The default is 255, except when the output language is ff (-l ff); then the default is 20.
Combine the Xgridfit pre-program with the prep table already present in the font (merge-mode only; default is yes).
Select a preferred XSLT processsor. Xgridfit will use this one if possible.
Run in quiet mode. Routine messages are suppressed.
Maximum places in TrueType storage area. This area is used to store variables, and also Xgridfit's own run-time data. The number must always be 24 or greater
Save script for each glyph in a separate file named name_glyph-name.py - or .pe or .debug
Do not validate the Xgridfit program before compiling.
Maximum number of points in Twilight zone. The default is 25, but few fonts require so many
Name of a temporary file in which to store result of XInclude processing: the compiler and/or validator is run against this file. If this option is used, the file is not deleted after processing; if it is not used, the file (named by Xgridfit) is deleted. This option is ignored when a temporary file is not needed.
Print version number and exit
Validate the Xgridfit program against a schema before compiling. Compilation is performed only if validation suceeds. By default xmllint is used for validation; run xgfconfig to choose another validator.
Select a preferred Relax NG validator. Xgridfit will use this validator if possible.
Do not compile. Validation is performed unless suppressed.
Assume that XInclude processing is unnecessary; do not check.
When the -S option is present and the -o option or the <outfile> element has been used to make the output script save a font or FontForge source file, the output of the <outfile> script is saved in a separate script file. Xgridfit will supply a default name for this file, but this option lets you supply your own name.

/usr/share/xml/xgridfit/lib/*.xsl
All XSLT scripts of the Xgridfit program.

fontforge(1), xgfconfig(1), ttx2xgf(1), xgfupdate(1).

xgridfit was written by Peter Baker <psb6m@virginia.edu>.

This manual page was written by Kestutis Biliunas <kebil@kaunas.init.lt>, for the Debian project (but may be used by others). Revised and OPTIONS section added by P. Baker.

2009-12-18