
Note that the usWidthClass values are related to but distinct from the scale for the 'wdth' axis that is used in the 'fvar' table of variable fonts and in the STAT table. The valid usWidthClass values are shown in the following table. When a new type style is created of a different width class (either by a font designer or by some automated means) the relative aspect ratio of the characters in the new font is some percentage greater or less than those same characters in the normal font - it is this difference that this parameter specifies. Indicates a relative change from the normal aspect ratio (width to height ratio) as specified by a font designer for the glyphs in a font.Īlthough every glyph in a font may have a different numeric aspect ratio, each glyph in a font of normal width is considered to have a relative aspect ratio of one. While integer values from 1 to 1000 are supported, some legacy platforms may have limitations on supported values. UsWeightClass values use the same scale as the 'wght' axis that is used in the 'fvar' table of variable fonts and in the STAT table. Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the font. This method of calculating the value of this field was superseded in OpenType 1.4 with the introduction of version 3 of the OS/2 table and is deprecated. The following formula for calculating xAvgCharWidth was provided: For characters given in the table below, sum the width of each character times the weight factor indicated, then divide the total by 1000. Versions 0 to 2: When first defined, the specification was biased toward Basic Latin characters, and it was thought that the xAvgCharWidth value could be used to estimate the average length of lines of text. Furthermore, it is strongly recommended that implementers do not rely on this value for computing layout for lines of text, especially for cases where complex scripts are used.

The value for xAvgCharWidth is calculated by obtaining the arithmetic average of the width of all non-zero width glyphs in the font. The Average Character Width parameter specifies the arithmetic average of the escapement (width) of all non-zero width glyphs in the font. The version number allows for identification of the precise contents and layout for the OS/2 table. The version number for the OS/2 table: 0x0000 to 0x0005. This section provides details covering all versions of the OS/2 table. Applications should check the table length for a version 0 OS/2 table before reading these fields. Some legacy TrueType fonts may have been built with a shortened version 0 OS/2 table.
Fontforge baseline manual#
Note: Documentation for OS/2 version 0 in Apple’s TrueType Reference Manual stops at the usLastCharIndex field and does not include the last five fields of the table as it was defined by Microsoft.

The format of version 0 is as follows: Type Version 0 was defined in TrueType revision 1.5. The format of version 1 is as follows: Type Version 1 has five fewer fields than version 2, and two additional fields beyond those in version 0.

Version 1 was defined in TrueType revision 1.66. The format of version 2 is identical to the format for version 4, given above. Version 2 has the same fields as in version 3, and five additional fields beyond those in version 1. The format of version 3 is identical to the format for version 4, given above. Although new fields were not added beyond those in version 2, the specification of certain fields was revised to reflect changes in Unicode 3.2. Version 3 has the same fields as in version 4, and as in version 2. The format of version 4 is as follows: Type Although new fields were not added beyond those in version 3, the specification of certain fields was revised. Version 4 has two fewer fields than version 5, and the same fields as in version 3. The format of version 5 is as follows: Type Version 5 has two additional fields beyond those in version 4. All versions are supported, but use of version 4 or later is strongly recommended. Six versions of the OS/2 table have been defined: versions 0 to 5. The OS/2 table consists of a set of metrics and other data that are required in OpenType fonts.
