diff --git a/Doc/documentation.html b/Doc/documentation.html index d3f0a506e..10025ef6f 100644 --- a/Doc/documentation.html +++ b/Doc/documentation.html @@ -1,108 +1,53 @@ -TTX/FontTools +TTX Documentation -

TTX/FontTools

+

TTX -- From OpenType and TrueType to XML and Back

-TTX/FontTools 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. +TTX is a tool for manipulating TrueType and OpenType fonts. It is written in Python and has a BSD-style, open-source licence -- see LICENSE.txt. Among other things this means you can use it free of charge. 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 -XML based format (called TTX) and back. +TTX can dump TrueType and OpenType fonts to an XML-based text format, which is also called TTX. TTX files have a .ttx file extension. -

Scope

+

How to use TTX

-TTX/FontTools' 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. +The TTX application works can be used in two ways, depending on what platform you run it on: -

Installation

+ + -You need the following software to use FontTools: + - +When using TTX from the command line there are a bunch of extra options, these are explained in the help text, as displayed when typing "ttx -h" at the command prompt. These additional options include: + +

The TTX file format

-Now run the "setup.py" script from the FontTools archive. This will install -all the modules in the right places, as well as tries to compile the one (optional) -C extension contained in FontTools. (XXX: need precompiled Mac and Windows binaries, -*or* a way to skip compilation when there's no compiler available.) +The following tables are currently supported: -

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 documentation

- -

For Unix and DOS there are three command line programs: -

-They can all work with multiple input files. There are some extra -options which are explained by the 'usage' text; use the -h option to -display it. The setup.py script installs them as global tools, the -source is in the Tools directory. - -

For MacOS there's a 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. - -

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! - -

A note about glyph names and TrueType GlyphID's

+

+Other tables are dumped as hexadecimal data. +

TrueType 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. @@ -120,50 +65,13 @@ on a "round tripped" font.

Because the order in which glyphs are stored inside the TT font is important, we maintain an ordered list of glyph names in the font. -

Feedback

-Please 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. +

Development and feedback

+ +TTX/FontTools development is ongoing, but often goes in spurts. Feature requests and bug reports are always welcome. The best place for these is currently the fonttools-discussion mailing list at SourceForge. This list is both for discussion TTX from an end-user perspective as well as TTX/FontTools development. 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-access

- -The 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 documentation

- -Sorry, documentation beyond doc strings in the source code is still on my to-do list... -Below follows a brief overview of what's there. - -

-

The library

- -Cross-platform - - -Mac-specific - +Let me take this opportunity to mention that if you have special needs (eg. custom font monipulators, dufferent table formats, etc.): I am available for contracting.

Thank-you's

diff --git a/Doc/install.txt b/Doc/install.txt new file mode 100644 index 000000000..44603c560 --- /dev/null +++ b/Doc/install.txt @@ -0,0 +1,130 @@ +TTX/FontTools 2.0b1 + +TTX/FontTools is a suite of tools for manipulating fonts. It is written in +Python and has a BSD-style, open-source licence -- see LICENSE.txt. +It's hosted at http://sourceforge.net/. + +The flagship is TTX, a tool to convert OpenType and TrueType font files to +an XML-based format (also called TTX), and back. This lets you edit TTF or +OTF files with any text editor. + +The FontTools library currently reads and writes TrueType font files, reads +PostScript Type 1 fonts and more. + + +Scope + +TTX/FontTools' 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. + + +Installation + +For Windows and MacOS there are easy-to-use TTX installers. The rest if this +document is meant for people who want to use TTX/FontTools from the source. + +You need the following software: + +Python + The fresh versions as well as older versions (You need 2.0 or higher) + can be downloaded from + http://www.python.org/download/ + or here + http://sourceforge.net/projects/python/ + + Windows: grab the Windows installer, run the full install. + Un*x: follow the build instructions. + MacOS: grab the installer, run "Easy Install" + +The Numeric Python extension + Get a fresh version from the download page, linked from here: + http://sourceforge.net/projects/numpy/ + Windows: grab the "Numeric-*.exe" archive, it's an installer. Make sure + the Python version in the archive name (eg. "2.2") matches the Python + version you have. + Linux, other Unices including MacOSX: get a source archive and run this + command from the unpacked directory: + python setup.py install + +PyXML + Similar to the Numeric Python instructions, get the appropriate archive + or installer from + http://sourceforge.net/projects/pyxml/ + Installation is also similar to installing Numeric Python, see above. + Note: some Python distributions already contain the neccesary XML support. + If "import xml.parsers.expat" works at the Python interactive prompt, you + don't need to install PyXML. + +Now run the "setup.py" script from the FontTools archive. This will install +all the modules in the right places, as well as tries to compile the one +(optional) C extension contained in FontTools. On Unix it also installs the +"ttx" command line tool. This tool can also be used on Windows, but might +need some fiddling. + +For instructions how to build a standalone Windows installer, see +Windows/README.TXT. Thanks a LOT to Adam Twardoch for this essential +contribution. + +For TTX usage instructions, see the file "documentation.html". + + +Feedback + +Please 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: + http://sourceforge.net/projects/fonttools/ +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-access + +The FontTools sources are also accessible through CVS, see: + http://sourceforge.net/projects/fonttools/ +Let me know if you'd like to become a co-developer. + + +Developer documentation + +Sorry, documentation beyond doc strings in the source code is still on my to-do list... +Below follows a brief overview of what's there. + + +The library + + Cross-platform + fontTools.t1Lib -- Provides a Type 1 font reader. Writing is a planned feature. + fontTools.ttLib -- Extensive TrueType tools. Reads and writes. This is the flagship + of FontTools, it's by far the most mature component. Contains a completely modular + TTF table converter architecture. See ttLib/tables/table_API_readme.txt. + fontTools.afmLib -- And AFM file reader/writer. + fontTools.cffLib -- Reads CFF fonts. Writing is a planned feature. + fontTools.unicode -- A simple (but large) module that translates + Unicode values to their descriptive names. Still Unicode 2.0. + fontTools.agl -- Interface to the Adobe Glyph List: maps unicode values + to glyph names and back. + + Mac-specific + fontTools.fondLib -- A reader/writer class for Mac FOND resources. + fontTools.nfntLib -- Reads Mac NFNT bitmap font resources. + + +Thank-you's + +(in alphabetical order) +Erik van Blokland, Petr van Blokland, Jelle Bosma, Vincent Connare, +Simon Daniels, Hannes Famira, Greg Hitchcock, John Hudson, Jack Jansen, +Antoine Leca, Werner Lemberg, Peter Lofting, Dave Opstad, Laurence Penney, +Guido van Rossum, Adam Twardoch. + +Copyrights + +FontTools/TTX -- 1999-2002 Just van Rossum; Letterror (just@letterror.com) +See LICENCE.txt for the full license. diff --git a/README.txt b/README.txt index 26274356b..019a547fa 100644 --- a/README.txt +++ b/README.txt @@ -1,12 +1,13 @@ -See the file "index.html" in the "Doc" subdirectory for installation, -usage and developer instructions. +See the file "documentation.html" in the "Doc" subdirectory for TTX +usage instructions and information about the TTX file format. -Quick start: run - python setup.py install -from the command line. +See the file "install.txt" in the "Doc" subdirectory for instructions +how to build and install TTX/FontTools from the sources. + +Quick start: run python setup.py install from the command line. See the file "LICENSE.txt" for licensing info. -Good luck! +Have fun! Just van Rossum