Versions in this module Expand all Collapse all v0 v0.4.0 Jan 30, 2023 Changes in this version + var UserFontMetrics = map[string]TTFLight + func Ascent(fontName string, fontSize int) float64 + func BoundingBox(fontName string) *types.Rectangle + func CharWidth(fontName string, c int) int + func CoreFontNames() []string + func Descent(fontName string, fontSize int) float64 + func Dir() (string, error) + func GlyphSpaceUnits(userSpaceUnits float64, fontScalingFactor int) float64 + func InstallTrueTypeFont(fontDir, fontName string) error + func IsCoreFont(fontName string) bool + func IsUserFont(fontName string) bool + func LineHeight(fontName string, fontSize int) float64 + func Read(fileName string) ([]byte, error) + func Size(text, fontName string, width float64) int + func SupportedFont(fontName string) bool + func TextWidth(text, fontName string, fontSize int) float64 + func UserFontNames() []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]uint32 + Descent int + FirstChar uint16 + FixedPitch bool + GlyphCount int + GlyphWidths []int + HorMetricsCount int + ItalicAngle float64 + LLx float64 + LLy float64 + LastChar uint16 + PostscriptName string + Protected bool + URx float64 + URy float64 + UnicodeRange [4]uint32 + UnitsPerEm int + func (fd TTFLight) IsCJK() bool + func (fd TTFLight) String() string