more sample text

This commit is contained in:
minjaesong
2018-07-27 01:02:11 +09:00
parent 6a54ea1cca
commit 496c17276d
5 changed files with 245 additions and 42 deletions

74
.idea/workspace.xml generated
View File

@@ -8,9 +8,9 @@
<component name="ChangeListManager">
<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$/assets/cyrilic_bulgarian_variable.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/cyrilic_bulgarian_variable.tga" afterDir="false" />
<change beforePath="$PROJECT_DIR$/assets/cyrilic_serbian_variable.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/cyrilic_serbian_variable.tga" afterDir="false" />
<change beforePath="$PROJECT_DIR$/assets/cyrilic_variable.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/cyrilic_variable.tga" 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$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -30,8 +30,8 @@
<file leaf-file-name="GameFontBase.kt" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="494">
<caret line="530" column="35" lean-forward="true" selection-start-line="530" selection-start-column="35" selection-end-line="530" selection-end-column="35" />
<state relative-caret-position="534">
<caret line="810" column="37" lean-forward="true" selection-start-line="810" selection-start-column="37" selection-end-line="810" selection-end-column="37" />
</state>
</provider>
</entry>
@@ -52,8 +52,8 @@
<file leaf-file-name="FontTestGDX.kt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="506">
<caret line="39" selection-start-line="39" selection-end-line="39" />
<state relative-caret-position="541">
<caret line="111" column="92" selection-start-line="111" selection-start-column="92" selection-end-line="111" selection-end-column="92" />
<folding>
<element signature="e#48#162#0" expanded="true" />
</folding>
@@ -64,8 +64,8 @@
<file leaf-file-name="demotext.txt" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/FontTestGDX/demotext.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="65">
<caret line="5" column="32" lean-forward="true" selection-start-line="5" selection-start-column="32" selection-end-line="5" selection-end-column="32" />
<state relative-caret-position="566">
<caret line="72" column="83" lean-forward="true" selection-start-line="72" selection-start-column="83" selection-end-line="72" selection-end-column="83" />
</state>
</provider>
</entry>
@@ -74,7 +74,7 @@
<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="480">
<first_editor relative-caret-position="631">
<caret line="241" column="171" selection-start-line="241" selection-start-column="171" selection-end-line="241" selection-end-column="171" />
</first_editor>
<second_editor>
@@ -106,7 +106,16 @@
<find>fun dispo</find>
<find>xHei</find>
<find>not copy</find>
<find>getColour</find>
<find>toColo</find>
<find>.094</find>
<find>ө</find>
<find>ď</find>
<find>ñ</find>
</findStrings>
<replaceStrings>
<replace>.141</replace>
</replaceStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@@ -120,9 +129,9 @@
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/testbed/FontTestGDX.kt" />
<option value="$PROJECT_DIR$/LICENSE.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/gdx/GameFontBase.kt" />
<option value="$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt" />
<option value="$PROJECT_DIR$/src/net/torvald/terrarumsansbitmap/slick2d/GameFontBase.kt" />
<option value="$PROJECT_DIR$/FontTestGDX/demotext.txt" />
</list>
</option>
@@ -402,7 +411,7 @@
<layout>
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Messages" order="7" weight="0.3287037" />
<window_info anchor="bottom" id="Messages" order="7" weight="0.32851636" />
<window_info anchor="right" id="Palette&#9;" order="3" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
<window_info anchor="right" id="Maven Projects" order="3" />
@@ -635,10 +644,27 @@
</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="153">
<caret line="523" column="48" selection-start-line="523" selection-start-column="48" selection-end-line="523" selection-end-column="48" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/AppData/Local/Temp/Ихадоу адаҟьа.URL">
<provider selected="true" editor-type-id="text-editor" />
</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="534">
<caret line="810" column="37" lean-forward="true" selection-start-line="810" selection-start-column="37" selection-end-line="810" selection-end-column="37" />
</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="480">
<first_editor relative-caret-position="631">
<caret line="241" column="171" selection-start-line="241" selection-start-column="171" selection-end-line="241" selection-end-column="171" />
</first_editor>
<second_editor>
@@ -647,17 +673,10 @@
</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="153">
<caret line="523" column="48" selection-start-line="523" selection-start-column="48" selection-end-line="523" selection-end-column="48" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/FontTestGDX/src/FontTestGDX.kt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="506">
<caret line="39" selection-start-line="39" selection-end-line="39" />
<state relative-caret-position="541">
<caret line="111" column="92" selection-start-line="111" selection-start-column="92" selection-end-line="111" selection-end-column="92" />
<folding>
<element signature="e#48#162#0" expanded="true" />
</folding>
@@ -666,15 +685,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/FontTestGDX/demotext.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="65">
<caret line="5" column="32" lean-forward="true" selection-start-line="5" selection-start-column="32" selection-end-line="5" selection-end-column="32" />
</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="494">
<caret line="530" column="35" lean-forward="true" selection-start-line="530" selection-start-column="35" selection-end-line="530" selection-end-column="35" />
<state relative-caret-position="566">
<caret line="72" column="83" lean-forward="true" selection-start-line="72" selection-start-column="83" selection-end-line="72" selection-end-column="83" />
</state>
</provider>
</entry>

