SourceForge.net Logo Project Page Download (v. 2.3, 4 June 2011) CVS repository Mailing list

Documentation:

Tutorial 1: Gentium's period Tutorial 2: Gentium's o Tutorial 3: Revising auto-instructions Installing Xgridfit Running Xgridfit File Structure Merge-mode Using the Schema Updating Xgridfit programs Managing Large Projects Debugging with FontForge Number Types Expressions Variables Conditionals and Loops Functions, Macros, Glyphs Arithmetic Elements Low-Level Elements Points Control Values Graphics State and Defaults Vectors Moving Points Deltas Rounding Element Reference
Xgridfit logo

Xgridfit is a high-level, XML-based language for gridfitting, or "hinting," TrueType fonts. It aims to provide these advantages over the manual instructing of glyphs:

In short, it conceals the assembly language-like character of the TrueType instruction set behind a friendly façade and provides many of the conveniences of a high-level programming language.

There is much to be said for XML as the base for a programming language. True, it is ugly and verbose, but its verbosity contributes to its legibility. Lots of people are comfortable with XML, or at least understand the basics of it. And a decent XML editor (I suggest Emacs with nxml-mode) will do most of your typing for you, giving you all the advantages of verbosity and few of the disadvantages.

The Xgridfit program compiles an XML source file into tables and instructions that relate to the gridfitting of glyphs. Its output is a Python script that can be run in FontForge to perform one or more the following tasks:

Xgridfit does have its limits. First of all, it cannot think for you: you still must understand the basics of TrueType gridfitting. Some limitations are those of the TrueType engine itself, which is not capable of run-time type-checking or type conversion. Other limitations, such as the absence of for- and while-loops, are due to the limitations of the XSLT language in which it is implemented.

But Xgridfit does a few things very well, in my experience at least: it speeds up TrueType development considerably, it makes TrueType programming much more legible than before, it makes it easy to revise and reuse existing TrueType code, and it does these things while offering a level of control over the glyph outline that you can't get from the graphical tools that I've seen.

System Requirements

Xgridfit will run under Linux, Mac OS X and Windows (with Cygwin). These programs/libraries are required or suggested: