demo v1.1 Latin ExtB

This commit is contained in:
Song Minjae
2017-02-20 23:24:02 +09:00
parent ccc7be93f2
commit 1689e39f6f
5 changed files with 357 additions and 181 deletions

View File

@@ -16,6 +16,8 @@ class GameFontImpl : GameFontBase() {
"./assets/graphics/fonts/ascii_variable.tga", 15, 19, 1)
GameFontBase.extASheet = SpriteSheet(
"./assets/graphics/fonts/LatinExtA_variable.tga", 15, 19, 1)
GameFontBase.extBSheet = SpriteSheet(
"./assets/graphics/fonts/LatinExtB_variable.tga", 15, 19, 1)
GameFontBase.kanaSheet = SpriteSheet(
"./assets/graphics/fonts/kana.tga", GameFontBase.W_KANA, GameFontBase.H_KANA)
GameFontBase.cjkPunct = SpriteSheet(
@@ -43,15 +45,13 @@ class GameFontImpl : GameFontBase() {
"./assets/graphics/fonts/wenquanyi_11pt_part2.tga", 16, 18, 2)
GameFontBase.greekSheet = SpriteSheet(
"./assets/graphics/fonts/greek_variable.tga", 15, 19, 1)
GameFontBase.romanianSheet = SpriteSheet(
"./assets/graphics/fonts/romana_wide.tga", GameFontBase.W_LATIN_WIDE, GameFontBase.H)
GameFontBase.romanianSheetNarrow = SpriteSheet(
"./assets/graphics/fonts/romana_narrow.tga", GameFontBase.W_LATIN_NARROW, GameFontBase.H)
val shk = arrayOf(
GameFontBase.asciiSheet,
GameFontBase.hangulSheet,
null, // here was customised runic sheet
GameFontBase.extASheet,
GameFontBase.extBSheet,
GameFontBase.kanaSheet,
GameFontBase.cjkPunct,
null, // Full unihan, filler because we're using WenQuanYi
@@ -60,16 +60,24 @@ class GameFontImpl : GameFontBase() {
GameFontBase.uniPunct,
GameFontBase.wenQuanYi_1,
GameFontBase.wenQuanYi_2,
GameFontBase.greekSheet,
GameFontBase.romanianSheet,
GameFontBase.romanianSheetNarrow
GameFontBase.greekSheet
)
GameFontBase.sheetKey = shk
buildWidthTable(asciiSheet, 0, 0..0xFF)
buildWidthTable(extASheet, 0x100, 0..0x7F)
buildWidthTable(cyrilic, 0x400, 0..0x5F)
buildWidthTable(asciiSheet, 0, 0..0xFF)
buildWidthTable(extASheet, 0x100, 0..0x7F)
buildWidthTable(extBSheet, 0x180, 0..0xCF)
buildWidthTable(cyrilic, 0x400, 0..0x5F)
buildWidthTable(greekSheet, 0x370, 0..0x5F)
}
fun reload() {
GameFontBase.cyrilic = SpriteSheet(
when (GameFontDemo.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)
}
}