View File

@@ -1,6 +1,82 @@
Do bạch kim rất quý nên sẽ dùng để lắp vô xương
The bitmap font for games developers who seek good font that has real multilingual support,
for free (as in freedom and without cost)
There are many bitmap fonts on the internet. You care for the multilingual support, but alas!
most of them do not support your language, vector fonts take too much time to load, and even
then their legibility suffers because fuck built-in antialias.
You somehow found a multilingual one, and it makes your game look like an old computer, and you say:
“Well, better than nothing… no, its ugly.”
You speak japanese and you wish to support it, but then このクソなfont only goot for displaying
Japanese, it's not even multilingual, and their English look uncanny and inconsistent as hell.
Eventually you just mix different fonts together, and the results were always infuriating.
No more suffering. This font has everything you need.
while (isVisible(BAD_FONTS)) {
ripAndTear(BAD_FONTS).getByScope(GUTS);
}
How multilingual? Real multilingual!
Ианҵоуп ақьаад, нусхур аҩырала, ҩ ҽшьаҟакла, иҧшӡоу анапҩырала
Գրիչս վայր դրի, վեր կացա և պատրաստվում էի, որ քնեմ, երբ հանկարծ դռանս զանգակը հնչեց
Zəfər, jaketini də papağını da götür, bu axşam hava çox soyuq olacaq
Под южно дърво, цъфтящо в синьо, бягаше малко пухкаво зайче (BG)
Příliš žluťoučký kůň úpěl ďábelské ódy
Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Walther spillede på xylofon
Pack my box with five dozen liquor jugs
Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich
διαφυλάξτε γενικά τη ζωή σας από βαθειά ψυχικά τραύματα
ΔΙΑΦΥΛΆΞΤΕ ΓΕΝΙΚΆ ΤΗ ΖΩΉ ΣΑΣ ΑΠΌ ΒΑΘΕΙΆ ΨΥΧΙΚΆ ΤΡΑΎΜΑΤΑ
სწრაფი ყავისფერი მელა გადაახტა ზარმაც ძაღლს
Kæmi ný öxi hér, ykist þjófum nú bæði víl og ádrepa
Ċuaiġ bé ṁórṡáċ le dlúṫspád fíorḟinn trí hata mo ḋea-ṗorcáin ḃig
とりなくこゑす ゆめさませ みよあけわたる ひんかしを そらいろはえて おきつへに ほふねむれゐぬ もやのうち
田居に出で 菜摘むわれをぞ 君召すと 求食り追ひゆく 山城の 打酔へる子ら 藻葉干せよ え舟繋けぬ
정 참판 양반댁 규수 큰 교자 타고 혼례 치른 날 하얬다 도럄직한 퀡봹퉪헰
Četri psihi faķīri vēlu vakarā zāģēja guļbūvei durvis, fonā šņācot mežam
Įlinkdama fechtuotojo špaga sublykčiojusi pragręžė apvalų arbūzą
Ѕидарски пејзаж: шугав билмез со чудење џвака ќофте и кељ на туѓ цех
Щётканы фермд пийшин цувъя. Бөгж зогсч хэльюү
Pchnąć w tę łódź jeża lub ośm skrzyń fig
Înjurând pițigăiat, zoofobul comandă vexat whisky și tequila
Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства
Ајшо, лепото и чежњо, за љубав срца мога дођи у Хаџиће на кафу (SR)
Jovencillo emponzoñado de whisky: ¡qué figurota exhibe!
นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ
Pijamalı hasta yağız şoföre çabucak güvendi
Жебракують філософи при ґанку церкви в Гадячі, ще й шатро їхнє п’яне знаємо
Do bạch kim rất quý nên sẽ dùng để lắp vô xương
日堀油告観観藤村抄海評業庁経賃室弁市。太撮収改売週法所何都慣次現。価紙一無三洋日話転手治稿載末替付致治。
Featuring:
Ever heard of « Guillemets »? You speak „Nederlands” or „Deutsch“? ”suomi”? 「日本語」しゃべる?或《中文》?
Multilingual brackets; these are the most basic things, right?
99406 91902 59186 29182 45814 57862 34368 08240
31485 65379 04348 28952 42927 26157 42615 39526
Fixed-width numbers, because number-crunching matters
􏀏ᚱ􏄏ᛂ􏈏ᚴ􏌏ᛋ􏐏ᛂ􏔏ᛋ􏘏ᛏ􏜏ᛋ􏠏ᚮ􏤏ᚾ􏨏ᛔ􏬏ᚢ􏰏ᛏ􏴏ᛚ􏸏ᚮ􏼏ᛋ􎼏᛬􍼏ᚱ􌼏ᛂ􋼏ᚴ􊼏ᛋ􉼏ᛋ􈼏ᚢ􇼏ᚼ􆼏ᚾ􅼏ᚢ􄼏ᛘ􃼏ᚢ􂼏ᛚ􁼏ᚾ􀼏ᛏ􀼟ᚮ􀼯᛬􀼿ᛏ􀽏ᚮ􀽟ᛋ􀽯ᛁ􀽿ᚮ􀾏ᚵ􀾟ᛂ􀾯ᚢ􀾿ᛏ􀿏ᚮ􀿟ᚱ􀿯ᛘ􀿿ᛔ􀻿ᚱ􀷿ᛂ􀳿ᚴ􀯿ᛋ􀫿ᛏ􀧿᛭􀣿ᛋ􀟿ᚢ􀛿ᚼ􀗿ᚾ􀓿ᚢ􀏿ᛋ􀋿ᛘ􀇿ᚮ􀃿ᛁ􁃿ᚵ􂃿ᚾ􃃿ᛁ􄃿ᛂ􅃿ᛏ􆃿ᚮ􇃿ᛑ􈃿᛭􉃿ᚵ􊃿ᛂ􋃿ᚢ􌃿ᛏ􍃿ᚮ􎃿ᚱ􀀀
Colour-coding that supports 65535 (semi-transparent) colours via 4 bit RGBA
За миг бях в чужд плюшен скърцащ фотьойл (Bulgarian)
Љубазни фењерџија чађавог лица хоће да ми покаже штос (Serbian)
Разъяренный чтец эгоистично бьёт пятью жердями шустрого фехтовальщика (Russian)
Control characters to support Bulgarian and Serbian letter shapes on the fly
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
Цой жил, Цой жив, Цой будет жить
Время его смерти в автокатастрофе известно до минуты 15.07.1990,12.28.
20 лет назад заснувший за рулем «Москвича-2141» Цой вырулил на трассе под
Тукумсом в Латвии на встречную полосу прямо в автобус «Икарус»…

