A wild Cherokee language appeared!

This commit is contained in:
minjaesong
2018-07-28 04:52:42 +09:00
parent 55bdaef897
commit dca8ed7392
9 changed files with 61 additions and 29 deletions

51
.idea/workspace.xml generated
View File

@@ -8,7 +8,10 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="22c5bc80-996c-4846-b173-7dc8c2096fe3" name="Default" comment=""> <list default="true" id="22c5bc80-996c-4846-b173-7dc8c2096fe3" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/FontTestGDX/demotext.txt" beforeDir="false" afterPath="$PROJECT_DIR$/FontTestGDX/demotext.txt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/FontTestGDX/demotext.txt" beforeDir="false" afterPath="$PROJECT_DIR$/FontTestGDX/demotext.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/FontTestGDX/lib/TerrarumSansBitmap.jar" beforeDir="false" afterPath="$PROJECT_DIR$/FontTestGDX/lib/TerrarumSansBitmap.jar" afterDir="false" />
<change beforePath="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" beforeDir="false" afterPath="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" beforeDir="false" afterPath="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/assets/LatinExtB_variable.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/LatinExtB_variable.tga" afterDir="false" />
<change beforePath="$PROJECT_DIR$/assets/unipunct_variable.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/unipunct_variable.tga" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/out/" /> <ignored path="$PROJECT_DIR$/out/" />
@@ -29,8 +32,8 @@
<file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="true"> <file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt"> <entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="393"> <state relative-caret-position="390">
<caret line="197" column="25" lean-forward="true" selection-start-line="197" selection-start-column="25" selection-end-line="197" selection-end-column="25" /> <caret line="726" column="41" lean-forward="true" selection-start-line="726" selection-start-column="41" selection-end-line="726" selection-end-column="41" />
</state> </state>
</provider> </provider>
</entry> </entry>
@@ -48,11 +51,11 @@
</split-first> </split-first>
<split-second> <split-second>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="FontTestGDX.kt" pinned="false" current-in-tab="true"> <file leaf-file-name="FontTestGDX.kt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt"> <entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="244"> <state relative-caret-position="569">
<caret line="61" column="19" lean-forward="true" selection-start-line="61" selection-start-column="19" selection-end-line="61" selection-end-column="19" /> <caret line="140" column="8" lean-forward="true" selection-start-line="140" selection-start-column="8" selection-end-line="140" selection-end-column="8" />
<folding> <folding>
<element signature="e#48#162#0" expanded="true" /> <element signature="e#48#162#0" expanded="true" />
</folding> </folding>
@@ -63,17 +66,17 @@
<file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="false"> <file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt"> <entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="460"> <state relative-caret-position="-242">
<caret line="270" column="5" lean-forward="true" selection-start-line="270" selection-start-column="5" selection-end-line="270" selection-end-column="5" /> <caret line="277" column="5" lean-forward="true" selection-start-line="277" selection-start-column="5" selection-end-line="277" selection-end-column="5" />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="demotext.txt" pinned="false" current-in-tab="false"> <file leaf-file-name="demotext.txt" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/FontTestGDX/demotext.txt"> <entry file="file://$PROJECT_DIR$/FontTestGDX/demotext.txt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="514"> <state relative-caret-position="864">
<caret line="67" column="78" selection-start-line="67" selection-start-column="78" selection-end-line="67" selection-end-column="78" /> <caret line="82" column="78" selection-start-line="82" selection-start-column="78" selection-end-line="82" selection-end-column="78" />
</state> </state>
</provider> </provider>
</entry> </entry>
@@ -127,6 +130,7 @@
<find>fun getSh</find> <find>fun getSh</find>
<find>codeRange</find> <find>codeRange</find>
<find>isHangul</find> <find>isHangul</find>
<find></find>
</findStrings> </findStrings>
<replaceStrings> <replaceStrings>
<replace>.141</replace> <replace>.141</replace>
@@ -145,9 +149,9 @@
<option value="$PROJECT_DIR$/LICENSE.md" /> <option value="$PROJECT_DIR$/LICENSE.md" />
<option value="$PROJECT_DIR$/README.md" /> <option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/slick2d/GameFontBase.kt" /> <option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/slick2d/GameFontBase.kt" />
<option value="$PROJECT_DIR$/FontTestGDX/demotext.txt" />
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" />
<option value="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" /> <option value="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" />
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" />
<option value="$PROJECT_DIR$/FontTestGDX/demotext.txt" />
</list> </list>
</option> </option>
</component> </component>
@@ -422,7 +426,6 @@
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="1912" y="-521" width="1936" height="1176" extended-state="6" /> <frame x="1912" y="-521" width="1936" height="1176" extended-state="6" />
<editor active="true" />
<layout> <layout>
<window_info anchor="right" id="Palette" order="3" /> <window_info anchor="right" id="Palette" order="3" />
<window_info anchor="bottom" id="TODO" order="6" /> <window_info anchor="bottom" id="TODO" order="6" />
@@ -688,27 +691,27 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/FontTestGDX/demotext.txt"> <entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="514"> <state relative-caret-position="569">
<caret line="67" column="78" selection-start-line="67" selection-start-column="78" selection-end-line="67" selection-end-column="78" /> <caret line="140" column="8" lean-forward="true" selection-start-line="140" selection-start-column="8" selection-end-line="140" selection-end-column="8" />
<folding>
<element signature="e#48#162#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt"> <entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="460"> <state relative-caret-position="-242">
<caret line="270" column="5" lean-forward="true" selection-start-line="270" selection-start-column="5" selection-end-line="270" selection-end-column="5" /> <caret line="277" column="5" lean-forward="true" selection-start-line="277" selection-start-column="5" selection-end-line="277" selection-end-column="5" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt"> <entry file="file://$PROJECT_DIR$/FontTestGDX/demotext.txt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="244"> <state relative-caret-position="864">
<caret line="61" column="19" lean-forward="true" selection-start-line="61" selection-start-column="19" selection-end-line="61" selection-end-column="19" /> <caret line="82" column="78" selection-start-line="82" selection-start-column="78" selection-end-line="82" selection-end-column="78" />
<folding>
<element signature="e#48#162#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>

View File

@@ -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 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 Příliš žluťoučký kůň úpěl ďábelské ódy
Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Walther spillede på xylofon 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 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 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: - — - - ――――――――――― 4863 48-63
For all those dash-pedants, we have en-dash, em-dash, and even horizontal bars!
Unicode References: Unicode References:
Basic Latin Latin-1 Latin Extension A Latin Extionsion B IPA Extension Greek Cyrillic Cyrillic Supplement 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 Armenian Thai Georgian Runic Cherokee General Punctuations CJK Symbols Kana CJK Unihan Extension A
Hangul Syllables Fullwidth Forms CJK Unihan Hangul Syllables Fullwidth Forms

View File

@@ -135,6 +135,10 @@ class FontTestGDX : Game() {
println(font.charsetOverrideSerbian) println(font.charsetOverrideSerbian)
println(font.noColorCode) println(font.noColorCode)
println(font.toColorCode(0xFFFF)) println(font.toColorCode(0xFFFF))
println(0xE026.toChar())
println(0xE078.toChar())
println(0xE073.toChar())
} }
override fun getScreen(): Screen? { override fun getScreen(): Screen? {

BIN
PUA_allocation_chart.xlsx Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 260 KiB

BIN
assets/tsalagi_variable.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View File

@@ -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 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 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 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 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 latinExtAddX(c: Char) = (c.toInt() - 0x1E00) % 16
private fun latinExtAddY(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 private fun getColour(charHigh: Char, charLow: Char): Color { // input: 0x10ARGB, out: RGBA8888
val codePoint = Character.toCodePoint(charHigh, charLow) 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_IPA_VARW,
SHEET_LATIN_EXT_ADD_VARW, SHEET_LATIN_EXT_ADD_VARW,
SHEET_BULGARIAN_VARW, SHEET_BULGARIAN_VARW,
SHEET_SERBIAN_VARW SHEET_SERBIAN_VARW,
SHEET_TSALAGI_VARW
) )
private val fontParentDir = if (fontDir.endsWith('/') || fontDir.endsWith('\\')) fontDir else "$fontDir/" 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", "latinExt_additional_variable.tga",
"puae000-e0ff.tga", "puae000-e0ff.tga",
"cyrilic_bulgarian_variable.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!! private val codeRange = arrayOf( // MUST BE MATCHING WITH SHEET INDICES!!
0..0xFF, 0..0xFF,
@@ -267,7 +273,8 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
0x1E00..0x1EFF, 0x1E00..0x1EFF,
0xE000..0xE0FF, 0xE000..0xE0FF,
0xF00000..0xF0005F, // assign them to PUA 0xF00000..0xF0005F, // assign them to PUA
0xF00060..0xF000BF // assign them to PUA 0xF00060..0xF000BF, // assign them to PUA
0x13A0..0x13F5
) )
private val glyphWidths: HashMap<Int, Int> = HashMap() // if the value is negative, it's diacritics private val glyphWidths: HashMap<Int, Int> = HashMap() // if the value is negative, it's diacritics
private val sheets: Array<TextureRegionPack> private val sheets: Array<TextureRegionPack>
@@ -646,6 +653,8 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
return SHEET_RUNIC return SHEET_RUNIC
else if (isLatinExtAdd(c)) else if (isLatinExtAdd(c))
return SHEET_LATIN_EXT_ADD_VARW return SHEET_LATIN_EXT_ADD_VARW
else if (isCherokee(c))
return SHEET_TSALAGI_VARW
else else
return SHEET_UNKNOWN return SHEET_UNKNOWN
// fixed width // fixed width
@@ -723,6 +732,10 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
sheetX = cyrilicIndexX(ch) sheetX = cyrilicIndexX(ch)
sheetY = cyrilicIndexY(ch) sheetY = cyrilicIndexY(ch)
} }
SHEET_TSALAGI_VARW -> {
sheetX = cherokeeIndexX(ch)
sheetY = cherokeeIndexY(ch)
}
else -> { else -> {
sheetX = ch.toInt() % 16 sheetX = ch.toInt() % 16
sheetY = 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_CUSTOM_SYM = 17
internal val SHEET_BULGARIAN_VARW = 18 internal val SHEET_BULGARIAN_VARW = 18
internal val SHEET_SERBIAN_VARW = 19 internal val SHEET_SERBIAN_VARW = 19
internal val SHEET_TSALAGI_VARW = 20
internal val SHEET_UNKNOWN = 254 internal val SHEET_UNKNOWN = 254