Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3841611780 | ||
|
|
06bc8c9e2d | ||
|
|
21415c6f8d | ||
|
|
22c2a7aa52 | ||
|
|
0eb181f315 | ||
|
|
45b431f953 | ||
|
|
bbee554fec | ||
|
|
c4c67f489e | ||
|
|
4d867d6523 | ||
|
|
6620c11178 | ||
|
|
db06cab07c | ||
|
|
90b11cdd97 | ||
|
|
7bb92d1b4e | ||
|
|
b5dd744bd5 | ||
|
|
34903b10d4 | ||
|
|
0c5b7c8b70 | ||
|
|
cdffca98ef | ||
|
|
ce30d1d5fd | ||
|
|
ab067044f8 | ||
|
|
3e04b8bbe6 | ||
|
|
4556a9e244 | ||
|
|
e5d04de250 | ||
|
|
b7df181729 | ||
|
|
2fd3fcfd46 |
0
.gitignore
vendored
Normal file → Executable file
0
.idea/.name
generated
Normal file → Executable file
0
.idea/artifacts/FontDemoGDX.xml
generated
Normal file → Executable file
2
.idea/artifacts/TerrarumSansBitmap.xml
generated
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="TerrarumSansBitmap">
|
||||
<output-path>$PROJECT_DIR$/FontTestGDX/lib</output-path>
|
||||
<output-path>$PROJECT_DIR$/lib</output-path>
|
||||
<root id="archive" name="TerrarumSansBitmap.jar">
|
||||
<element id="module-output" name="BuildJAR_TerrarumSansBitmap" />
|
||||
<element id="directory" name="META-INF">
|
||||
|
||||
0
.idea/codeStyles/Project.xml
generated
Normal file → Executable file
0
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file → Executable file
0
.idea/kotlinc.xml
generated
Normal file → Executable file
0
.idea/libraries/GdxLib.xml
generated
Normal file → Executable file
9
.idea/libraries/KotlinJavaRuntime.xml
generated
Normal file → Executable file
@@ -3,10 +3,19 @@
|
||||
<CLASSES>
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-runtime.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-test.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk7.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-runtime-sources.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-sources.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect-sources.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-test-sources.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk7-sources.jar!/" />
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk8-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
0
.idea/libraries/TesterLib.xml
generated
Normal file → Executable file
0
.idea/markdown-navigator.xml
generated
Normal file → Executable file
0
.idea/markdown-navigator/profiles_settings.xml
generated
Normal file → Executable file
2
.idea/misc.xml
generated
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8.0_242" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
0
.idea/modules.xml
generated
Normal file → Executable file
0
.idea/vcs.xml
generated
Normal file → Executable file
1064
.idea/workspace.xml
generated
Normal file → Executable file
0
BuildJAR_TerrarumSansBitmap.iml
Normal file → Executable file
0
CONTRIBUTING.md
Normal file → Executable file
0
CONTRIBUTORS.txt
Normal file → Executable file
BIN
FontDemoGDX.jar
1
FontTestGDX/FontTestGDX.iml
Normal file → Executable file
@@ -10,5 +10,6 @@
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
<orderEntry type="library" name="GdxLib" level="project" />
|
||||
<orderEntry type="library" name="TesterLib" level="project" />
|
||||
<orderEntry type="module" module-name="BuildJAR_TerrarumSansBitmap" />
|
||||
</component>
|
||||
</module>
|
||||
2
FontTestGDX/META-INF/MANIFEST.MF
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
Manifest-Version: 1.0
|
||||
Class-Path: lib/gdx.jar lib/gdx-backend-lwjgl.jar lib/gdx-backend-lwjg
|
||||
l-natives.jar lib/gdx-natives.jar lib/kotlin-stdlib.jar TerrarumSansB
|
||||
l-natives.jar lib/gdx-natives.jar lib/kotlin-stdlib.jar lib/TerrarumSansB
|
||||
itmap.jar
|
||||
Main-Class: FontTestGDXKt
|
||||
|
||||
|
||||
0
FontTestGDX/src/FontTestGDX.kt
Normal file → Executable file
0
LICENSE.md
Normal file → Executable file
0
META-INF/MANIFEST.MF
Normal file → Executable file
0
PUA_allocation_chart.xlsx
Normal file → Executable file
0
alignment_illustration.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
0
assets/ascii_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 320 KiB |
0
assets/cjkpunct.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
0
assets/cyrilic_bulgarian_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
0
assets/cyrilic_serbian_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
0
assets/cyrilic_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 380 KiB After Width: | Height: | Size: 380 KiB |
0
assets/devanagari_bengali_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 320 KiB |
0
assets/diacritical_marks_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
0
assets/fullwidth_forms.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
0
assets/futhark.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
0
assets/greek_polytonic_xyswap_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 320 KiB |
0
assets/greek_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 2.6 MiB |
0
assets/hayeren_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
BIN
assets/insular_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 1.8 KiB |
0
assets/ipa_ext_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 220 KiB |
0
assets/kana.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 210 KiB After Width: | Height: | Size: 210 KiB |
0
assets/kartuli_allcaps_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
0
assets/kartuli_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
BIN
assets/latinExtD_variable.tga
Normal file
0
assets/latinExt_additional_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 320 KiB |
0
assets/puae000-e0ff.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 324 KiB After Width: | Height: | Size: 324 KiB |
0
assets/richtext_furigana.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
0
assets/thai_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
0
assets/tsalagi_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
0
assets/unipunct_variable.tga
Normal file → Executable file
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
0
assets/wenquanyi.tga.gz
Normal file → Executable file
BIN
demo.PNG
Normal file → Executable file
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
14
demotext.txt
Normal file → Executable file
@@ -3,16 +3,16 @@
|
||||
|
||||
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.
|
||||
then their legibility suffers because screw 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, it’s 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.
|
||||
You speak japanese and you wish to support it, but then このクソなfont only good for displaying
|
||||
Japanese, it’s not even truly multilingual, and their English look uncanny and inconsistent.
|
||||
|
||||
Eventually you just mix different fonts together, and the results were always infuriating.
|
||||
Eventually you just mix different fonts together, and the results were always mildly infuriating.
|
||||
|
||||
No more suffering. This font has everything you need.
|
||||
|
||||
@@ -41,7 +41,7 @@ How multilingual? Real multilingual!
|
||||
სწრაფი ყავისფერი მელა გადაახტა ზარმაც ძაღლს ᲘᲜᲢᲔᲚ ᲞᲔᲜᲢᲘᲣᲛᲘ ᲛᲘᲙᲠᲝᲞᲠᲝᲪᲔᲡᲝᲠᲘ
|
||||
ऋषियों को सताने वाले दुष्ट राक्षसों के राजा रावण का सर्वनाश करने वाले विष्णुवतार भगवान श्रीराम अयोध्या के महाराज दशरथ के
|
||||
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
|
||||
Ċuaiġ bé ṁórṡáċ le dlúṫspád fíoꝛḟinn trí hata mo ḋea-ṗoꝛcáin ḃig
|
||||
あめつちほしそら やまかはみねたに くもきりむろこけ ひといぬうへすゑ ゆわさるおふせよ えの𛀁をなれゐて
|
||||
トリナクコヱス ユメサマセ ミヨアケワタル ヒンカシヲ ソライロハエテ オキツヘニ ホフネムレヰヌ モヤノウチ
|
||||
田居に出で 菜摘むわれをぞ 君召すと 求食り追ひゆく 山城の 打酔へる子ら 藻葉干せよ え舟繋けぬ
|
||||
@@ -109,8 +109,8 @@ How multilingual? Real multilingual!
|
||||
Cyrillic Supplement Armenian Devanagari Bengali Thai Georgian Hangul Jamo Cherokee Runic
|
||||
Georgian Extended Greek Extended General Punctuations Superscripts and Subscripts CJK Symbols
|
||||
Latin Extended-C Kana Hangul Compatibility Jamo Kana Phonetic Extensions CJK Unihan Extension A
|
||||
CJK Unihan Hangul Jamo Extended-A Hangul Syllables Hangul Jamo Extended-B Fullwidth Forms
|
||||
Kana Supplement
|
||||
CJK Unihan Latin Extended-D Hangul Jamo Extended-A Hangul Syllables Hangul Jamo Extended-B
|
||||
Fullwidth Forms Kana Supplement
|
||||
|
||||
GitHub’s issue page is open! You can report any errors, or leave suggestions.
|
||||
You can help this font to be more versatile. (for more languages, more frameworks) Clone this repo, make
|
||||
|
||||
0
font_drawing_template.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
glyph_height_pos_annotation.png
Normal file → Executable file
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
0
samples/README.md
Normal file → Executable file
0
samples/wikipedia_x86.png
Normal file → Executable file
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
0
src/net/torvald/terrarumsansbitmap/GlyphProps.kt
Normal file → Executable file
880
src/net/torvald/terrarumsansbitmap/gdx/GameFontBase.kt
Normal file → Executable file
31
src/net/torvald/terrarumsansbitmap/gdx/PixmapRegionPack.kt
Normal file → Executable file
@@ -25,14 +25,15 @@
|
||||
package net.torvald.terrarumsansbitmap.gdx
|
||||
|
||||
import com.badlogic.gdx.files.FileHandle
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.Pixmap
|
||||
|
||||
/**
|
||||
* Breaks one pixmap atlas into many child pixmaps
|
||||
*
|
||||
* Created by minjaesong on 2018-09-17.
|
||||
*/
|
||||
class PixmapRegionPack(
|
||||
pixmap: Pixmap,
|
||||
pixmapAtlas: Pixmap,
|
||||
val tileW: Int,
|
||||
val tileH: Int,
|
||||
val hGap: Int = 0,
|
||||
@@ -47,8 +48,8 @@ class PixmapRegionPack(
|
||||
constructor(fileHandle: FileHandle, tileW: Int, tileH: Int, hGap: Int = 0, vGap: Int = 0, hFrame: Int = 0, vFrame: Int = 0, xySwapped: Boolean = false) :
|
||||
this(Pixmap(fileHandle), tileW, tileH, hGap, vGap, hFrame, vFrame, xySwapped)
|
||||
|
||||
val horizontalCount = (pixmap.width - 2 * hFrame + hGap) / (tileW + hGap)
|
||||
val verticalCount = (pixmap.height - 2 * vFrame + vGap) / (tileH + vGap)
|
||||
val horizontalCount = (pixmapAtlas.width - 2 * hFrame + hGap) / (tileW + hGap)
|
||||
val verticalCount = (pixmapAtlas.height - 2 * vFrame + vGap) / (tileH + vGap)
|
||||
|
||||
val regions: Array<Pixmap>
|
||||
|
||||
@@ -70,10 +71,10 @@ class PixmapRegionPack(
|
||||
|
||||
|
||||
|
||||
pixmap.pixels.rewind()
|
||||
pixmapAtlas.pixels.rewind()
|
||||
|
||||
if (!xySwapped) {
|
||||
regions = Array<Pixmap>(horizontalCount * verticalCount, {
|
||||
regions = Array<Pixmap>(horizontalCount * verticalCount) {
|
||||
val rx = (it % horizontalCount * (tileW + hGap)) + hFrame // pixel, not index
|
||||
val ry = (it / horizontalCount * (tileH + vGap)) + vFrame // pixel, not index
|
||||
|
||||
@@ -84,15 +85,15 @@ class PixmapRegionPack(
|
||||
// for every "scanline"
|
||||
for (y in 0 until tileH) {
|
||||
|
||||
val offsetY = (ry + y) * (pixmap.width * 4) + (vFrame * pixmap.width * 4)
|
||||
val offsetY = (ry + y) * (pixmapAtlas.width * 4) + (vFrame * pixmapAtlas.width * 4)
|
||||
val offsetX = rx * 4 + hFrame * 4
|
||||
|
||||
//println("offset: ${offsetX + offsetY}")
|
||||
|
||||
val bytesBuffer = ByteArray(4 * tileW)
|
||||
|
||||
pixmap.pixels.position(offsetY + offsetX)
|
||||
pixmap.pixels.get(bytesBuffer, 0, bytesBuffer.size)
|
||||
pixmapAtlas.pixels.position(offsetY + offsetX)
|
||||
pixmapAtlas.pixels.get(bytesBuffer, 0, bytesBuffer.size)
|
||||
|
||||
// test print bytesbuffer
|
||||
/*bytesBuffer.forEachIndexed { index, it ->
|
||||
@@ -112,10 +113,10 @@ class PixmapRegionPack(
|
||||
// todo globalFlipY ?
|
||||
|
||||
/*return*/region
|
||||
})
|
||||
}
|
||||
}
|
||||
else {
|
||||
regions = Array<Pixmap>(horizontalCount * verticalCount, {
|
||||
regions = Array<Pixmap>(horizontalCount * verticalCount) {
|
||||
val rx = (it / verticalCount * (tileW + hGap)) + hFrame
|
||||
val ry = (it % verticalCount * (tileH + vGap)) + vFrame
|
||||
|
||||
@@ -126,15 +127,15 @@ class PixmapRegionPack(
|
||||
// for every "scanline"
|
||||
for (y in 0 until tileH) {
|
||||
|
||||
val offsetY = (ry + y) * (pixmap.width * 4) + (vFrame * pixmap.width * 4)
|
||||
val offsetY = (ry + y) * (pixmapAtlas.width * 4) + (vFrame * pixmapAtlas.width * 4)
|
||||
val offsetX = rx * 4 + hFrame * 4
|
||||
|
||||
//println("offset: ${offsetX + offsetY}")
|
||||
|
||||
val bytesBuffer = ByteArray(4 * tileW)
|
||||
|
||||
pixmap.pixels.position(offsetY + offsetX)
|
||||
pixmap.pixels.get(bytesBuffer, 0, bytesBuffer.size)
|
||||
pixmapAtlas.pixels.position(offsetY + offsetX)
|
||||
pixmapAtlas.pixels.get(bytesBuffer, 0, bytesBuffer.size)
|
||||
|
||||
// test print bytesbuffer
|
||||
/*bytesBuffer.forEachIndexed { index, it ->
|
||||
@@ -154,7 +155,7 @@ class PixmapRegionPack(
|
||||
// todo globalFlipY ?
|
||||
|
||||
/*return*/region
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
0
src/net/torvald/terrarumsansbitmap/gdx/TextureRegionPack.kt
Normal file → Executable file
0
src/net/torvald/terrarumsansbitmap/readme.md
Normal file → Executable file
0
terrarum_sans_cyrillic_2.png
Normal file → Executable file
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
BIN
testing.PNG
Normal file → Executable file
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 58 KiB |
24
testtext.txt
Normal file → Executable file
@@ -1,10 +1,16 @@
|
||||
re ʘ, ʇ, ʗ, and ʖ, al
|
||||
ɓ ɗ ɠ
|
||||
ɐ ɔ ə ɟ ɥ ɯ ɹ ʇ ʌ ʍ ʎ
|
||||
Vʷ[kʰuˣt̪s̟] and Vʷ[kʰʉˣt͜ʃ].
|
||||
To
|
||||
uu
|
||||
Td
|
||||
mm
|
||||
Ye
|
||||
Yd
|
||||
|
||||
ʡ̆
|
||||
|
||||
Labiodental flap [ⱱ] U+2C71
|
||||
|
||||
acegijmnopqrsuvwxyzɱɳʙɾɽʒʂʐʋɹɻɥɟɡɢʛȵɲŋɴʀɕʑçʝxɣχʁʜʍɰʟɨʉɯuʊøɘɵɤəɛœɜɞʌɔæɐɶɑɒɚɝɩɪʅʈʏʞⱥⱦⱱⱳⱴⱶⱷⱸⱺⱻ
|
||||
/œ̃/
|
||||
/ɛ̃/
|
||||
ẽ
|
||||
Ẽ
|
||||
/ẽ
|
||||
o̸
|
||||
O̸
|
||||
when the line ends with a diacritics, whole letter wont render
|
||||
if the line starts with a letter-with-diacritic, it will error out
|
||||
0
width_bit_encoding_annotated.png
Normal file → Executable file
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |