diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-09-04 13:23:31 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-09-04 13:23:31 +0200 |
| commit | 75220464bf0e0a21a6526b7d8a30596b8fc8915a (patch) | |
| tree | ae3943f832f08ca76cc1100d1715a62163542b18 /go | |
| parent | 3f7c337eccaa81550bf7f13f32c041e5c35fd3a2 (diff) | |
| download | muhqs-game-75220464bf0e0a21a6526b7d8a30596b8fc8915a.tar.gz muhqs-game-75220464bf0e0a21a6526b7d8a30596b8fc8915a.zip | |
use the latin modern math font
Diffstat (limited to 'go')
| -rw-r--r-- | go/font/embed.go | 12 | ||||
| -rw-r--r-- | go/font/font.go | 4 | ||||
| -rw-r--r-- | go/font/latinmodern-math.otf | bin | 0 -> 733736 bytes |
3 files changed, 13 insertions, 3 deletions
diff --git a/go/font/embed.go b/go/font/embed.go new file mode 100644 index 00000000..07fb85f0 --- /dev/null +++ b/go/font/embed.go @@ -0,0 +1,12 @@ +// limitations under the License. + +package font + +import ( + _ "embed" +) + +var ( + //go:embed latinmodern-math.otf + LatinModernMathOtf []byte +) diff --git a/go/font/font.go b/go/font/font.go index 9e016045..dbadcc6f 100644 --- a/go/font/font.go +++ b/go/font/font.go @@ -4,8 +4,6 @@ import ( "bytes" "log" - "golang.org/x/image/font/gofont/goregular" - "github.com/hajimehoshi/ebiten/v2/text/v2" ) @@ -17,7 +15,7 @@ var Font18 *text.GoTextFace var Font12 *text.GoTextFace func InitFont() { - fontSource, err := text.NewGoTextFaceSource(bytes.NewReader(goregular.TTF)) + fontSource, err := text.NewGoTextFaceSource(bytes.NewReader(LatinModernMathOtf)) if err != nil { log.Fatal(err) } diff --git a/go/font/latinmodern-math.otf b/go/font/latinmodern-math.otf Binary files differnew file mode 100644 index 00000000..0e4642e9 --- /dev/null +++ b/go/font/latinmodern-math.otf |
