Terminology: container formats vs. coding formats, glyph imaging streams vs. text layout streams

Adam Twardoch (List) list.adam at twardoch.com
Thu Mar 4 03:33:02 CET 2010


I just came up with this idea how font formats (including desktop and
web font formats) can be explained to software developers -- using an
analogy with multimedia (video + audio) formats.

In video applications, this is called a "container format" or "wrapper
format" (though "container format" is more popular, I think):
http://en.wikipedia.org/wiki/Container_format_%28digital%29

For example, AVI, MKV, OGG and MP4 are all container formats that can
hold various metadata and data for various streams.

This is different from the "coding format" which specifies in which way
the multimedia contents of each stream is encoded (e.g. AAC, MP3,
MPEG-2, H.264 etc.).

Following this analogy, .woff, .eot, .otf, .ttf, .ttc, .dfont, FFIL are
different container formats for digital font files that use the "sfnt"
structure (which are separate from, say, Type 1 fonts, which use a
completely different structure).

OpenType-TrueType, OpenType-CFF, AAT-TrueType, AAT-CFF,
Graphite-TrueType, Graphite-CFF are different coding formats for
sfnt-based digital font formats.

In fact, one can make one more analogy: similar to the audio and video
streams in multimedia files, we can identify two kinds of streams in
sfnt-based digital font formats: the glyph imaging "stream" (with the
coding formats TrueType or CFF) and the text layout "stream" (with the
coding formats OpenType, AAT or Graphite).

A font that contains both TrueType and CFF glyph outlines is unlikely,
there can be only one of them -- which makes the glyph imaging "stream"
analogous to the video stream (you rather not have two parallel video
streams in a file). On the other hand, a font that contains a mix of
OpenType, AAT and Graphite text layout "streams" is more likely, just
like there are multimedia files that have several parallel audio tracks
(say, for English, German and French-dubbed dialog).

Oh, and glyph bitmaps are kind of like subtitles. A bit :) And a font
without any layout "stream" is like a silent movie.

If we consider the "kern" table a "TrueType 1.0 layout stream", it
becomes clear why we have a potential conflict between the "kern" table
and the "GPOS" table. It's two text layout streams that are kind of like
two parallel audio streams. "kern" is the Mono audio and "GPOS" is the
Dolby 5.1 audio. Nobody wants to hear them both at the same time :)

Regards,
Adam



More information about the mpeg-otspec mailing list