This is part of the old website, it is no longer updated.

FontForge and TeX

FontForge has a number of features built in to it to deal with TeX.

It can read "pk" and "gf" bitmap files and autotrace them to generate outline fonts. It can even invoke metafont directly on a ".mf" file, generate a "gf" bitmap from that, autotrace it and generate an outline font.

It can read ligature, kerning information from a ".tfm" file. It can create a tfm file.

The encodings file has a number of standard TeX encodings built in to it.

For large CJK truetype fonts it can read a sub-font definition file as defined in the ttf2tfm man page and generate a series of postscript type-1 fonts based on those two.

In consultation with the lilypond group we have designed a new SFNT table 'TeX ' for storing TeX specific information in True/OpenType files.

Generating a tfm file (and an enc file).

Before you generate a tfm file you should perform some of the following

Set the font parameters
Do this with Element->Font Info->TeX.
Optionally set Italic Correction values for glyphs
(FontForge will generate default values for italic fonts, so you only need do this if FontForge gets it wrong).
  • Select a glyph which should have an Italic Correction
  • Element->Glyph Info->Alt Pos
  • Press [New]
  • Set the tag to Italic Correction from the pulldown list
  • Set the XAdvance to the italic correction
Optionally set any glyphlists
  • Select the first glyph in the glyphlist (the smallest one)
  • Element->Glyph Info->Alt Subs
  • Press [New]
  • Set the tag to TeX Glyphlist from the pulldown list
  • Type the names of all the other glyphs in the glyphlist into the Components field
    So if the charlist is for left parenthesis
    You would select the lparen glyph and might type in "lparen.big lparen.bigger lparen.biggest"
Optionally set any extension glyphs.
  • If the glyph is in a charlist then Select the last glyph in the glyphlist (the largest one)
  • Element->Glyph Info->Mult Subs
  • Press [New]
  • Set the tag to TeX Extension list from the pulldown list
  • Type the names of the glyphs that this glyph decomposes into in the order: top middle bottom extension
    If a field is not present use .notdef
    So if the extension list is for left parenthesis
    You would select the lparen.biggest glyph and might type in "lparen.top lparen.mid lparen.bottom lparen.ext"

Note: When FontForge does a File->Merge Feature Info on a tfm file, it will set these values appropriately.

Having done this to your satisfaction you are ready to generate a tfm file. Go to File->Generate Fonts, select one of the postscript encodings from the pulldown list, press the [Options] button and turn on the [*] Tfm & Enc check box.

I'm not sure what you do with these files yet, but this should create them.

Installing a type1 (pfb) postscript font for TeX

I am a novice TeX/LaTeX user so my comments should be taken with a grain of salt. I did manage to get this process to work on my own system.

Installing a PostScript font for TeX is more complicated than one would hope (and so far I've only figured out how to install a Latin font). Instead of just moving the font file to some standard directory you must:

I suggest that before you read further you look at the following resources on the web:

I did the following:

-- Prev -- TOC -- Next --