Table order in OTF fonts

As part of our TrueType to OpenType font conversion (we need this for PDF to HTML5 conversion to ensure fonts display on all browsers), I have been playing with lots of raw OpenType font data and tables.

In theory TrueType to OpenType should be easier than Postscript to OpenType as there are more similarities. OpenType is a ‘synthesis’ of TrueType and Postscript and has versions to support both. More of the TrueType data can be reused rather than having to be recalculated.

However, the OpenType tables do need to be arranged in a very specific order. In the actual Header table, the tables are all listed with their lengths and offset location in the OpenType font file. This list needs to be in CASE-SENSITIVE alphabetical order (so OS/2 comes before cmap).

By contrast, the actual order of tables in the File needs to be in a certain order (this is because some tables contain values used by other tables). Here is my current miminum table list for an OpenType font

“head”,
“hhea”,
“maxp”,
“OS/2”,
“hmtx”,
“cmap”,
“loca”,
“glyf”,
“name”,
“post”

When examining OpenType font files, there are several tools available which provide lots of useful information. The most useful I have found so far is the Microsoft Font Validator, although LCDF package contains a very useful otfinfo tool. Do you have a favourite tool for checking OpenType font files?

This post is part of our “Fonts Articles Index” in these articles we explore Fonts.

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>