diff --git a/cmd/krampus19/changesettings.go b/cmd/krampus19/changesettings.go index 7645c22..d2c2777 100644 --- a/cmd/krampus19/changesettings.go +++ b/cmd/krampus19/changesettings.go @@ -180,6 +180,7 @@ type settingsHeader struct { func newSettingsHeader(label string) alui.Control { header := &settingsHeader{} + header.Font = "header" header.Text = label return alui.NewMargins(header, 3*margin, 0, 2*margin, 0) } diff --git a/cmd/krampus19/game.go b/cmd/krampus19/game.go index 9cfc129..0e92c39 100644 --- a/cmd/krampus19/game.go +++ b/cmd/krampus19/game.go @@ -61,7 +61,11 @@ func (g *game) loadBitmap(path, name string) error { } func (g *game) loadFonts() error { - openSansPath, err := g.ctx.Resources.Retrieve("fonts/OpenSans-Regular.ttf") + openSansRegularPath, err := g.ctx.Resources.Retrieve("fonts/OpenSans-Regular.ttf") + if err != nil { + return err + } + openSansBoldPath, err := g.ctx.Resources.Retrieve("fonts/OpenSans-Bold.ttf") if err != nil { return err } @@ -69,7 +73,11 @@ func (g *game) loadFonts() error { if err != nil { return err } - err = g.ui.Fonts().LoadFonts(alui.FontDescription{Path: openSansPath, Name: "default", Size: 32}) + err = g.ui.Fonts().LoadFonts(alui.FontDescription{Path: openSansRegularPath, Name: "default", Size: 32}) + if err != nil { + return err + } + err = g.ui.Fonts().LoadFonts(alui.FontDescription{Path: openSansBoldPath, Name: "header", Size: 32}) if err != nil { return err } diff --git a/cmd/krampus19/res/fonts/OpenSans-Bold.ttf b/cmd/krampus19/res/fonts/OpenSans-Bold.ttf new file mode 100644 index 0000000..efdd5e8 Binary files /dev/null and b/cmd/krampus19/res/fonts/OpenSans-Bold.ttf differ