mirror of
https://github.com/KevinMidboe/motdGO.git
synced 2025-10-29 17:50:24 +00:00
comments and cleaning
This commit is contained in:
6
font.go
6
font.go
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user