Documentation ¶
Overview ¶
Package repository implements font repository.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FontRepository ¶
type FontRepository struct {
// contains filtered or unexported fields
}
func (*FontRepository) AddUTF8Font ¶
func (r *FontRepository) AddUTF8Font(family string, style fontstyle.Type, file string) Repository
AddUTF8Font adds a custom font to the repository.
func (*FontRepository) AddUTF8FontFromBytes ¶
func (r *FontRepository) AddUTF8FontFromBytes(family string, style fontstyle.Type, bytes []byte) Repository
AddUTF8FontFromBytes adds a custom font to the repository from a byte slice.
func (*FontRepository) Load ¶
func (r *FontRepository) Load() ([]*entity.CustomFont, error)
Load loads all custom fonts.
type Repository ¶
type Repository interface { AddUTF8Font(family string, style fontstyle.Type, file string) Repository AddUTF8FontFromBytes(family string, style fontstyle.Type, bytes []byte) Repository Load() ([]*entity.CustomFont, error) }
Repository is the abstraction to load custom fonts.
Click to show internal directories.
Click to hide internal directories.