diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 711d939..d87ff97 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -8,7 +8,10 @@
+
+
+
@@ -29,8 +32,8 @@
-
-
+
+
@@ -48,11 +51,11 @@
-
+
-
-
+
+
@@ -63,17 +66,17 @@
-
-
+
+
-
+
-
-
+
+
@@ -127,6 +130,7 @@
fun getSh
codeRange
isHangul
+ Ᏽ
.141
@@ -145,9 +149,9 @@
-
-
+
+
@@ -422,7 +426,6 @@
-
@@ -688,27 +691,27 @@
-
+
-
-
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
+
+
diff --git a/FontTestGDX/demotext.txt b/FontTestGDX/demotext.txt
index daeb713..ec2da16 100644
--- a/FontTestGDX/demotext.txt
+++ b/FontTestGDX/demotext.txt
@@ -26,6 +26,9 @@ How multilingual? Real multilingual!
Գրիչս վայր դրի, վեր կացա և պատրաստվում էի, որ քնեմ, երբ հանկարծ դռանս զանգակը հնչեց
Zəfər, jaketini də papağını da götür, bu axşam hava çox soyuq olacaq
Под южно дърво, цъфтящо в синьо, бягаше малко пухкаво зайче
+ ᎠᏍᎦᏯᎡᎦᎢᎾᎨᎢᎣᏍᏓᎤᎩᏍᏗᎥᎴᏓᎯᎲᎢᏔᎵᏕᎦᏟᏗᏖᎸᎳᏗᏗᎧᎵᎢᏘᎴᎩ ᏙᏱᏗᏜᏫᏗᏣᏚᎦᏫᏛᏄᏓᎦᏝᏃᎠᎾᏗᎭᏞᎦᎯᎦᏘᏓᏠᎨᏏᏕᏡᎬᏢᏓᏥᏩᏝᎡᎢᎪᎢ
+ ᎠᎦᏂᏗᎮᎢᎫᎩᎬᏩᎴᎢᎠᏆᏅᏛᎫᏊᎾᎥᎠᏁᏙᎲᏐᏈᎵᎤᎩᎸᏓᏭᎷᏤᎢᏏᏉᏯᏌᏊ ᎤᏂᏋᎢᏡᎬᎢᎰᏩᎬᏤᎵᏍᏗᏱᎩᎱᎱᎤᎩᎴᎢᏦᎢᎠᏂᏧᏣᏨᎦᏥᎪᎥᏌᏊᎤᎶᏒᎢᎢᏡᎬᎢ
+ ᎹᎦᎺᎵᏥᎻᎼᏏᎽᏗᏩᏂᎦᏘᎾᎿᎠᏁᎬᎢᏅᎩᎾᏂᎡᎢᏌᎶᎵᏎᎷᎠᏑᏍᏗᏪᎩ ᎠᎴ ᏬᏗᏲᏭᎾᏓᏍᏓᏴᏁᎢᎤᎦᏅᏮᏰᎵᏳᏂᎨᎢ
Příliš žluťoučký kůň úpěl ďábelské ódy
Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Walther spillede på xylofon
Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich
@@ -73,9 +76,17 @@ Colour-code that supports 65535 opaque or semi-transparent colours via 4 bit ARG
Control characters to support Bulgarian and Serbian letter shapes on the fly
+ Press to pay respects—or is it , or …
+
+Custom symbols for video games
+
+ Can you distinguish following dashes: - – — - – — – - ――――――――――― 48–63 48-63
+
+For all those dash-pedants, we have en-dash, em-dash, and even horizontal bars!
+
Unicode References:
Basic Latin Latin-1 Latin Extension A Latin Extionsion B IPA Extension Greek Cyrillic Cyrillic Supplement
- Armenian Thai Georgian Runic General Punctuations CJK Symbols Kana CJK Unihan Extension A CJK Unihan
- Hangul Syllables Fullwidth Forms
+ Armenian Thai Georgian Runic Cherokee General Punctuations CJK Symbols Kana CJK Unihan Extension A
+ CJK Unihan Hangul Syllables Fullwidth Forms
diff --git a/FontTestGDX/lib/TerrarumSansBitmap.jar b/FontTestGDX/lib/TerrarumSansBitmap.jar
index 8fafe34..8e8d530 100644
Binary files a/FontTestGDX/lib/TerrarumSansBitmap.jar and b/FontTestGDX/lib/TerrarumSansBitmap.jar differ
diff --git a/FontTestGDX/src/FontTestGDX.kt b/FontTestGDX/src/FontTestGDX.kt
index a0a3771..c7748ed 100644
--- a/FontTestGDX/src/FontTestGDX.kt
+++ b/FontTestGDX/src/FontTestGDX.kt
@@ -135,6 +135,10 @@ class FontTestGDX : Game() {
println(font.charsetOverrideSerbian)
println(font.noColorCode)
println(font.toColorCode(0xFFFF))
+
+ println(0xE026.toChar())
+ println(0xE078.toChar())
+ println(0xE073.toChar())
}
override fun getScreen(): Screen? {
diff --git a/PUA_allocation_chart.xlsx b/PUA_allocation_chart.xlsx
new file mode 100644
index 0000000..9fc9005
Binary files /dev/null and b/PUA_allocation_chart.xlsx differ
diff --git a/assets/LatinExtB_variable.tga b/assets/LatinExtB_variable.tga
index 7cd6d7e..06c048c 100644
Binary files a/assets/LatinExtB_variable.tga and b/assets/LatinExtB_variable.tga differ
diff --git a/assets/tsalagi_variable.tga b/assets/tsalagi_variable.tga
new file mode 100644
index 0000000..e468b3f
Binary files /dev/null and b/assets/tsalagi_variable.tga differ
diff --git a/assets/unipunct_variable.tga b/assets/unipunct_variable.tga
index 7048f41..9be4fd9 100644
Binary files a/assets/unipunct_variable.tga and b/assets/unipunct_variable.tga differ
diff --git a/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt b/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt
index 8308dde..3997a7c 100644
--- a/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt
+++ b/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt
@@ -134,6 +134,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
private fun isCharsetOverrideHigh(c: Char) = c.toInt() in 0xDFF8..0xDFFF // only works with JVM (which uses UTF-16 internally)
private fun isCharsetOverrideLow(c: Char) = c.toInt() == 0xDBBF // only works with JVM (which uses UTF-16 internally)
private fun isBulgarian(c: Char) = c.toInt() in 0x400..0x45F
+ private fun isCherokee(c: Char) = c.toInt() in codeRange[SHEET_TSALAGI_VARW]
private fun extAindexX(c: Char) = (c.toInt() - 0x100) % 16
@@ -184,6 +185,9 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
private fun latinExtAddX(c: Char) = (c.toInt() - 0x1E00) % 16
private fun latinExtAddY(c: Char) = (c.toInt() - 0x1E00) / 16
+ private fun cherokeeIndexX(c: Char) = (c.toInt() - 0x13A0) % 16
+ private fun cherokeeIndexY(c: Char) = (c.toInt() - 0x13A0) / 16
+
private fun getColour(charHigh: Char, charLow: Char): Color { // input: 0x10ARGB, out: RGBA8888
val codePoint = Character.toCodePoint(charHigh, charLow)
@@ -221,7 +225,8 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
SHEET_IPA_VARW,
SHEET_LATIN_EXT_ADD_VARW,
SHEET_BULGARIAN_VARW,
- SHEET_SERBIAN_VARW
+ SHEET_SERBIAN_VARW,
+ SHEET_TSALAGI_VARW
)
private val fontParentDir = if (fontDir.endsWith('/') || fontDir.endsWith('\\')) fontDir else "$fontDir/"
@@ -245,7 +250,8 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
"latinExt_additional_variable.tga",
"puae000-e0ff.tga",
"cyrilic_bulgarian_variable.tga",
- "cyrilic_serbian_variable.tga"
+ "cyrilic_serbian_variable.tga",
+ "tsalagi_variable.tga"
)
private val codeRange = arrayOf( // MUST BE MATCHING WITH SHEET INDICES!!
0..0xFF,
@@ -267,7 +273,8 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
0x1E00..0x1EFF,
0xE000..0xE0FF,
0xF00000..0xF0005F, // assign them to PUA
- 0xF00060..0xF000BF // assign them to PUA
+ 0xF00060..0xF000BF, // assign them to PUA
+ 0x13A0..0x13F5
)
private val glyphWidths: HashMap = HashMap() // if the value is negative, it's diacritics
private val sheets: Array
@@ -646,6 +653,8 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
return SHEET_RUNIC
else if (isLatinExtAdd(c))
return SHEET_LATIN_EXT_ADD_VARW
+ else if (isCherokee(c))
+ return SHEET_TSALAGI_VARW
else
return SHEET_UNKNOWN
// fixed width
@@ -723,6 +732,10 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
sheetX = cyrilicIndexX(ch)
sheetY = cyrilicIndexY(ch)
}
+ SHEET_TSALAGI_VARW -> {
+ sheetX = cherokeeIndexX(ch)
+ sheetY = cherokeeIndexY(ch)
+ }
else -> {
sheetX = ch.toInt() % 16
sheetY = ch.toInt() / 16
@@ -823,6 +836,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
internal val SHEET_CUSTOM_SYM = 17
internal val SHEET_BULGARIAN_VARW = 18
internal val SHEET_SERBIAN_VARW = 19
+ internal val SHEET_TSALAGI_VARW = 20
internal val SHEET_UNKNOWN = 254