Versions in this module Expand all Collapse all v0 v0.2.4 Aug 24, 2026 v0.2.3 Aug 24, 2026 v0.2.2 Aug 24, 2026 v0.2.1 Aug 23, 2026 v0.2.0 Aug 23, 2026 v0.1.0 Aug 22, 2026 Changes in this version + var ErrInvalid = errors.New("font: invalid font") + var ErrUnsupported = errors.New("font: unsupported font") + func AddFontDir(dir string) + func BidiLevels(text []rune, base int) []byte + func BidiMirror(r rune) rune + func BidiOrder(levels []byte) []int + func Encoding(name string) *[256]string + func IndexForName(name string) int + func MacGlyphName(i int) string + func MacRomanCode(r rune) int + func NeedsBidi(s string) bool + func NeedsShaping(s string) bool + func RuneForName(name string) rune + func StandardEncoding() *[256]string + func StandardName(name string, serif, fixed, symbolic, bold, italic bool) string + func StandardWidth(font, glyph string) float64 + func Upright(r rune) bool + type Font struct + Ascent float32 + CID bool + Descent float32 + Family string + Italic bool + Kind Kind + Matrix raster.Matrix + Name string + SubOffset float32 + SuperOffset float32 + UnitsPerEm int + Weight int + XHeight float32 + func Fallback(r rune, bold, italic bool) *Font + func Parse(data []byte) (*Font, error) + func Standard(name string) *Font + func SystemFont(family string, bold, italic bool) *Font + func (f *Font) Advance(gid int) float32 + func (f *Font) BuiltinEncoding() *[256]string + func (f *Font) DebugLayout() string + func (f *Font) GIDForMacCode(code uint32) int + func (f *Font) GIDForName(name string) int + func (f *Font) GIDForRune(r rune) int + func (f *Font) GIDForSymbolCode(code uint32) int + func (f *Font) GlyphName(gid int) string + func (f *Font) GlyphPath(gid int) *raster.Path + func (f *Font) HasCmap() bool + func (f *Font) HasGlyphNames() bool + func (f *Font) NumGlyphs() int + func (f *Font) Shape(text []rune, rtl bool) []Glyph + func (f *Font) Shaped() bool + type Glyph struct + Cluster int + GID int + XAdvance int + XOffset int + YAdvance int + YOffset int + type Kind int + const KindCFF + const KindTrueType + const KindType1