comments and cleaning

This commit is contained in:
probandula
2016-10-25 18:19:28 +02:00
parent edfcb18a11
commit 3f7f13785f
2 changed files with 32 additions and 21 deletions

View File

@@ -9,6 +9,8 @@ import (
"strings"
)
const defaultFontName string = "standard"
// Represents a single font
type font struct {
hardblank string
@@ -64,7 +66,7 @@ func (this *fontManager) loadBuildInFont() error {
if err != nil {
return err
}
this.fontLib["default"] = font
this.fontLib[defaultFontName] = font
return nil
}
@@ -129,7 +131,7 @@ func (this *fontManager) getFont(fontName string) (*font, error) {
if !ok {
err := this.loadDiskFont(fontName)
if err != nil {
font, _ := this.fontLib["default"]
font, _ := this.fontLib[defaultFontName]
return font, nil
}
}