selectively skipping spritesheets

This commit is contained in:
minjaesong
2018-08-24 02:36:29 +09:00
parent 2702f850c2
commit 32290dd504
12 changed files with 151 additions and 248 deletions

198
.idea/workspace.xml generated
View File

@@ -7,12 +7,18 @@
</component>
<component name="ChangeListManager">
<list default="true" id="22c5bc80-996c-4846-b173-7dc8c2096fe3" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CONTRIBUTING.md" beforeDir="false" afterPath="$PROJECT_DIR$/CONTRIBUTING.md" 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$/assets/ascii_variable.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/ascii_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$/demo.PNG" beforeDir="false" afterPath="$PROJECT_DIR$/demo.PNG" 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$/PUA_allocation_chart.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/PUA_allocation_chart.xlsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/assets/LatinExtA_variable.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/LatinExtA_variable.tga" afterDir="false" />
<change beforePath="$PROJECT_DIR$/assets/ascii_variable.tga" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/demotext.txt" beforeDir="false" afterPath="$PROJECT_DIR$/demotext.txt" 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$/testing.PNG" beforeDir="false" afterPath="$PROJECT_DIR$/testing.PNG" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testtext.txt" beforeDir="false" afterPath="$PROJECT_DIR$/testtext.txt" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -32,8 +38,8 @@
<file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="469">
<caret line="280" column="26" selection-start-line="280" selection-start-column="26" selection-end-line="280" selection-end-column="26" />
<state relative-caret-position="533">
<caret line="383" column="30" selection-start-line="383" selection-start-column="30" selection-end-line="383" selection-end-column="30" />
</state>
</provider>
</entry>
@@ -56,20 +62,25 @@
</provider>
</entry>
</file>
<file leaf-file-name="demo.PNG" pinned="false" current-in-tab="true">
<file leaf-file-name="demo.PNG" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/demo.PNG">
<provider selected="true" editor-type-id="images" />
</entry>
</file>
<file leaf-file-name="testing.PNG" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/testing.PNG">
<provider selected="true" editor-type-id="images" />
</entry>
</file>
</leaf>
</split-first>
<split-second>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="FontTestGDX.kt" pinned="false" current-in-tab="false">
<file leaf-file-name="FontTestGDX.kt" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="559">
<caret line="43" column="32" selection-start-line="43" selection-start-column="32" selection-end-line="43" selection-end-column="32" />
<state relative-caret-position="455">
<caret line="41" column="44" selection-start-line="41" selection-start-column="44" selection-end-line="41" selection-end-column="44" />
<folding>
<element signature="e#0#384#0" expanded="true" />
</folding>
@@ -80,8 +91,8 @@
<file leaf-file-name="testtext.txt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/testtext.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="52">
<caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" />
<state relative-caret-position="13">
<caret line="1" column="12" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" />
</state>
</provider>
</entry>
@@ -89,17 +100,17 @@
<file leaf-file-name="demotext.txt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/demotext.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="508">
<caret line="94" column="36" selection-start-line="94" selection-start-column="36" selection-end-line="94" selection-end-column="36" />
<state relative-caret-position="547">
<caret line="79" column="34" selection-start-line="79" selection-start-column="34" selection-end-line="79" selection-end-column="34" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="true">
<file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="381">
<caret line="983" column="31" lean-forward="true" selection-start-line="983" selection-start-column="31" selection-end-line="983" selection-end-column="31" />
<state relative-caret-position="108">
<caret line="912" selection-start-line="912" selection-end-line="912" />
</state>
</provider>
</entry>
@@ -108,8 +119,8 @@
<entry file="file://$PROJECT_DIR$/CONTRIBUTING.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="663">
<caret line="51" column="45" selection-start-line="51" selection-start-column="45" selection-end-line="51" selection-end-column="45" />
<first_editor relative-caret-position="429">
<caret line="94" column="176" selection-start-line="94" selection-start-column="176" selection-end-line="94" selection-end-column="176" />
</first_editor>
<second_editor>
<js_state />
@@ -131,8 +142,8 @@
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="325">
<caret line="25" column="97" selection-start-line="25" selection-start-column="97" selection-end-line="25" selection-end-column="97" />
<first_editor relative-caret-position="143">
<caret line="11" column="175" selection-start-line="11" selection-start-column="175" selection-end-line="11" selection-end-column="175" />
</first_editor>
<second_editor>
<js_state />
@@ -154,12 +165,6 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>Unexp</find>
<find>fun getSh</find>
<find>codeRange</find>
<find>isHangul</find>
<find></find>
<find>toColo</find>
<find>fun relo</find>
<find>3633</find>
<find>println(</find>
@@ -184,6 +189,12 @@
<find>joiner</find>
<find>va-</find>
<find>'</find>
<find>on the</find>
<find>FFFF</find>
<find>FFFF8</find>
<find>pro</find>
<find>system</find>
<find>this font</find>
</findStrings>
<replaceStrings>
<replace>.141</replace>
@@ -204,15 +215,15 @@
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/testbed/FontTestGDX.kt" />
<option value="$PROJECT_DIR$/LICENSE.md" />
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/slick2d/GameFontBase.kt" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/FontTestGDX/demotext.txt" />
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/GameFontBase.kt" />
<option value="$PROJECT_DIR$/CONTRIBUTORS.txt" />
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/GlyphProps.kt" />
<option value="$PROJECT_DIR$/CONTRIBUTING.md" />
<option value="$PROJECT_DIR$/testtext.txt" />
<option value="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/demotext.txt" />
<option value="$PROJECT_DIR$/testtext.txt" />
<option value="$PROJECT_DIR$/CONTRIBUTING.md" />
<option value="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" />
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" />
</list>
</option>
@@ -557,18 +568,6 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="325">
<caret line="25" column="97" selection-start-line="25" selection-start-column="97" selection-end-line="25" selection-end-column="97" />
</first_editor>
<second_editor>
<js_state />
</second_editor>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="SPLIT">
@@ -855,47 +854,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="325">
<caret line="25" column="97" selection-start-line="25" selection-start-column="97" selection-end-line="25" selection-end-column="97" />
</first_editor>
<second_editor>
<js_state />
</second_editor>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/GlyphProps.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="91">
<caret line="7" column="22" selection-start-line="7" selection-start-column="22" selection-end-line="7" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CONTRIBUTING.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="663">
<caret line="51" column="45" selection-start-line="51" selection-start-column="45" selection-end-line="51" selection-end-column="45" />
</first_editor>
<second_editor>
<js_state />
</second_editor>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="559">
<caret line="43" column="32" selection-start-line="43" selection-start-column="32" selection-end-line="43" selection-end-column="32" />
<folding>
<element signature="e#0#384#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CONTRIBUTORS.txt">
<provider selected="true" editor-type-id="text-editor">
<state>
@@ -903,6 +861,18 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="143">
<caret line="11" column="175" selection-start-line="11" selection-start-column="175" selection-end-line="11" selection-end-column="175" />
</first_editor>
<second_editor>
<js_state />
</second_editor>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/slick2d/GameFontBase.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234">
@@ -910,29 +880,61 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/GlyphProps.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="91">
<caret line="7" column="22" selection-start-line="7" selection-start-column="22" selection-end-line="7" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testtext.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="52">
<caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" />
<state relative-caret-position="13">
<caret line="1" column="12" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demotext.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="547">
<caret line="79" column="34" selection-start-line="79" selection-start-column="34" selection-end-line="79" selection-end-column="34" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CONTRIBUTING.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="429">
<caret line="94" column="176" selection-start-line="94" selection-start-column="176" selection-end-line="94" selection-end-column="176" />
</first_editor>
<second_editor>
<js_state />
</second_editor>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="455">
<caret line="41" column="44" selection-start-line="41" selection-start-column="44" selection-end-line="41" selection-end-column="44" />
<folding>
<element signature="e#0#384#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="533">
<caret line="383" column="30" selection-start-line="383" selection-start-column="30" selection-end-line="383" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo.PNG">
<provider selected="true" editor-type-id="images" />
</entry>
<entry file="file://$PROJECT_DIR$/demotext.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="508">
<caret line="94" column="36" selection-start-line="94" selection-start-column="36" selection-end-line="94" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="381">
<caret line="983" column="31" lean-forward="true" selection-start-line="983" selection-start-column="31" selection-end-line="983" selection-end-column="31" />
</state>
</provider>
<entry file="file://$PROJECT_DIR$/testing.PNG">
<provider selected="true" editor-type-id="images" />
</entry>
</component>
<component name="masterDetails">

View File

@@ -1,4 +1,4 @@
#### Pixel Artists Wanted: for Arabic (all four forms) and other Indian scripts. Must willing to follow the styles and have a knowledge in Unicode. Your name will be inscribed in the list of contributors.
#### Pixel Artists Wanted: for Arabic (all four forms) and other Indian scripts (all the ligatures). Must willing to follow the styles and have a knowledge in Unicode. Your name will be inscribed in the list of contributors.
You can contribute to the font by fixing wrong glyphs, suggesting better ones, extending character set (letters for other writing systems or filling in the blanks on the existing ones), or code for other game frameworks (not limited to Java). Please leave pull request for that.
@@ -7,7 +7,7 @@ Font Spritesheets are stored in ```assets/graphics/fonts``` directory. Image for
#### Before getting started, you did read our design goals, right? Good. Now you may continue your awesome work.
### Ascenders, descenders, width informations
### Ascenders, descenders, width informations (aka Glyph Tags)
![Alas, use more modern browser or get better internet connexion!](glyph_height_pos_annotation.png)
@@ -89,6 +89,11 @@ Also note that the font compiler will not "stack" these diacritics.
(fun fact: it was drawn on Rhodia memopad with Lamy 2000, then photographed and edited on my iPhone. Letter used is a Cherokee WE Ꮺ)
### Technical Limitations
- Each spritesheet is 4096x4096 maximum, which is a size of 4K Texture. However it is recommended to be smaller or equal to 1024x1024.
- Glyphs exceeding 15px of width needs to be broken down with 2 or more characters. Wider sheets WILL NOT BE IMPLEMENTED, can't waste much pixels just for few superwide glyphs.
### Implementing the Korean writing system
On this font, Hangul letters are printed by assemblying two or three letter pieces. There are 10 sets of Hangul letter pieces on the font. Top 6 are initials, middle 2 are medials, and bottom 2 are finals. On the rightmost side, there's eight assembled glyphs to help you with (assuming you have basic knowledge on the writing system). Top 6 tells you how to use 6 initials, and bottom 2 tells you how to use 2 finals.

View File

@@ -27,7 +27,7 @@ class FontTestGDX : Game() {
private val outimageName = "testing.png"
override fun create() {
font = GameFontBase("./assets", flipY = false, errorOnUnknownChar = true) // must test for two flipY cases
font = GameFontBase("./assets", flipY = false, errorOnUnknownChar = false) // must test for two flipY cases
val inTextFile = Gdx.files.internal("./$demotextName")
val reader = inTextFile.reader("UTF-8")
@@ -39,107 +39,9 @@ class FontTestGDX : Game() {
println("START")
val l = intArrayOf(0xFF00,
0xFF10,
0xFF20,
0xFF30,
0xFF40,
0xFF50,
0xFF60,
0xFF70,
0xFF80,
0xFF90,
0xFFA0,
0xFFB0,
0xFFC0,
0xFFD0,
0xFFE0,
0xFFF0,
0xFEF0,
0xFDF0,
0xFCF0,
0xFBF0,
0xFAF0,
0xF9F0,
0xF8F0,
0xF7F0,
0xF6F0,
0xF5F0,
0xF4F0,
0xF3F0,
0xF2F0,
0xF1F0,
0xF0F0,
0xF0F1,
0xF0F2,
0xF0F3,
0xF0F4,
0xF0F5,
0xF0F6,
0xF0F7,
0xF0F8,
0xF0F9,
0xF0FA,
0xF0FB,
0xF0FC,
0xF0FD,
0xF0FE,
0xF0FF,
0xF0EF,
0xF0DF,
0xF0CF,
0xF0BF,
0xF0AF,
0xF09F,
0xF08F,
0xF07F,
0xF06F,
0xF05F,
0xF04F,
0xF03F,
0xF02F,
0xF01F,
0xF00F,
0xF10F,
0xF20F,
0xF30F,
0xF40F,
0xF50F,
0xF60F,
0xF70F,
0xF80F,
0xF90F,
0xFA0F,
0xFB0F,
0xFC0F,
0xFD0F,
0xFE0F,
0xFF0F)
val s = "ᚱᛂᚴᛋᛂᛋᛏᛋᚮᚾᛔᚢᛏᛚᚮᛋ᛬ᚱᛂᚴᛋᛋᚢᚼᚾᚢᛘᚢᛚᚾᛏᚮ᛬ᛏᚮᛋᛁᚮᚵᛂᚢᛏᚮᚱᛘᛔᚱᛂᚴᛋᛏ᛭ᛋᚢᚼᚾᚢᛋᛘᚮᛁᚵᚾᛁᛂᛏᚮᛑ᛭ᚵᛂᚢᛏᚮᚱ"
var lc = 0
var sc = 0
while (lc < l.size) {
print(font.toColorCode(l[lc]))
print(s[sc])
lc++
sc++
if (sc == s.length) break
if (s[sc] == ' ') {
print(" ")
sc++
}
}
println("${font.noColorCode}\nEND")
println(font.toColorCode(0xF_F07))
println(font.toColorCode(0x0000))
println(font.charsetOverrideDefault)
println(font.charsetOverrideBulgarian)
println(font.charsetOverrideSerbian)
frameBuffer = FrameBuffer(Pixmap.Format.RGBA8888, TEXW, TEXH, true)

Binary file not shown.

View File

@@ -9,7 +9,7 @@ The JAR package is meant to be used with Slick2d (extends ```Font``` class) and
The issue page is open. If you have some issues to submit, or have a question, please leave it on the page.
#### Little notes
- To display Bulgarian/Serbian variants, you need special Control Characters. (GameFontBase.charsetOverrideBulgarian -- U+FFFF9; GameFontBase.charsetOverrideSerbian -- U+FFFFA)
- To display Bulgarian/Serbian variants, you need special Control Characters. (GameFontBase.charsetOverrideBulgarian -- U+FFFC1; GameFontBase.charsetOverrideSerbian -- U+FFFC2)
- All Han characters are in Chinese variant, no other variants are to be supported as most Chinese, Japanese and Korean can understand other's variant and to be honest, we don't bother anyway.
- Indian script in general is not perfect: this font will never do the proper ligatures (I can't draw all the 1 224 possible combinations). Hopefully it's still be able to understand without them.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -27,7 +27,7 @@ How multilingual? Real multilingual!
􏻬ՄՇԱԿԻՉ ԿԱՄ ԿԵՆՏՐՈՆԱԿԱՆ ՄՇԱԿԻՉ ՀԱՆԳՈՒՅՑԸ ՀԱՆԴԻՍԱՆՈՒՄ Է ՀԱՄԱԿԱՐԳՉԻ ՍԱՐՔԱՎՈՐՈՒՄՆԵՐԻՑ􀀀
􏻬Zəfər, jaketini də papağını da götür, bu axşam hava çox soyuq olacaq􀀀
􏻬আমি কাঁচ খেতে পারি, তাতে আমার কোনো ক্ষতি হয় না। 􀀀
􏻬󿿹Под южно дърво, цъфтящо в синьо, бягаше малко пухкаво зайче󿿸􀀀
􏻬󿿁Под южно дърво, цъфтящо в синьо, бягаше малко пухкаво зайче󿿀􀀀
􏻬ᎠᏍᎦᏯᎡᎦᎢᎾᎨᎢᎣᏍᏓᎤᎩᏍᏗᎥᎴᏓᎯᎲᎢᏔᎵᏕᎦᏟᏗᏖᎸᎳᏗᏗᎧᎵᎢᏘᎴᎩ ᏙᏱᏗᏜᏫᏗᏣᏚᎦᏫᏛᏄᏓᎦᏝᏃᎠᎾᏗᎭᏞᎦᎯᎦᏘᏓᏠᎨᏏᏕᏡᎬᏢᏓᏥᏩᏝᎡᎢᎪᎢ􀀀
􏻬ᎠᎦᏂᏗᎮᎢᎫᎩᎬᏩᎴᎢᎠᏆᏅᏛᎫᏊᎾᎥᎠᏁᏙᎲᏐᏈᎵᎤᎩᎸᏓᏭᎷᏤᎢᏏᏉᏯᏌᏊ ᎤᏂᏋᎢᏡᎬᎢᎰᏩᎬᏤᎵᏍᏗᏱᎩᎱᎱᎤᎩᎴᎢᏦᎢᎠᏂᏧᏣᏨᎦᏥᎪᎥᏌᏊᎤᎶᏒᎢᎢᏡᎬᎢ􀀀
􏻬ᎹᎦᎺᎵᏥᎻᎼᏏᎽᏗᏩᏂᎦᏘᎾᎿᎠᏁᎬᎢᏅᎩᎾᏂᎡᎢᏌᎶᎵᏎᎷᎠᏑᏍᏗᏪᎩ ᎠᎴ ᏬᏗᏲᏭᎾᏓᏍᏓᏴᏁᎢᎤᎦᏅᏮᏰᎵᏳᏂᎨᎢ􀀀
@@ -54,7 +54,7 @@ How multilingual? Real multilingual!
􏻬कः खगौघाङचिच्छौजा झाञ्ज्ञोऽटौठीडडण्ढणः। तथोदधीन् पफर्बाभीर्मयोऽरिल्वाशिषां सहः॥􀀀
􏻬Înjurând pițigăiat, zoofobul comandă vexat whisky și tequila􀀀
􏻬Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства􀀀
􏻬󿿺Ајшо, лепото и чежњо, за љубав срца мога дођи у Хаџиће на кафу󿿸􀀀
􏻬󿿂Ајшо, лепото и чежњо, за љубав срца мога дођи у Хаџиће на кафу󿿀􀀀
􏻬Jovencillo emponzoñado de whisky: ¡qué figurota exhibe!􀀀
􏻬นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ􀀀
􏻬Pijamalı hasta yağız şoföre çabucak güvendi􀀀
@@ -77,8 +77,8 @@ How multilingual? Real multilingual!
􎳌Colour-code that supports 65535 opaque or semi-transparent colours via 4 bit ARGB􀀀
􏿿󿿹Щиглецът се яде само пържен в юфка без чушки и хвойна󿿸 (Bulgarian)􀀀
􏿿󿿺Љубазни фењерџија чађавог лица хоће да ми покаже штос󿿸 (Serbian)􀀀
􏿿󿿁Щиглецът се яде само пържен в юфка без чушки и хвойна󿿀 (Bulgarian)􀀀
􏿿󿿂Љубазни фењерџија чађавог лица хоће да ми покаже штос󿿀 (Serbian)􀀀
􏿿Разъяренный чтец эгоистично бьёт пятью жердями шустрого фехтовальщика (Russian)􀀀
􎳌Control characters to support Bulgarian and Serbian letter shapes on the fly􀀀

View File

@@ -29,6 +29,7 @@ import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.Pixmap
import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.g2d.*
import com.badlogic.gdx.utils.GdxRuntimeException
import net.torvald.terrarumsansbitmap.GlyphProps
import java.io.BufferedOutputStream
import java.io.FileOutputStream
@@ -65,9 +66,9 @@ typealias CodepointSequence = ArrayList<Int>
*
* - U+100000: Clear colour keys
* - U+100001..U+10FFFF: Colour key (in RGBA order)
* - U+FFFF8: Charset override -- normal (incl. Russian, Ukrainian, etc.)
* - U+FFFF9: Charset override -- Bulgarian
* - U+FFFFA: Charset override -- Serbian
* - U+FFFC0: Charset override -- Default (incl. Russian, Ukrainian, etc.)
* - U+FFFC1: Charset override -- Bulgarian
* - U+FFFC2: Charset override -- Serbian
*
* ## Auto Shift Down
*
@@ -139,7 +140,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
private fun isLatinExtAdd(c: Int) = c in 0x1E00..0x1EFF
private fun isBulgarian(c: Int) = c in 0x400..0x45F
private fun isColourCode(c: Int) = c in 0x100000..0x10FFFF
private fun isCharsetOverride(c: Int) = c in 0xFFFF8..0xFFFFF
private fun isCharsetOverride(c: Int) = c in 0xFFFC0..0xFFFFF
private fun isCherokee(c: Int) = c in codeRange[SHEET_TSALAGI_VARW]
private fun isInsular(c: Int) = c == 0x1D79 || c in 0xA779..0xA787
private fun isNagariBengali(c: Int) = c in codeRange[SHEET_NAGARI_BENGALI_VARW]
@@ -347,7 +348,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
throw Error("[TerrarumSansBitmap] font is enlisted as variable on the name but not named as")
val pixmap: Pixmap
var pixmap: Pixmap
if (isVariable) {
@@ -375,7 +376,17 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
//File(tmpFileName).delete()
}
else {
pixmap = Pixmap(Gdx.files.internal(fontParentDir + it))
try {
pixmap = Pixmap(Gdx.files.internal(fontParentDir + it))
}
catch (e: GdxRuntimeException) {
e.printStackTrace()
// if non-ascii chart is missing, replace it with null sheet
pixmap = Pixmap(1, 1, Pixmap.Format.RGBA8888)
// else, notify by error
if (index != 0) System.exit(1)
}
}
@@ -525,7 +536,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
}
}
else if (isCharsetOverride(c)) {
charsetOverride = c - CHARSET_OVERRIDE_NULL
charsetOverride = c - CHARSET_OVERRIDE_DEFAULT
}
else if (sheetID == SHEET_HANGUL) {
val hangulSheet = sheets[SHEET_HANGUL]
@@ -903,7 +914,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
this.codeRange[SHEET_UNIHAN].forEach { glyphProps[it] = GlyphProps(W_UNIHAN, 0) }
(0xD800..0xDFFF).forEach { glyphProps[it] = GlyphProps(0, 0) }
(0x100000..0x10FFFF).forEach { glyphProps[it] = GlyphProps(0, 0) }
(0xFFFF8..0xFFFFF).forEach { glyphProps[it] = GlyphProps(0, 0) }
(0xFFFA0..0xFFFFF).forEach { glyphProps[it] = GlyphProps(0, 0) }
// manually build width table of Kana Supplements
@@ -1137,7 +1148,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
fun toColorCode(r: Int, g: Int, b: Int, a: Int = 0x0F): String = GameFontBase.toColorCode(r, g, b, a)
val noColorCode = toColorCode(0x0000)
val charsetOverrideNormal = Character.toChars(CHARSET_OVERRIDE_NULL)
val charsetOverrideDefault = Character.toChars(CHARSET_OVERRIDE_DEFAULT)
val charsetOverrideBulgarian = Character.toChars(CHARSET_OVERRIDE_BG_BG)
val charsetOverrideSerbian = Character.toChars(CHARSET_OVERRIDE_SR_SR)
@@ -1204,12 +1215,21 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
internal val SHEET_UNKNOWN = 254
internal val CHARSET_OVERRIDE_NULL = 0xFFFF8
internal val CHARSET_OVERRIDE_BG_BG = 0xFFFF9
internal val CHARSET_OVERRIDE_SR_SR = 0xFFFFA
// custom codepoints
internal val RICH_TEXT_MODIFIER_RUBY_MASTER = 0xFFFA0
internal val RICH_TEXT_MODIFIER_RUBY_SLAVE = 0xFFFA0
internal val RICH_TEXT_MODIFIER_TAG_END = 0xFFFA0
internal val CHARSET_OVERRIDE_DEFAULT = 0xFFFC0
internal val CHARSET_OVERRIDE_BG_BG = 0xFFFC1
internal val CHARSET_OVERRIDE_SR_SR = 0xFFFC2
val charsetOverrideNormal = Character.toChars(CHARSET_OVERRIDE_NULL)
val charsetOverrideDefault = Character.toChars(CHARSET_OVERRIDE_DEFAULT)
val charsetOverrideBulgarian = Character.toChars(CHARSET_OVERRIDE_BG_BG)
val charsetOverrideSerbian = Character.toChars(CHARSET_OVERRIDE_SR_SR)
fun toColorCode(argb4444: Int): String = Character.toChars(0x100000 + argb4444).toColCode()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,28 +1,2 @@
কঁা (incorrect order, ??? rendering)
কাঁ (correct order, ??? rendering)
हैहैहै
সিওল কোরিয়া রাজধানী
सियोल कोरिया की राजधानी है
Received Pronunciation IPA: /ˌɪntəˈnæʃənəl/, [ˌɪntəˈnæʃənəɫ]
General American IPA: /ˌɪntɚˈnæʃənəl/, [ˌɪntɚˈnæʃənəɫ], [ˌɪɾ̃ɚˈnæʃənəɫ]
Rhymes: -ɛntəl (wtf wiktionary ??)
ˈkʰomɐ gɛts ɐ ˈkʰjuɚ wɛl çiəz ə ˈstʌɹi fɔ ˈju ˈsɐɾə ˈpɛɾi wɔz ə bɛtʰəˈna˞li ˈnʌɚs hu hæd bin ˈwʌ˞kɪŋ deɪli æt æn
ˈɔʊl̴də d͡zʉ in ə dɪˈzʌɚtɪdə dɪsˈtɹʷɪkt ɔv zə tʰ ˈtʰɛɹɪtəɹi soʊ ʃi wʌz ˈvɛɹi ˈhæpi s tʉ stat ə njʉ d͡ʒɔb æt ə
ˈsʌbʌb˺ ˈpɹaɪbɛt pɹaktis in noʊsə ˈskweɚ niə zə ˈdjʉk ˈstoʊi ˈtaʊɚ ðæt ˈeɾiə wəz mʌt͡ʃ ˈniɾə fɔ hɐ ænd mɔə
tʉ laɪk˺ hɐ ˈlaɪkiŋgə ˈibn̩ so ɔ̃ ha fa˞st ˈmɔnɪŋ ʃi fɛlt͡s s t͡stɹɛst ʃi eɪt ə bɔl̴ ɔb˺ ˈpɔɹʷɪd͡ʒ t͡ʃɛkt hɐ˞sɛlf ɪn ðə
ˈmiɹəɚ ænd wɑʃt hɐ˞ ɸeɪs ɪn ə ˈhʌ˞li zɛn ʃi pʊt ɑn ə pɹeɪn bə ˈjɛloʊ dɹɛs ænd ə ɸʊlɪɸʊlis ˈd͡ʒækɛt pikt ap
hɐ˞ kʰit ænd ˈhɛdɪdə fɔ ˈwʌ˞kʰ
ˈkʊmɐ gɛts ə ˈkjɚ wɛl̴ ˈɸ͜hi˞ɹɪˈstʌɾi fɔ ʔəju saɹəʔ ˈpɛɹi wɑzə bə ˈbɛtənəɹi bɛt˺ ˈbɛtəˌɹɪnəɹi ənʌs f f hu havə bin
ˈw̰ʌ˞kɪŋ deɹi ʔat˺ ʔan ʔat an ol̴d͜zʉ in zə diˈzɑɹɛd d ˈdistɹɪkt ɔb ðəʔ ˈtɛɹɪtəɹʷi soʊ çi wʌz ˈbɛɹɪ ˈhɑpi tʉ stɑ˞t˺
njʉ ə ˈnjʉ d͡ʒoʊb̥ ɐʔ to s̩ˈpɚb pɹaɪvɛt ˈpɹaktɪs ɪn nɔsˈkwɛɚ niə ðə ˈdʌk sɹit˺ t ˈtɔʌ˞ zat˺ ˈeɹiə wɑz mat͡ʃ ˈniɹɪ ˈniɹə fɔ
hʌ̥ɕʉ̥ fɔ hɚ ændə mɔ̰ mɔə tu ˈħə ˈɹaɪkɪŋ ˈivn̩ zoʊ ɔn ɸ hɐ fɐst mɔɹɪŋ ʃi fɛlt ˈsɹɛɾɛ ɛ̰ ʃi eɪt˺ ʌ boʊl̴ ɔb ˈpɹis æ̃ ˈt͡ʃɛkʰt
ˈhɑsɛlf ɪˈmiɹə and wɔʃt hɐ fʷeɪs ɪn ˈhʌ˞ɹi ʌ ˈðɛn si pʊt ɔn ðə pɹeɪˈjɛɹoʊ ˈdɹɛsɪz an fɹis ˈd͡ʒækɛt n̩ pik ʌpt
ˈhɑ kɪt an ˈhɛdɪd fɔ ə fɔ wɔk fɔ ˈwʌ˞kʰ æ̰̃
acegijmnopqrsuvwxyzɱɳʙɾɽʒʂʐʋɹɻɥɟɡɢʛȵɲŋɴʀɕʑçʝxɣχʁʜʍɰʟɨʉɯuʊøɘɵɤəɛœɜɞʌɔæɐɶɑɒɚɝɩɪʅʈʏʞ
Nijntje Pluis
Nijntje Pluis