mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
font upd
Former-commit-id: bf42a690c7cd199d4f2ec00855213b83aecb144b Former-commit-id: b992aac69b93c5d1632e96c4985cf61a6419b6a8
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package net.torvald.imagefont
|
||||
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import org.newdawn.slick.*
|
||||
|
||||
/**
|
||||
@@ -29,7 +30,11 @@ class GameFontImpl : GameFontBase() {
|
||||
, W_UNIHAN, H_UNIHAN
|
||||
);*/
|
||||
GameFontBase.cyrilic = SpriteSheet(
|
||||
"./assets/graphics/fonts/cyrilic_variable.tga", 15, 19, 1)
|
||||
when (Terrarum.gameLocale.substring(0..1)) {
|
||||
"bg" -> "./assets/graphics/fonts/cyrilic_bulgarian_variable.tga"
|
||||
"sr" -> "./assets/graphics/fonts/cyrilic_serbian_variable.tga"
|
||||
else -> "./assets/graphics/fonts/cyrilic_variable.tga"
|
||||
}, 15, 19, 1)
|
||||
GameFontBase.fullwidthForms = SpriteSheet(
|
||||
"./assets/graphics/fonts/fullwidth_forms.tga", GameFontBase.W_UNIHAN, GameFontBase.H_UNIHAN)
|
||||
GameFontBase.uniPunct = SpriteSheet(
|
||||
@@ -77,4 +82,13 @@ class GameFontImpl : GameFontBase() {
|
||||
buildWidthTable(cyrilic, 0x400, 0..0x5F)
|
||||
buildWidthTable(greekSheet, 0x370, 0..0x5F)
|
||||
}
|
||||
|
||||
fun reload() {
|
||||
GameFontBase.cyrilic = SpriteSheet(
|
||||
when (Terrarum.gameLocale.substring(0..1)) {
|
||||
"bg" -> "./assets/graphics/fonts/cyrilic_bulgarian_variable.tga"
|
||||
"sr" -> "./assets/graphics/fonts/cyrilic_serbian_variable.tga"
|
||||
else -> "./assets/graphics/fonts/cyrilic_variable.tga"
|
||||
}, 15, 19, 1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user