hhea: Horizontal Header table

The hhea table is an OpenType table.

class fontTools.ttLib.tables._h_h_e_a.table__h_h_e_a(tag: str | bytes | None = None)[source]

Bases: DefaultTable

Horizontal Header table

The hhea table contains information needed during horizontal text layout.

Note

This converter class is kept in sync with the _v_h_e_a.table__v_h_e_a table constructor.

See also https://learn.microsoft.com/en-us/typography/opentype/spec/hhea

dependencies: list[str] = ['hmtx', 'glyf', 'CFF ', 'CFF2']
tableFormat = '\n\t\t>  # big endian\n\t\ttableVersion:           L\n\t\tascent:                 h\n\t\tdescent:                h\n\t\tlineGap:                h\n\t\tadvanceWidthMax:        H\n\t\tminLeftSideBearing:     h\n\t\tminRightSideBearing:    h\n\t\txMaxExtent:             h\n\t\tcaretSlopeRise:         h\n\t\tcaretSlopeRun:          h\n\t\tcaretOffset:            h\n\t\treserved0:              h\n\t\treserved1:              h\n\t\treserved2:              h\n\t\treserved3:              h\n\t\tmetricDataFormat:       h\n\t\tnumberOfHMetrics:       H\n'
glyphTableTag = 'glyf'
metricsTableTag = 'hmtx'
outlineTags = ('glyf', 'CFF ', 'CFF2')
property ascender
property descender
decompile(data, ttFont)[source]
compile(ttFont)[source]
recalc(ttFont)[source]
mergeMap = {'*': <function equal>, 'advanceWidthMax': <built-in function max>, 'ascent': <built-in function max>, 'caretOffset': <function first>, 'caretSlopeRise': <function first>, 'caretSlopeRun': <function first>, 'descent': <built-in function min>, 'lineGap': <built-in function max>, 'minLeftSideBearing': <built-in function min>, 'minRightSideBearing': <built-in function min>, 'numberOfHMetrics': <function recalculate>, 'tableTag': <function equal>, 'tableVersion': <built-in function max>, 'xMaxExtent': <built-in function max>}
toXML(writer, ttFont)[source]
fromXML(name, attrs, content, ttFont)[source]