vhea - Vertical Header Table

The vertical header table (tag name: 'vhea') contains information needed for vertical fonts. The glyphs of vertical fonts are written either top to bottom or bottom to top. This table contains information that is general to the font as a whole. Information that pertains to specific glyphs is given in the vertical metrics table (tag name: 'vmtx') described separately. The formats of these tables are similar to those for horizontal metrics (hhea and hmtx).

Data in the vertical header table must be consistent with data that appears in the vertical metrics table. The advance height and top sidebearing values in the vertical metrics table must correspond with the maximum advance height and minimum bottom sidebearing values in the vertical header table.

The vertical header table format follows:Vertical Header Table
TypeNameDescription
FIXED32version Version number of the vertical header
table
(0x00010000 for the initial version).
SHORTascentDistance in FUnits from the centerline to the previous line's descent.
SHORTdescentDistance in FUnits from the centerline to the next line's ascent.
SHORTlineGapReserved; set to 0
SHORTadvanceHeightMaxThe maximum advance height measurement -in FUnits found in the font. This value must be consistent with the entries in the vertical metrics table.
SHORTminTop
SideBearing
The minimum top sidebearing measurement found in the font, in FUnits. This value must be consistent with the entries in the vertical metrics table.
SHORTminBottom
SideBearing
The minimum bottom sidebearing measurement found in the font,
in FUnits.
This value must be consistent with the entries in the vertical metrics table.
SHORTyMaxExtentDefined as yMaxExtent=
minTopSideBearing+(yMax-yMin)
SHORTcaretSlopeRiseThe value of the caretSlopeRise field divided by the value of the caretSlopeRun Field determines the slope of the caret. A value of 0 for the rise and a value of 1 for the run specifies a horizontal caret. A value of 1 for the rise and a value of 0 for the run specifies a vertical caret. Intermediate values are desirable for fonts whose glyphs are oblique or italic. For a vertical font, a horizontal caret is best.
SHORTcaretSlopeRunSee the caretSlopeRise field. Value=1 for nonslanted vertical fonts.
SHORTcaretOffsetThe amount by which the highlight on a slanted glyph needs to be shifted away from the glyph in order to produce the best appearance. Set value equal to 0 for nonslanted fonts.
SHORTreservedSet to 0.
SHORTreservedSet to 0.
SHORTreservedSet to 0.
SHORTreservedSet to 0.
SHORTmetricDataFormatSet to 0.
USHORTnumOf
LongVerMetrics
Number of advance heights in the vertical metrics table; must be equal to the CharStrings INDEX count field in the 'CFF ' table.
  

Vertical Header Table Example
Offset/
length
Value NameComment
0/40x00010000versionVersion number of the vertical header table, in fixed-point format, is 1.0
4/21024ascentHalf the em-square height.
6/2-1024descentMinus half the em-square height.
8/20lineGapTypographic line gap is 0 FUnits.
10/22079 advanceHeightMaxThe maximum advance height measurement found in the font is 2079 FUnits.
12/2-342 minTopSideBearingThe minimum top sidebearing measurement found in the font is -342 FUnits.
14/2-333 minBottomSideBearingThe minimum bottom sidebearing measurement found in the font is -333 FUnits.
16/22036 yMaxExtentminTopSideBearing+
(yMax-yMin)=2036.
18/20caretSlopeRiseThe caret slope rise of 0 and a caret slope run of 1 indicate a horizontal caret for a vertical font.
20/21 caretSlopeRunThe caret slope rise of 0 and a caret slope run of 1 indicate a horizontal caret for a vertical font.
22/20 caretOffsetValue set to 0 for nonslanted fonts.
24/40 reservedSet to 0.
26/20reservedSet to 0.
28/20reservedSet to 0.
30/20reservedSet to 0.
32/20metricDataFormatSet to 0.
34/2258numOfLongVerMetricsNumber of advance heights in the vertical metrics table is 258.