View File

@@ -27,6 +27,108 @@ class FontTestGDX : Game() {
reader.close()
batch = SpriteBatch()
println("START")
val l = intArrayOf(0xF00F,
0xF10F,
0xF20F,
0xF30F,
0xF40F,
0xF50F,
0xF60F,
0xF70F,
0xF80F,
0xF90F,
0xFA0F,
0xFB0F,
0xFC0F,
0xFD0F,
0xFE0F,
0xFF0F,
0xEF0F,
0xDF0F,
0xCF0F,
0xBF0F,
0xAF0F,
0x9F0F,
0x8F0F,
0x7F0F,
0x6F0F,
0x5F0F,
0x4F0F,
0x3F0F,
0x2F0F,
0x1F0F,
0x0F0F,
0x0F1F,
0x0F2F,
0x0F3F,
0x0F4F,
0x0F5F,
0x0F6F,
0x0F7F,
0x0F8F,
0x0F9F,
0x0FAF,
0x0FBF,
0x0FCF,
0x0FDF,
0x0FEF,
0x0FFF,
0x0EFF,
0x0DFF,
0x0CFF,
0x0BFF,
0x0AFF,
0x09FF,
0x08FF,
0x07FF,
0x06FF,
0x05FF,
0x04FF,
0x03FF,
0x02FF,
0x01FF,
0x00FF,
0x10FF,
0x20FF,
0x30FF,
0x40FF,
0x50FF,
0x60FF,
0x70FF,
0x80FF,
0x90FF,
0xA0FF,
0xB0FF,
0xC0FF,
0xD0FF,
0xE0FF,
0xF0FF)
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")
}
override fun getScreen(): Screen? {
@@ -38,7 +140,7 @@ class FontTestGDX : Game() {
override fun render() {
Gdx.gl.glClearColor(1f - 0xBA/255f, 1f - 0xDA/255f, 1f - 0x55/255f, 1f)
Gdx.gl.glClearColor(.141f, .141f, .141f, 1f)
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
Gdx.gl.glEnable(GL20.GL_TEXTURE_2D)
Gdx.gl.glEnable(GL20.GL_BLEND)
@@ -47,8 +149,8 @@ class FontTestGDX : Game() {
batch.begin()
inputText.reversed().forEachIndexed { index, s ->
font.draw(batch, s, 10f, 10f + index * font.lineHeight)
inputText.forEachIndexed { index, s ->
font.draw(batch, s, 10f, appConfig.height - 30f - index * font.lineHeight)
}
batch.end()
@@ -68,12 +170,14 @@ class FontTestGDX : Game() {
}
}
lateinit var appConfig: LwjglApplicationConfiguration
fun main(args: Array<String>) {
val appConfig = LwjglApplicationConfiguration()
appConfig = LwjglApplicationConfiguration()
appConfig.vSyncEnabled = false
appConfig.resizable = false//true;
appConfig.width = 1024 // photographic ratio (1.5:1)
appConfig.height = 1024 // photographic ratio (1.5:1)
appConfig.width = 960
appConfig.height = 2048
appConfig.title = "Terrarum Sans Bitmap Test (GDX)"
LwjglApplication(FontTestGDX(), appConfig)

View File

@@ -59,6 +59,14 @@ import java.util.zip.GZIPInputStream
*
* Color Codes have following Unicode mapping: U+10RGBA, A must be non-zero to be visible. U+100000 reverts any colour code effects.
*
* ## Control Characters
*
* - 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
*
* @param noShadow Self-explanatory
* @param flipY If you have Y-down coord system implemented on your GDX (e.g. legacy codebase), set this to ```true``` so that the shadow won't be upside-down. For glyph getting upside-down, set ```TextureRegionPack.globalFlipY = true```.
*
@@ -818,6 +826,9 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
internal val SHEET_UNKNOWN = 254
fun charsetOverrideNormal() = Character.toChars( 0xFFFF8)
fun charsetOverrideBulgarian() = Character.toChars( 0xFFFF9)
fun charsetOverrideSerbian() = Character.toChars( 0xFFFFA)
fun toColorCode(rgba4444: Int): String = Character.toChars(0x100000 + rgba4444).toColCode()
fun toColorCode(r: Int, g: Int, b: Int, a: Int = 0x0F): String = toColorCode(r.shl(12) or g.shl(8) or b.shl(4) or a)
private fun CharArray.toColCode(): String = "${this[0]}${this[1]}"