Updates to match new primary repo.
This commit is contained in:
23
fonts.go
23
fonts.go
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"log"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/v2/examples/resources/fonts"
|
||||
"golang.org/x/image/font"
|
||||
@@ -34,7 +33,7 @@ func init() {
|
||||
DashFont = &FontBase{}
|
||||
tt, err := opentype.ParseCollection(banschrift_ttf)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
//fmt.Printf("%d\n", tt.NumFonts())
|
||||
@@ -46,7 +45,7 @@ func init() {
|
||||
Hinting: font.HintingVertical,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
DashFont.Expiry, err = opentype.NewFace(fnt, &opentype.FaceOptions{
|
||||
@@ -55,7 +54,7 @@ func init() {
|
||||
Hinting: font.HintingVertical,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
DashFont.Title, err = opentype.NewFace(fnt, &opentype.FaceOptions{
|
||||
@@ -64,7 +63,7 @@ func init() {
|
||||
Hinting: font.HintingVertical,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
DashFont.Normal, err = opentype.NewFace(fnt, &opentype.FaceOptions{
|
||||
@@ -73,7 +72,7 @@ func init() {
|
||||
Hinting: font.HintingVertical,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
DashFont.Points, err = opentype.NewFace(fnt, &opentype.FaceOptions{
|
||||
@@ -82,12 +81,12 @@ func init() {
|
||||
Hinting: font.HintingVertical,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
p2tt, err := opentype.Parse(fonts.PressStart2P_ttf)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
DashFont.Celebration, err = opentype.NewFace(p2tt, &opentype.FaceOptions{
|
||||
@@ -96,7 +95,7 @@ func init() {
|
||||
Hinting: font.HintingVertical,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
DashFont.TeamBackgroundName, err = opentype.NewFace(p2tt, &opentype.FaceOptions{
|
||||
@@ -105,7 +104,7 @@ func init() {
|
||||
Hinting: font.HintingVertical,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
DashFont.TeamBarName, err = opentype.NewFace(p2tt, &opentype.FaceOptions{
|
||||
@@ -114,7 +113,7 @@ func init() {
|
||||
Hinting: font.HintingVertical,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
DashFont.Debug, err = opentype.NewFace(p2tt, &opentype.FaceOptions{
|
||||
@@ -123,7 +122,7 @@ func init() {
|
||||
Hinting: font.HintingVertical,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
DashLogger.Fatal(err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user