Modify font loading functions to use fontNamer.
This commit is contained in:
parent
be5a5617ef
commit
a78b24d408
1 changed files with 2 additions and 2 deletions
4
font.go
4
font.go
|
@ -66,11 +66,11 @@ func FontFileName(fontData FontData) string {
|
|||
}
|
||||
|
||||
func RegisterFont(fontData FontData, font *truetype.Font) {
|
||||
fonts[FontFileName(fontData)] = font
|
||||
fonts[fontNamer(fontData)] = font
|
||||
}
|
||||
|
||||
func GetFont(fontData FontData) *truetype.Font {
|
||||
fontFileName := FontFileName(fontData)
|
||||
fontFileName := fontNamer(fontData)
|
||||
font := fonts[fontFileName]
|
||||
if font != nil {
|
||||
return font
|
||||
|
|
Loading…
Reference in a new issue