Add RegisterFont
This commit is contained in:
parent
7f2c247e7a
commit
6d19118a1c
1 changed files with 4 additions and 0 deletions
|
@ -37,6 +37,10 @@ type FontData struct {
|
||||||
Style FontStyle
|
Style FontStyle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func RegisterFont(fontfilename string, font *truetype.Font) {
|
||||||
|
fonts[fontfilename] = font
|
||||||
|
}
|
||||||
|
|
||||||
func GetFont(fontData FontData) *truetype.Font {
|
func GetFont(fontData FontData) *truetype.Font {
|
||||||
fontFileName := fontData.Name
|
fontFileName := fontData.Name
|
||||||
switch fontData.Family {
|
switch fontData.Family {
|
||||||
|
|
Loading…
Reference in a new issue