Optimizing fonts for use in TypeShow

If your fonts are OpenType fonts in PostScript/CFF format, the rendering quality may be poor, or it will not work at all. Due to the limited abilities of the GD + Freetype server software used for rendering, results will be much better if you prepare special font files with the following properties:

  • save TrueType .ttf files
  • create a flat kerning table (vs. class-based kern feature which is not respected by the renderer). Don’t worry about the enormous number of kerning pairs, it won’t slow down the rendering – we’ve tested this.
  • OpenType features don’t work; delete all features after flattening the Kerning
  • delete all Type 1 hints
  • prevent autohinting: Open FontLab Preferences -> Generating OpenType & TrueType -> TrueType/OpenType TT:, deactivate Autohint unhinted glyphs
  • Only glyphs with a dedicated Unicode are shown. In order for the basic ligature support for fi and fl, these two glyphs must have a Unicode.
  • delete all glyphs that don’t have a Unicode or private Unicodes (other than those for fi and fl) to reduce file size
  • OTFs work on some servers, too, but rendering quality is poor.

How to do this in FontLab

  • Open your font in FontLab
  • Expand (flatten) your kerning: Tools -> Kerning Assistance -> Expand
    Deactivate all checkboxes in the dialog window, ignore warning about too many kerning pairs.
  • Delete Classes:
    Open Classes panel, choose Reset classes from dropdown, confirm
  • Delete features:
    Open Features panel, choose Reset features from dropdown, confirm
  • Delete Glyphs that don’t have a Unicode: Run macro select_unencoded.py (see below), delete selected Glyphs
  • Delete Hints: Select all glyphs, press Shift + F7 (= Remove all hints)
  • Export Font as TrueType,
    use naming scheme TypefaceName-Style.ttf (e.g. CamingoDos-BoldItalic.ttf) so TypeShow can automatically recognize and sort your fonts. Make sure you have Autohinting turned off in FontLab Preferences (see above).

*) here is the script to help you decide which characters to throw out.

Save this code to a file called select_unencoded.py, making sure to keep the line indentation exactly as shown:

for index in range(len(fl.font)):
	glyph = fl.font[index]
	us = glyph.unicode
	if not us:

Put this file into the following directory.

Mac: User/Library/Application Support/FontLab/Studio 5/Macros

PC: C:\Program Files\FontLab\Studio5\Macros\

You may need to restart FontLab in order to use this script from FontLab’s macro palette.