Documentation ¶
Index ¶
Constants ¶
View Source
const ( Thin = "Thin" Light = "Light" Regular = "Regular" Medium = "Medium" Bold = "Bold" Black = "Black" )
View Source
const (
TrueTypeFontExt = ".ttf"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FontFamily ¶
type FontFamily struct { Name string // contains filtered or unexported fields }
func LoadFromDir ¶
func LoadFromDir(dir string) (*FontFamily, error)
LoadFromDir loads files and return FontFamily object from the specified directory. The directory name is used as a family name, and all font files in it are identified as part of the same font family. Each filename must follows this `<name>-<style>.ttf`naming rule.
func NewFontFamily ¶
func NewFontFamily(name string) *FontFamily
NewFontFamily initialize a FontFamily object and return it.
Click to show internal directories.
Click to hide internal directories.