TYPE DESIGN INFORMATION PAGE last updated on Fri Dec 13 00:45:45 EST 2024

SEARCH THIS SITE:

IMAGE SEARCH:

FONT RECOGNITION VIA FONT MOOSE

LUC DEVROYE


ABOUT







Truetype <=> Type 1 conversions

Beware! There is no such thing as a one-to-one reversible conversion. There are several problems:

  • The outlines are stored in different ways in both formats. In truetype, second-order Bezier curves are used, and in type 1, third-order Bezier curves are employed. One second order Bezier can be transformed into a third-order Bezier, but a third-order Bezier cannot be transformed into one, two or seventeen second-order Beziers--approximations are in order for that conversion. So, type 1 to truetype is problematic, right from the start. For truetype to type 1, there is a snake in the grass, in the form of integer grid rounding (see below).
  • Both formats require all control points to be integers (whole numbers), falling in a grid. Truetype uses a 2048x2048 grid, type 1 typically a 1000x1000 grid. For the truetype to type 1 direction, one could divide all grid values by two, but then what? Should 183.5 become 183 or 184? The type 1 to truetype direction is easier, at least from this point of view, as we could multiply each grid coordinate by two, so no rounding loss would be involved. However, in the truetype to type 1 direction, the rounding causes additional problems for the new control points needed for the perfect third-order Bezier outlines mentioned above.
  • Placing ink on paper: the formats have different rules for placing ink on paper in case of outlines that are nested or intersecting. These differences are not caught by many conversion programs. In most cases, the user should not worry about this---only rarely do we have overlapping outlines (I was forced once to have them, for other reasons).
  • Complexity of the outlines: truetype permits more complex outlines, with more control points. For example, I am sure you have all seen fonts made from scans of pictures of typefaces of people. Typically, these outlines are beyond the type 1 limit, so this restriction makes the truetype to type 1 conversion impossible for ultra complex fonts.
  • Encoding: truetype can work with a huge number of glyphs. There are truetype fonts for Chinese and Japanese, for example. In type 1, the number of active glyphs is limited to 256. Again, for most Latin fonts, this is a non-issue.
  • The remarks about grid rounding also apply to all metrics, the bounding boxes, the character widths, the character spacing, the kerning, and so forth.
  • Finally, there is the hinting. This is handled very differently in both formats, with truetype being more sophisticated this time. So, in truetype to type 1 conversions of professionally (hand-hinted) fonts, a loss will occur. Luckily, 99% of the truetype fonts do not make use of the fancy hinting possibilities of truetype, and so, one is often safe.
All this to tell people to steer away like the plague from format conversions. And a plea to the font software community to develop one final format. My recommendation: get rid of truetype, tinker with the type 1 format (well, tinker a lot). More about that ideal format elsewhere.

EXTERNAL LINKS
MyFonts search
Monotype search
Fontspring search
Google search

INTERNAL LINKS
Type 1 font software ⦿ Truetype font software ⦿ TrueType to Type 1 conversion ⦿ Type 1 to TrueType conversion ⦿













Luc Devroye ⦿ School of Computer Science ⦿ McGill University Montreal, Canada H3A 2K6 ⦿ lucdevroye@gmail.com ⦿ https://luc.devroye.org ⦿ https://luc.devroye.org/fonts.html