Versions in this module Expand all Collapse all v0 v0.1.0 Jan 10, 2026 Changes in this version + const UseMarkFilteringSet + const VariantFound + const VariantNotFound + const VariantUseDefault + func LoadHeadTable(ld *ot.Loader, buffer []byte) (tables.Head, []byte, error) + func NormalizeFamily(family string) string + func ProcessCmap(cmap tables.Cmap, os2FontPage tables.FontPage) (Cmap, UnicodeVariations, error) + type AATStateTable struct + func (st *AATStateTable) GetClass(glyph GID) uint16 + func (st *AATStateTable) GetEntry(state, class uint16) tables.AATStateEntry + type Aspect struct + Stretch Stretch + Style Style + Weight Weight + func (as *Aspect) SetDefaults() + type BitmapFormat uint8 + const BlackAndWhite + const JPG + const PNG + const TIFF + type BitmapSize struct + Height uint16 + Width uint16 + XPpem uint16 + YPpem uint16 + type CPAL [][]tables.ColorRecord + type Cmap interface + Iter func() CmapIter + Lookup func(rune) (GID, bool) + type CmapIter interface + Char func() (rune, GID) + Next func() bool + type CmapRuneRanger interface + RuneRanges func(dst [][2]rune) [][2]rune + type Description struct + Aspect Aspect + Family string + func Describe(ld *ot.Loader, buffer []byte) (Description, []byte) + type Face struct + func NewFace(font *Font) *Face + func ParseTTC(file Resource) ([]*Face, error) + func ParseTTF(file Resource) (*Face, error) + func (f *Face) Coords() []tables.Coord + func (f *Face) FontHExtents() (FontExtents, bool) + func (f *Face) FontVExtents() (FontExtents, bool) + func (f *Face) GlyphData(gid GID) GlyphData + func (f *Face) GlyphDataOutline(gid gID) (GlyphOutline, bool) + func (f *Face) GlyphExtents(glyph GID) (GlyphExtents, bool) + func (f *Face) GlyphVOrigin(glyph GID) (x, y int32, found bool) + func (f *Face) HorizontalAdvance(gid GID) float32 + func (f *Face) LineMetric(metric LineMetric) float32 + func (f *Face) Ppem() (x, y uint16) + func (f *Face) SetCoords(coords []tables.Coord) + func (f *Face) SetPpem(x, y uint16) + func (f *Face) VerticalAdvance(gid GID) float32 + func (face *Face) SetVariations(variations []Variation) + type Feature struct + Tag Tag + type Font struct + Ankr tables.Ankr + COLR *tables.COLR1 + CPAL CPAL + Cmap Cmap + Feat tables.Feat + GDEF tables.GDEF + GPOS GPOS + GSUB GSUB + Kern Kernx + Kerx Kernx + Ltag tables.Ltag + Morx Morx + Trak tables.Trak + func NewFont(ld *ot.Loader) (*Font, error) + func (f *Font) GetGlyphContourPoint(glyph GID, pointIndex uint16) (x, y int32, ok bool) + func (f *Font) GlyphHOrigin(GID) (x, y int32, found bool) + func (f *Font) GlyphName(glyph GID) string + func (f *Font) HasVerticalMetrics() bool + func (f *Font) NominalGlyph(ch rune) (GID, bool) + func (f *Font) NormalizeVariations(coords []float32) []VarCoord + func (f *Font) Upem() uint16 + func (f *Font) VariationGlyph(ch, varSelector rune) (GID, bool) + func (fd *Font) IsMonospace() bool + func (font *Font) BitmapSizes() []BitmapSize + func (ft *Font) Describe() Description + type FontExtents struct + Ascender float32 + Descender float32 + LineGap float32 + type FontID struct + File string + Index uint16 + Instance uint16 + type GID = ot.GID + const EmptyGlyph + type GPOS struct + Lookups []GPOSLookup + type GPOSLookup struct + Subtables []tables.GPOSLookup + type GSUB struct + Lookups []GSUBLookup + type GSUBLookup struct + Subtables []tables.GSUBLookup + type GlyphBitmap struct + Data []byte + Format BitmapFormat + Height int + Outline *GlyphOutline + Width int + type GlyphColor struct + Paint tables.PaintTable + type GlyphData interface + type GlyphExtents = ot.GlyphExtents + type GlyphOutline struct + Segments []Segment + func (o GlyphOutline) Sideways(yOffset float32) + type GlyphSVG struct + Outline GlyphOutline + Source []byte + type Kern0 []tables.Kernx0Record + func (kd Kern0) KernPair(left, right GID) int16 + type Kern1 struct + Machine AATStateTable + Values []int16 + type Kern2 tables.KerxData2 + func (kd Kern2) KernPair(left, right GID) int16 + type Kern3 tables.KernData3 + func (kd Kern3) KernPair(left, right GID) int16 + type Kern4 struct + Anchors tables.KerxAnchors + Machine AATStateTable + func (k Kern4) ActionType() uint8 + type Kern6 tables.KerxData6 + func (kd Kern6) KernPair(left, right GID) int16 + type KernSubtable struct + Data interface{} + IsExtended bool + TupleCount int + func (k KernSubtable) IsBackwards() bool + func (k KernSubtable) IsCrossStream() bool + func (k KernSubtable) IsHorizontal() bool + func (k KernSubtable) IsVariation() bool + type Kernx []KernSubtable + type Layout struct + FeatureVariations []tables.FeatureVariationRecord + Features []Feature + Scripts []Script + func (la *Layout) FindFeatureIndex(featureTag Tag) (uint16, bool) + func (la *Layout) FindScript(script Tag) int + func (la *Layout) FindVariationIndex(coords []VarCoord) int + type LineMetric uint8 + const CapHeight + const StrikethroughPosition + const StrikethroughThickness + const SubscriptEmXOffset + const SubscriptEmYOffset + const SubscriptEmYSize + const SuperscriptEmXOffset + const SuperscriptEmYSize + const UnderlinePosition + const UnderlineThickness + const XHeight + type LookupOptions struct + Flag uint16 + MarkFilteringSet uint16 + func (lo LookupOptions) Props() uint32 + type Morx []MorxChain + type MorxChain struct + DefaultFlags uint32 + Features []tables.AATFeature + Subtables []MorxSubtable + type MorxContextualSubtable struct + Machine AATStateTable + Substitutions []tables.AATLookup + type MorxInsertionSubtable struct + Insertions []GID + Machine AATStateTable + type MorxLigatureSubtable struct + Components []uint16 + LigatureAction []uint32 + Ligatures []GID + Machine AATStateTable + type MorxNonContextualSubtable struct + Class tables.AATLookup + type MorxRearrangementSubtable AATStateTable + type MorxSubtable struct + Coverage uint8 + Data interface{} + Flags uint32 + type Resource = ot.Resource + type Script struct + Tag Tag + type Segment = ot.Segment + type SegmentPoint = ot.SegmentPoint + type SimpleKerns interface + KernPair func(left, right GID) int16 + type Stretch float32 + const StretchCondensed + const StretchExpanded + const StretchExtraCondensed + const StretchExtraExpanded + const StretchNormal + const StretchSemiCondensed + const StretchSemiExpanded + const StretchUltraCondensed + const StretchUltraExpanded + type Style uint8 + const StyleItalic + const StyleNormal + type Tag = ot.Tag + type UnicodeVariations []variationSelector + func (t UnicodeVariations) GetGlyphVariant(r, selector rune) (GID, uint8) + type VarCoord = tables.Coord + type Variation struct + Tag Tag + Value float32 + type Weight float32 + const WeightBlack + const WeightBold + const WeightExtraBold + const WeightExtraLight + const WeightLight + const WeightMedium + const WeightNormal + const WeightSemibold + const WeightThin