ttf2pt1 - Man Page

A True Type to PostScript Type 1 Font Converter

Synopsis

ttf2pt1 [-options] ttffont.ttf [Fontname]

or

ttf2pt1 [-options] ttffont.ttf -

Description

Ttf2pt1 is a font converter from the True Type format (and some other formats supported by the FreeType library as well) to the Adobe Type1 format.

The versions 3.0 and later got rather extensive post-processing algorithm that  brings the converted fonts to the requirements of the Type1 standard, tries to correct the rounding errors introduced during conversions and some simple kinds of bugs that are typical for the public domain TTF fonts. It also generates the hints that enable much better rendering of fonts in small sizes that are typical for the computer displays. But everything has its price, and some of the optimizations may not work well for certain fonts. That's why the options were added to the converter, to control the performed optimizations.

Options

The first variant creates the file Fontname.pfa (or Fontname.pfb if the  option '-b' was used) with the converted font and Fontname.afm with the  font metrics, the second one prints the font or another file (if the option '-G' was used) on the standard output from where it can be immediately piped through some filter. If no Fontname is specified for the first variant, the name is generated from ttffont by replacing the .ttf filename suffix.

Most of the time no options are neccessary (with a possible exception of '-e'). But if there are some troubles with the resulting font, they  may be used to control the conversion. The options are:

The .pfa font format supposes that the description of the characters is binary encoded and encrypted. This converter does not encode or encrypt the data by default, you have to specify the option '-e' or use the t1asm program to assemble (that means, encode and encrypt) the font program. The t1asm program that is included with the converter is actually a part of the t1utils package, rather old version of which may be obtained from

http://ttf2pt1.sourceforge.net/t1utils.tar.gz

Note that t1asm from the old version of that package won't work properly with the files generated by ttf2pt1 version 3.20 and later. Please use t1asm packaged with ttf2pt1 or from the new version t1utils instead. For a newer version of t1utils please look at

http://www.lcdf.org/~eddietwo/type/

Examples

So, the following command lines:

ttf2pt1 -e ttffont.ttf t1font

ttf2pt1 ttffont.ttf - | t1asm >t1font.pfa

represent two ways to get a working font. The benefit of the second form  is that other filters may be applied to the font between the converter and assembler.

Files

See Also

Bugs

It seems that many Eastern fonts use features of the TTF format that are  not supported by the ttf2pt1's built-in front-end parser. Because of this for now we recommend using the FreeType-based parser (option '-p ft') with the "plane" language.

Troubleshooting and bug reports

Have problems with conversion of some font ? The converter dumps core ? Or your printer refuses to understand the converted fonts ? Or some characters are  missing ? Or some characters look strange ?

Send the bug reports to the ttf2pt1 development mailing list at ttf2pt1-devel@lists.sourceforge.net.

Try to collect more information about the problem and include it into the bug report. (Of course, even better if you would provide a ready fix, but just a detailed bug report is also good). Provide detailed information about your problem, this will speed up the response greatly. Don't just write "this font looks strange after conversion" but describe what's exactly wrong with it: for example, what characters look wrong and what exactly is wrong about their look. Providing a link to the original font file would be also a good idea. Try to do a little troublehooting and report its result. This not only would help with the fix but may also give you a temporary work-around for the bug.

First, enable full warnings with option '-W99', save them to a file and read carefully. Sometimes the prolem is with a not implemented feature which is reported in the warnings. Still, reporting about such problems may be a good idea: some features were missed to cut corners, in hope that no real font is using them. So a report about a font using such a feature may motivate someone to implement it. Of course, you may be the most motivated person: after all, you are the one wishing to convert that font. ;-) Seriously, the philosophy "scrath your own itch" seems to be the strongest moving force behind the Open Source software.

The next step is playing with the options. This serves a dual purpose: on one hand, it helps to localize the bug, on the other hand you may be able to get a working version of the font for the meantime while the bug is being fixed. The typical options to try out are: first '-Ou', if it does not help then '-Os', then '-Oh', then '-Oo'. They are described in a bit more detail above. Try them one by one and in combinations. See if with them the resulting fonts look better.

On some fonts ttf2pt1 just crashes. Commonly that happens because the font being converted is highly defective (although sometimes the bug is in ttf2pt1 itself). In any case it should not crash, so the reports about such cases will help to handle these defects properly in future.

We try to respond to the bug reports in a timely fashion but alas, this  may not always be possible, especially if the problem is complex. This is a volunteer project and its resources are limited. Because of this we would appreciate bug reports as detailed as possible, and we would appreciate the ready fixes and contributions even more.

History

Based on ttf2pfa by Andrew Weeks, and help from Frank Siegert.

Modification by Mark Heath.

Further modification by Sergey Babkin.

The Type1 assembler by I. Lee Hetherington with modifications by  Kai-Uwe Herbing.

Referenced By

ttf2pt1_convert(1), ttf2pt1_x2gs(1).

December 31, 2003 version 3.4.4 TTF2PT1 Font Converter