Search code examples
opentype

Need some explanation on OpenType tables fixed version numbers


This was extracted from The Open Type Font File under Version Numbers

Most tables have version numbers, and the version number for the entire font is contained in the Table Directory. Note that there are two different table version number types, each with its own numbering scheme. USHORT version numbers always start at zero (0). Fixed version numbers start at one (1.0 or 0x00010000), except where noted (EBDT, EBLC and EBSC tables). Implementations reading tables must include code to check version numbers so that if and when the format and therefore the version number changes, older implementations will reject newer versions gracefully, if the changes are incompatible. When a Fixed number is used as a version, the upper 16 bits comprise a major version number, and the lower 16 bits a minor. Tables with non-zero minor version numbers always specify the literal value of the version number since the normal representation of Fixed numbers is not necessarily followed. For example, the version number of 'maxp' table version 0.5 is 0x00005000, and that of 'vhea' table version 1.1 is 0x00011000. If an implementation understands a major version number, then it can safely proceed reading the table. The minor version number indicates extensions to the format that are undetectable by implementations that do not support them.

Would appreciate some clarification on the highlighted sentences above (emphasis mine).


Solution

  • What's unclear about it? It's a 16 bit + 16 bit fixed length number representing a major.minor versioning number. The major version part uses "normal" encoding:

    v1.0 = 0001.0000
    v5.0 = 0005.0000
    v12.0 = 000C.0000
    

    And the minor version is written "literally", rather than hexadecimally:

    v1.5 = 0001.5000
    v7.16 = 0007.1600
    v20.314 = 0014.3140