Re: Converting old TrueType fonts to Unicode

From: John Hudson (
Date: Fri Feb 14 2003 - 15:12:22 EST

  • Next message: Michael Everson: "Re: Everson Mono"

    At 09:00 AM 2/14/2003, Alan Wood wrote:

    >Two people have recently asked me how to convert TrueType fonts to make them
    >Unicode compliant. One person wants to do this for Cyrillic, and the other
    >for Byzantine Musical Symbols.

    The easiest way to do this is to invest in a commercial font development
    tool. The best one for re-encoding most fonts is FontLab, although I
    believe you might also be able to use the cheaper TypeTool from the same
    company. See However, the current version of
    FontLab does not support Unicode supplementary plane codepoints needed for
    Byzantine Musical Symbols (see note below).

    When you open the font in FontLab you will see the Font Window containing
    individual cells for each glyph in the font. In order to re-encode a font
    for Unicode, you can use one of two methods:

    1. Manual.

    Select the first glyph you wish to encode and open the Rename Glyph window
    (ctrl+\ on Windows). In this window you can both rename glyphs and assign
    Unicode values. In the Unicode field you can enter a hex Unicode value
    (e.g. 0049) or multiple Unicode values separated by commas if you want to
    map a glyph to more than one Unicode value (e.g. the 'space' glyph is
    typically mapped to the codepoints for both the breaking and non-breaking
    space characters). Note that FontLab will not permit you to assign the same
    name or Unicode value to two different glyphs. Note also that changing the
    name or Unicode value may cause the glyphs to change position in the Font
    Window; this is because the cells in the window are ordered by encoding
    (glyph name) or codepage (Unicode value) depending on the view selected.
    When you have assigned the correct Unicode value to the glyph, click Rename
    Next Glyph and proceed. Obviously this manual method can take quite a long
    time, and is not recommended if you need to rename or re-encode large
    numbers of glyph in multiple fonts.

    2. Automated.

    In the FontLab/Mapping folder is a file with the extension .NAM. This is a
    naming file that maps glyph names to Unicode values. You can create your
    own .NAM files, using the standard one as a model, and this is recommended
    if you have, for example, a collection of fonts that all use the same
    non-Unicode encoding. Map the names in your existing fonts to correct
    Unicode values in the new .NAM file, save the file, and then re-open
    FontLab. You can now apply the Generate Unicode function to automatically
    encode/re-encode all the glyphs in the font in one easy step. Note that the
    .NAM file needs a unique name in the first line, e.g.:

             %%FONTLAB NAMETABLE: My New Naming File

    The format for the .NAM file entries is Unicode value + space + glyph name,

             0x0449 c.shcha

    As noted above, the current version of FontLab (4.2.5) does not support
    supplementary plane codepoints internally, which means you cannot use
    either of the above methods. The company that makes FontLab also makes a
    tool called Asia Font Studio; this is considerably more expensive than
    FontLab, and is intended for making CJK fonts. It has a mechanism for
    generating cmap tables including supplementary plane characters, based on
    using a special glyph naming scheme.

    Another option for re-encoding fonts is to hack the font cmap table itself.
    The easiest way to do this is probably with Just van Rossum's TTX tool. See This is a Python-based open
    source tool that decompiles TTF and OTF fonts to a human-readable XML file,
    which can then be edited and recompiled to a font. I have used this tool
    for a variety of purposes, but do not have any experience working on fonts
    with supplementary plane codepoints, so cannot verify its usefulness for
    this purpose.

    I hope some of this information helps.

    John Hudson

    Tiro Typeworks
    Vancouver, BC

    It is necessary that by all means and cunning,
    the cursed owners of books should be persuaded
    to make them available to us, either by argument
    or by force. - Michael Apostolis, 1467

    This archive was generated by hypermail 2.1.5 : Fri Feb 14 2003 - 15:54:17 EST