Documentation ¶
Overview ¶
Package machinery contains all necessary functions for generating a SDF PBF
Index ¶
- func WithFontPath(path string) func(*FontMachinery)
- func WithFontSize(fontSize float64) func(*FontMachinery)
- type FontMachinery
- func (fm *FontMachinery) ComposeByFontNames(fontNames []string, min, max int) ([]byte, error)
- func (fm *FontMachinery) ComposeByFonts(fonts []*truetype.Font, min, max int) ([]byte, error)
- func (fm *FontMachinery) ComposeFontstack(fontStack, fontRange string) ([]byte, error)
- func (fm *FontMachinery) GetAvailableFonts()
- func (fm *FontMachinery) ScanFontDirectory()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithFontPath ¶
func WithFontPath(path string) func(*FontMachinery)
func WithFontSize ¶
func WithFontSize(fontSize float64) func(*FontMachinery)
Types ¶
type FontMachinery ¶
type FontMachinery struct { FontPath string // contains filtered or unexported fields }
func NewFontMachinery ¶
func NewFontMachinery(opts ...func(*FontMachinery)) *FontMachinery
NewFontMachinery creates a new FontMachinery
func (*FontMachinery) ComposeByFontNames ¶
func (fm *FontMachinery) ComposeByFontNames(fontNames []string, min, max int) ([]byte, error)
ComposeByFontNames loads and generates a PBF of given font names
func (*FontMachinery) ComposeByFonts ¶
ComposeByFonts generates a PBF of given truetype fonts
func (*FontMachinery) ComposeFontstack ¶
func (fm *FontMachinery) ComposeFontstack(fontStack, fontRange string) ([]byte, error)
ComposeFontstack loads and generates a PBF of given fontstack
func (*FontMachinery) GetAvailableFonts ¶
func (fm *FontMachinery) GetAvailableFonts()
GetAvailableFonts returns a list of available fonts
func (*FontMachinery) ScanFontDirectory ¶
func (fm *FontMachinery) ScanFontDirectory()
ScanFontDirectory scans the given font directory to find all fonts
Click to show internal directories.
Click to hide internal directories.