Home

hhea

The hhea table, short for horizontal header, is a component of TrueType and OpenType font files. It stores font-wide horizontal metrics and line-related measurements that layout engines use when rendering text. Located within the font’s sfnt structure, hhea provides the essential data needed to place glyphs horizontally and to determine line spacing.

Key fields in the hhea table include version, ascent, descent, and lineGap. These vertical metrics describe

Relation to hmtx: The hmtx (horizontal metrics) table provides per-glyph data for advance width and left side

Use in rendering: Rendering engines consult hhea to determine line height and to compute glyph placement on

Conformance: hhea is a mandatory table in TrueType fonts and a fundamental part of OpenType font structures,

the
font’s
extents
in
font
units
and
influence
the
vertical
space
allocated
for
lines
of
text.
The
table
also
records
horizontal
bounds
such
as
advanceWidthMax,
minLeftSideBearing,
minRightSideBearing,
and
xMaxExtent.
Additional
fields
include
caretSlopeRise,
caretSlopeRun,
and
caretOffset,
which
describe
the
slope
and
position
of
the
text
caret
for
italic
and
obliqued
fonts.
The
metricDataFormat
field
is
typically
zero,
and
numberOfHMetrics
specifies
how
many
horizontal
metrics
entries
exist
in
the
hmtx
table.
bearing
for
the
first
numberOfHMetrics
glyphs.
Glyphs
beyond
this
count
use
the
last
advance
width
defined
in
hmtx
for
their
horizontal
advance,
while
their
left
side
bearing
may
still
be
present.
The
hhea’s
numberOfHMetrics
informs
how
to
interpret
hmtx
data.
each
line.
The
ascent
and
descent
influence
vertical
layout,
while
the
advance
widths
and
bearings
affect
horizontal
positioning.
The
caret
metrics
support
proper
cursor
rendering
in
italic
fonts.
working
alongside
head,
hmtx,
maxp,
os/2,
and
other
tables.