Documentation
¶
Index ¶
- Constants
- type FontManager
- func (fm *FontManager) GetFace(name string, size float64) (font.Face, error)
- func (fm *FontManager) GetFaceWithSpacing(name string, size float64, lineHeight float64) (font.Face, error)
- func (fm *FontManager) LoadFont(name string, path string) error
- func (fm *FontManager) LoadFontData(name string, fontData []byte) error
- func (fm *FontManager) LoadMonoFonts() error
- func (fm *FontManager) LoadStandardFonts() error
- func (fm *FontManager) PurgeCache()
Constants ¶
View Source
const ( STANDARD_NORMAL = "standard_normal" STANDARD_ITALIC = "standard_italic" STANDARD_BOLD = "standard_bold" STANDARD_BOLD_ITALIC = "standard_bold_italic" MONO_NORMAL = "mono_normal" MONO_ITALIC = "mono_italic" MONO_BOLD = "mono_bold" MONO_BOLD_ITALIC = "mono_bold_italic" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FontManager ¶
func Create ¶
func Create() *FontManager
func CreateWithFS ¶
func CreateWithFS(filesystem fs.FS) *FontManager
func (*FontManager) GetFaceWithSpacing ¶
func (*FontManager) LoadFontData ¶
func (fm *FontManager) LoadFontData(name string, fontData []byte) error
func (*FontManager) LoadMonoFonts ¶
func (fm *FontManager) LoadMonoFonts() error
This function loads the mono gofonts into the manager
It loads the mono, monoitalic, monobold, and monobolditalic fonts
func (*FontManager) LoadStandardFonts ¶
func (fm *FontManager) LoadStandardFonts() error
This function loads the standard san-serif gofonts into the manager
It loads the regular, italic, bold, and bolditalic fonts
func (*FontManager) PurgeCache ¶
func (fm *FontManager) PurgeCache()
Click to show internal directories.
Click to hide internal directories.