Applications parsing font data should, however, anticipate non-conformant font data that has a NULL subtable offset where only a non-NULL value is expected. For cases in which subtable offset fields are not documented as permitting NULL values, font compilers must include a subtable of the indicated format, even if it is a header stub without further data (for example, a coverage table with no glyph IDs).
Applications should never interpret a NULL offset value as the offset to subtable data. A NULL subtable offset always indicates that the given subtable is not present. For example in the BASE table header, the horizAxisOffset and vertAxisOffset fields may be NULL, meaning that either subtable (or both) is optional.
In some cases, fields for subtable offsets are documented as permitting NULL values when the given subtable is optional. If a record contains an offset to a sub-structure, that structure is logically a subtable of the record’s parent table and the offset is normally from the start of the parent table. Records occur sequentially within a parent structure, either within a sequence of table fields or within an array of records of a given type.If a table contains an offset to a sub-structure, the offset is normally from the start of that table. The distinction between records and tables is based on these general criteria: Structures are characterized as either records or tables. Within this specification, many structures are defined in terms of the data types listed above. A space character cannot be followed by a non-space character. It must have one to four non-space characters, padded with trailing spaces (byte value 0x20). When re-interpreted as characters, the Tag value is case sensitive. Formally, however, the value is a byte array. As a result, a Tag value can be re-interpreted as a four-character sequence, which is conventionally how they are referred to. This corresponds to the range of values of Unicode Basic Latin characters in UTF-8 encoding, which is the same as the printable ASCII characters. Each byte within the array must have a value in the range 0x20 to 0x7E. Examples of 2.14 values are:Ī Tag value is a uint8 array. To compute the actual value, take the integer and add the fraction. The F2DOT14 format consists of a signed, 2’s complement integer and an unsigned fraction. Packed 32-bit value with major and minor version numbers. Long offset to a table, same as uint32, NULL offset = 0x00000000 Short offset to a table, same as uint16, NULL offset = 0x0000Ģ4-bit offset to a table, same as uint24, NULL offset = 0x000000 The value is represented as a signed 64-bit integer.Īrray of four uint8s (length = 32 bits) used to identify a table, design-variation axis, script, language system, feature, or baseline Uint16 that describes a quantity in font design units.ġ6-bit signed fixed number with the low 14 bits of fraction (2.14).ĭate and time represented in number of seconds since 12:00 midnight, January 1, 1904, UTC. Int16 that describes a quantity in font design units. All OpenType fonts use Motorola-style byte ordering (Big Endian): Data Type The following data types are used in the OpenType font file.
For additional information on filename extension conventions, see “Filenames” in Recommendations for OpenType fonts.
TTC should only be used for font collection files. (The extension may be upper or lower case.) The extensions. OpenType font files should use the extension. Each of these types of data is stored in one or more tables each designed for a particular purpose. The font data also includes meta-information, such as name strings that can used to present the font as an available choice in a font-picker user interface. Still other data can provide monochromatic or color bitmaps or SVG documents as alternate glyph descriptions. Other data provide descriptions of glyphs as TrueType or Compact Font Format (CFF) outlines. Portions of the data are used by applications to calculate the layout of text using the font that is, the selection of glyphs and their placement within a line. An OpenType font file contains data, in table format, used for rendering of text.