Modify font loading functions to use fontNamer.

This commit is contained in:
Steven Edwards 2015-08-09 12:47:30 -04:00
parent be5a5617ef
commit a78b24d408

View file

@ -66,11 +66,11 @@ func FontFileName(fontData FontData) string {
} }
func RegisterFont(fontData FontData, font *truetype.Font) { func RegisterFont(fontData FontData, font *truetype.Font) {
fonts[FontFileName(fontData)] = font fonts[fontNamer(fontData)] = font
} }
func GetFont(fontData FontData) *truetype.Font { func GetFont(fontData FontData) *truetype.Font {
fontFileName := FontFileName(fontData) fontFileName := fontNamer(fontData)
font := fonts[fontFileName] font := fonts[fontFileName]
if font != nil { if font != nil {
return font return font