Documentation ¶ Index ¶ func LoadFonts(dir string) (map[string]*Font, error) type Font func LoadFont(filename string) (*Font, error) func (f *Font) Entries() int func (f *Font) Indices(s string) ([]int, error) type Point type Range Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func LoadFonts ¶ func LoadFonts(dir string) (map[string]*Font, error) Types ¶ type Font ¶ type Font struct { Name string // Contains the sprite data for the font ObjectFile string // Maps ASCII bytes to a sprite offset in the ObjectFile Ranges []Range Mapping map[rune]int } func LoadFont ¶ func LoadFont(filename string) (*Font, error) func (*Font) Entries ¶ func (f *Font) Entries() int func (*Font) Indices ¶ func (f *Font) Indices(s string) ([]int, error) Returns the offsets required to display a given string, returning an error if some of the runes in the string are unknown to the font type Point ¶ type Point struct { Rune rune Sprite int } type Range ¶ type Range struct { Min Point Max Point } Source Files ¶ View all Source files fonts.go Click to show internal directories. Click to hide internal directories.