EOT-Lite File Format

Since file format specs have been provided both for .webfont and ZOT, I wanted to sketch out what I imagine would be an EOT-Lite specification.  I'm not endorsing this, I'm just sketching it out to frame the discussion.  It's written as an overlay format, one that can be overlaid the EOT-Classic format.  Only data that affects non-EOT-Classic is listed.

Embedded OpenType Lite (EOT-Lite) File Format
===============================================

Below is a description of the EOT-Lite font wrapper.  It is intended
as a platform-independent wrapper around OpenType font data.  It is
designed to be compatible with versions of Microsoft Internet Explorer
that support the EOT format, referred to here as EOT-Classic [2].
To be compatible with EOT-Classic, refer to that specification.

All header values are little-endian.  Type names are based on those
used in the OpenType specification. [1]

(*) Values marked with an asterick are considered part of EOT-Classic
    and do not affect load behavior or usage outside of legacy EOT-Classic
    implementations.

  ULONG      EOTSize       Total structure length in bytes (including string and font data)
  ULONG      FontDataSize  Length of the OpenType font (FontData) in bytes
  ULONG      Version       Version number
  ULONG      Flags         Processing flags
* USHORT     Padding1[9]   Not used in EOT-Lite, see EOT-Classic [2]
  USHORT     MagicNumber   Magic number for EOT file - 0x504C
* ULONG      Padding2[7]   Not used in EOT-Lite, see EOT-Classic [2]
  ULONG      Reserved[4]   Reserved for future use - 0 for this version
* USHORT     Padding3      Not used in EOT-Lite, see EOT-Classic [2]
* BYTE       Padding4[n]   Variable size, not used in EOT-Lite, see EOT-Classic [2]
  BYTE       FontData[FontDataSize]  OpenType font data

The Version field contains the version number.  Valid version numbers
are currently 0x00010000, 0x00020001, and 0x00020002.

The Flags field contains a set of bit flags.  Only the values below
are recognized in EOT-Lite, all other values are ignored:

  TTEMBED_TTCOMPRESSED               0x00000004
  TTEMBED_XORENCRYPTDATA             0x10000000

The process of activating an EOT-Lite font consists of (1) EOT-Lite
header validation and (2) font activation.  

EOT-Lite header validation:

1. Check that MagicNumber is 0x504C.
2. Check that the version number is either 0x00010000, 0x00020001, or 0x00020002.
2. Check that Flag bits TTEMBED_TTCOMPRESSED and TTEMBED_XORENCRYPTDATA are not set.

If any of these checks fail, the font is not loaded.  The font is
activated by loading the data at offset (EOTSize - FontDataSize) of
length (FontDataSize) as a normal OpenType font.

[1] OpenType specification - http://www.microsoft.com/typography/otspec/
[2] EOT-Classic - http://www.w3.org/Submission/EOT/

Received on Wednesday, 29 July 2009 00:15:43 UTC