playground header, font scaling

This commit is contained in:
2023-07-08 10:59:46 +02:00
parent 09959a8932
commit 3947c34b4c
9 changed files with 78 additions and 32 deletions

View File

@@ -5,12 +5,30 @@ import (
"image/color"
)
const (
DefaultFontName konstructor.FontName = "ArcadeClassic"
)
const (
DefaultDPI = 72
)
func GetDefaultFontLayout() konstructor.FontLayout {
return konstructor.FontLayout{
Path: "assets/fonts/ArcadeClassic.ttf",
DPI: 72,
Path: konstructor.GetFontPath(DefaultFontName),
DPI: DefaultDPI,
Size: 24,
Color: color.White,
SelectedColor: color.RGBA{R: 255, G: 0, B: 0, A: 100},
}
}
func GetHeaderFontLayout() konstructor.FontLayout {
return konstructor.FontLayout{
Path: konstructor.GetFontPath(DefaultFontName),
DPI: DefaultDPI,
Size: 12,
Color: color.White,
SelectedColor: color.RGBA{R: 255, G: 0, B: 0, A: 100},
}
}