O'Reilly logo

Fonts & Encodings by Yannis Haralambous

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

D.1. TTX: TrueType Fonts Represented in XML

Unlike PostScript fonts, TrueType is a completely binary font format. The system of tables is technically efficient precisely because the TrueType file teems with pointers to the tables and, beyond that, to entries within the tables. By following pointers, software that recognizes the structure of the tables will thus very quickly find the data that it needs. It is a clean, rapid, and efficient approach. At the same time, however, it is rather badly designed for humans. Unlike PostScript fonts, in which one can read and even modify the code through a conversion with t1disasm and t1binary, these fonts cannot be handled by a human who does not have a binary editor and a great deal of patience.

To bridge this gap, font designer Just van Rossum, brother of the famous creator of the Python language, Guido van Rossum, developed a free tool in 2001, called TTX ('TT' for "TrueType" and 'X' for "XML"), which converts TrueType into a human-readable format, the file format also being called TTX. The most attractive feature of this tool is that it also performs the opposite operation just as easily: from a TTX file, it can generate another TrueType font that is identical to the original. Thus we can say that TTF and TTX are equivalent, in the sense that they contain the same data.

Following the general principle on which this book was organized, we shall describe TTX in this appendix rather than TTF: thus we shall be able to focus on the essential, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required