font asset

This commit is contained in:
Dmitry Sergeev
2026-09-03 13:46:14 +03:00
parent 4742b1a1e5
commit 7dca5f1c3d
6 changed files with 151 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
package assets
import "testing"
func TestEmbeddedUIFont(t *testing.T) {
data, size, release := PinUIFont()
defer release()
if data == 0 {
t.Fatal("embedded UI font has a nil data pointer")
}
if size < 4 {
t.Fatalf("embedded UI font is too small: %d bytes", size)
}
if string(uiFont[:4]) != "\x00\x01\x00\x00" {
t.Fatalf("embedded UI font has unexpected TrueType signature % x", uiFont[:4])
}
}