Versions in this module Expand all Collapse all v0 v0.0.2 Feb 8, 2024 Changes in this version + var UserFontDir string + var UserFontMetrics = map[string]TTFLight + var UserFontMetricsLock = &sync.RWMutex + func Ascent(fontName string, fontSize int) float64 + func BoundingBox(fontName string) *types.Rectangle + func CharWidth(fontName string, r rune) (int, error) + func CoreFontNames() []string + func Descent(fontName string, fontSize int) float64 + func GlyphSpaceUnits(userSpaceUnits float64, fontScalingFactor int) float64 + func InstallTrueTypeCollection(fontDir, fn string) error + func InstallTrueTypeFont(fontDir, fontName string) error + func IsCoreFont(fontName string) bool + func IsUserFont(fontName string) bool + func LineHeight(fontName string, fontSize int) float64 + func LoadUserFonts() error + func Read(fileName string) ([]byte, error) + func Size(text, fontName string, width float64) (int, error) + func Subset(fontName string, usedGIDs map[uint16]bool) ([]byte, error) + func SupportedFont(fontName string) bool + func TextWidth(text, fontName string, fontSize int) (float64, error) + func UserFontNames() []string + func UserFontNamesVerbose() []string + func UserSpaceFontBBox(fontName string, fontSize int) *types.Rectangle + func UserSpaceUnits(glyphSpaceUnits float64, fontScalingFactor int) float64 + type TTFLight struct + Ascent int + Bold bool + CapHeight int + Chars map[uint32]uint16 + Descent int + FirstChar uint16 + FixedPitch bool + GlyphCount int + GlyphWidths []int + HorMetricsCount int + ItalicAngle float64 + LLx float64 + LLy float64 + LastChar uint16 + Planes map[int]bool + PostscriptName string + Protected bool + ToUnicode map[uint16]uint32 + URx float64 + URy float64 + UnicodeRange [4]uint32 + UnitsPerEm int + func (fd TTFLight) Gids() []int + func (fd TTFLight) String() string + func (fd TTFLight) SupportsScript(id string) (bool, error)