|
FontToolsFontTools is a suite of tools and libraries for manipulating fonts. It is written in Python and has a BSD-style, open-source licence -- see LICENSE.txt. It's hosted at sourceforge.net.It currently reads and writes TrueType font files, reads PostScript Type 1 fonts and more. It contains two command line programs to convert TrueType fonts to an ScopeFontTools' functionality is aimed towards font developers and font tool developers. It can of course be used to just access fonts (outlines, metrics, etc.) but it is not optimized for that. It will be further developed so it can be the core of any font editor. And that's exactly what it will be for our upcoming major rewrite of RoboFog, our (commercial) PythonPowered font editor for MacOS.InstallationYou need the following software to use FontTools:
Additional Mac instructions: De-binhex "TTX.rsrc.hqx" by dropping it onto StuffIt expander. (Or use your own preferred method) The "TTX.py" script included in this archive is the Mac-only main program: Drop it onto the "BuildApplet" app inside the Python folder; this will produce the TTX applet. User documentationFor MacOS there's a small application called TTX. If you drop a TrueType file onto it, it will convert it to XML. If you drop an XML file onto it, it will convert it back to TrueType. Please read the additional README file in the Mac subdirectory, since it behaves quite differently than the command line programs described below. For Unix and DOS I've provided two command line programs:
Adam Twardoch contributed a Windows registry script (ttx_shellext_win32.py) which makes the two above tools available under the Right Mouse Button. I haven't tested these myself, but I'm very interested in hearing about the results! Note about glyph names and TrueType GlyphID'sTrueType fonts use glyph indices (GlyphID's) to refer to glyphs in most places. While this is fine in binary form, it is really hard to work with for humans. Therefore we use names instead.The names are derived from what is found in the 'post' table. It is possible that different glyphs use the same PS name. If this happens, we force the names to be unique by appending "#n" to the name (n being an integer number). The original PS names will still be maintained by the 'post' table, so even though we use a different name internally, we are still able to write the 'post' table back in original form. If there is no proper 'post' table available, names will be derived from a Unicode cmap (if available) in conjuction with the Adobe Glyph List (see fontTools/agl.py). Because the order in which glyphs are stored inside the TT font is important, ttLib maintains an ordered list of glyph names in the font. FeedbackPlease join the fonttools-discussion mailing list at SourceForge. Subscription info can be found if you follow the "Mailing Lists" link at the SourceForge project page. You can also email me directly at just@letterror.com.If you want to follow the development of FontTools closely, or would like to contribute, you can also subscribe to the fonttools-checkins mailing list. Anonymous CVS-accessThe FontTools sources are also accessible through CVS, see the the SourceForge project page. Let me know if you'd like to become a co-developer.Developer documentationSorry, documentation beyond doc strings in the source code is still on my to-do list... Below follows a brief overview of what's there.GUI ToolsTTX -- A simple Mac app that converts TrueType (or OpenType) fonts to TTX format and back.
Command line tools
The libraryCross-platform
Thank-you's(in alphabetical order) Erik van Blokland, Petr van Blokland, Jelle Bosma, Vincent Connare, Simon Daniels, Hannes Famira, Greg Hitchcock, Jack Jansen, Antoine Leca, Werner Lemberg, Peter Lofting, Dave Opstad, Laurence Penney, Guido van Rossum, Adam Twardoch.CopyrightsFontTools/TTX -- 1999-2001 Just van Rossum; Letterror (just@letterror.com) |