Compare commits
343 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
069b1c853d | ||
|
|
d5b912a64e | ||
|
|
07a4988f5f | ||
|
|
13ef2f586e | ||
|
|
5882ddd974 | ||
|
|
2000438c16 | ||
|
|
bdb4e9f03f | ||
|
|
3e395defb5 | ||
|
|
71371e147b | ||
|
|
fbc8aef956 | ||
|
|
32bdc98de5 | ||
|
|
1614260ce7 | ||
|
|
fb60edb9a4 | ||
|
|
47eae57418 | ||
|
|
2a15785f57 | ||
|
|
95dfcb91b5 | ||
|
|
033fcab9ec | ||
|
|
b7521ccabf | ||
|
|
3cc397d2db | ||
|
|
1f37ee1f4f | ||
|
|
2205e1bc44 | ||
|
|
3500f17e08 | ||
|
|
7c8a1be3e5 | ||
|
|
39ff4cd92c | ||
|
|
2c10407c17 | ||
|
|
1f318837e7 | ||
|
|
a5fc22661c | ||
|
|
d8dc1c8cfd | ||
|
|
42c72a6a90 | ||
|
|
385dc8bdff | ||
|
|
a58abd813f | ||
|
|
8b38e3e47d | ||
|
|
bd333293c4 | ||
|
|
c415c29fb5 | ||
|
|
d31b5e4068 | ||
|
|
e2d6d3724c | ||
|
|
48339b0599 | ||
|
|
0dade179d8 | ||
|
|
fb4cfb6e6d | ||
|
|
06fcffde56 | ||
|
|
accbecfb3e | ||
|
|
b3e6f61f96 | ||
|
|
c2b491cc8d | ||
|
|
74695f519b | ||
|
|
adcf84140c | ||
|
|
b7ecfd910e | ||
|
|
a719d872c2 | ||
|
|
2d99f39a99 | ||
|
|
d43a2d5bec | ||
|
|
b2acb83848 | ||
|
|
949187345d | ||
|
|
07d4504a89 | ||
|
|
aa45f942e3 | ||
|
|
7384d970d5 | ||
|
|
8e29db9c4a | ||
|
|
8bf0642b3f | ||
|
|
87492c1f0b | ||
|
|
2196a4b2e7 | ||
|
|
ee51cafa6c | ||
|
|
57ce0363f2 | ||
|
|
77e01151b5 | ||
|
|
869d424292 | ||
|
|
631e60bb73 | ||
|
|
6410256e6a | ||
|
|
66c1a1357a | ||
|
|
d87b0dce7c | ||
|
|
c695a9c5f0 | ||
|
|
6c63504497 | ||
|
|
8fd3f0e99a | ||
|
|
373af27873 | ||
|
|
30327776ba | ||
|
|
32c859fdf8 | ||
|
|
06782fdc55 | ||
|
|
46a57e8e50 | ||
|
|
78333b3fe1 | ||
|
|
35325cb852 | ||
|
|
1bf78cc5bb | ||
|
|
5f1f740fab | ||
|
|
e9c9ae4aab | ||
|
|
09b3a8c759 | ||
|
|
cfc52386ab | ||
|
|
c9474fac1c | ||
|
|
9e85cae502 | ||
|
|
eacbd4fdb0 | ||
|
|
258f70dbf4 | ||
|
|
f69b39df95 | ||
|
|
9b554d3524 | ||
|
|
d6ba2eb7ce | ||
|
|
a9883fc029 | ||
|
|
0ebbcfb8c4 | ||
|
|
4d04f368c6 | ||
|
|
ab04e6b735 | ||
|
|
c1b7d3e036 | ||
|
|
f60454229b | ||
|
|
bba02d9f40 | ||
|
|
1a20283bb3 | ||
|
|
c644d4ad1a | ||
|
|
b9e0366512 | ||
|
|
e81b9f4e53 | ||
|
|
67481f9e44 | ||
|
|
95f42a9126 | ||
|
|
84ea79b069 | ||
|
|
3f1364c982 | ||
|
|
28b902b6c0 | ||
|
|
a19ce0d833 | ||
|
|
b042af1881 | ||
|
|
1d57958db9 | ||
|
|
a9d28510a7 | ||
|
|
b944cf3585 | ||
|
|
de23edcbda | ||
|
|
68382370a4 | ||
|
|
29c7c20844 | ||
|
|
7037a758cf | ||
|
|
75a3bb2198 | ||
|
|
473b34dc7c | ||
|
|
6f88e37df6 | ||
|
|
4ca39b3742 | ||
|
|
3cc44d4421 | ||
|
|
0ea7bf8c1b | ||
|
|
f5bc1f8178 | ||
|
|
2a39ff0d35 | ||
|
|
ecffe22d01 | ||
|
|
e1c48ace6b | ||
|
|
efff35f0e3 | ||
|
|
f10962ceda | ||
|
|
37d21c6f6c | ||
|
|
ff7c0f8df3 | ||
|
|
c863148f13 | ||
|
|
69e12f0205 | ||
|
|
6bf4a5a995 | ||
|
|
38bdb28b64 | ||
|
|
8ba1a4a005 | ||
|
|
70da6a5142 | ||
|
|
2f6126d0ea | ||
|
|
189a427edc | ||
|
|
21dbf348d0 | ||
|
|
ff455ef2fd | ||
|
|
d7029c3841 | ||
|
|
2d894613df | ||
|
|
60a1da1336 | ||
|
|
123d856853 | ||
|
|
617e0bc5b1 | ||
|
|
0a873b3801 | ||
|
|
3c97253c9a | ||
|
|
f228c331cf | ||
|
|
464ac151bd | ||
|
|
8f70306540 | ||
|
|
28166bb2ec | ||
|
|
ac85217998 | ||
|
|
44b2450fbf | ||
|
|
9221373c53 | ||
|
|
bfaa190e49 | ||
|
|
23c7ae15a2 | ||
|
|
077a832767 | ||
|
|
8c9e912491 | ||
|
|
8a7cf85982 | ||
|
|
bae9af79e9 | ||
|
|
374dc1dd66 | ||
|
|
2812460a9c | ||
|
|
83a885d214 | ||
|
|
0dbb32b575 | ||
|
|
4fea10583c | ||
|
|
ebdb0c499c | ||
|
|
4e6f473b6f | ||
|
|
7fdb7a7a91 | ||
|
|
f8a1c4cfdf | ||
|
|
afa59255cc | ||
|
|
23a5a8997f | ||
|
|
4e705e5c7d | ||
|
|
c57f8e191b | ||
|
|
ed97bafc41 | ||
|
|
eebff767ce | ||
|
|
baee9a62aa | ||
|
|
305dbb548c | ||
|
|
0ccdf67f1e | ||
|
|
60aad1b24d | ||
|
|
e31e088744 | ||
|
|
824f11412d | ||
|
|
1445404005 | ||
|
|
dd851cdbc9 | ||
|
|
7abfb2d2f0 | ||
|
|
5e7237fb17 | ||
|
|
0cba7b96be | ||
|
|
1705b2752e | ||
|
|
4614ffab92 | ||
|
|
225d908f70 | ||
|
|
09e7483389 | ||
|
|
57ab00b6e1 | ||
|
|
23b6be74e2 | ||
|
|
905a235a1b | ||
|
|
d6b1dbd1d6 | ||
|
|
e9c4f0723a | ||
|
|
ac6733469c | ||
|
|
a7ecba905a | ||
|
|
d7c48b1f88 | ||
|
|
0c74660396 | ||
|
|
b3c1327dc4 | ||
|
|
489da04d1d | ||
|
|
a58ad756ff | ||
|
|
702f1b2e2f | ||
|
|
f10413d9c4 | ||
|
|
80aa9d0e52 | ||
|
|
64c13571f9 | ||
|
|
a36c5df477 | ||
|
|
7c3069e8cf | ||
|
|
1e66cfec51 | ||
|
|
1e0a820817 | ||
|
|
4623975858 | ||
|
|
23aac0c1c1 | ||
|
|
54d983013a | ||
|
|
c7507a6357 | ||
|
|
0714581866 | ||
|
|
095b8e65fb | ||
|
|
e60652d705 | ||
|
|
f3aeba3d70 | ||
|
|
ee2b1027b7 | ||
|
|
3b05624de5 | ||
|
|
4c0582184f | ||
|
|
5e6b2363b7 | ||
|
|
dbe93a26eb | ||
|
|
b128312e2c | ||
|
|
07ca429483 | ||
|
|
9675c40216 | ||
|
|
0870856674 | ||
|
|
3c6f18efbf | ||
|
|
2fdc6f85f5 | ||
|
|
4ed2c26b35 | ||
|
|
3ef7410e45 | ||
|
|
ba730fafe3 | ||
|
|
ab925bc8c5 | ||
|
|
b1362f3a3b | ||
|
|
f60eb6b3fc | ||
|
|
88f013a304 | ||
|
|
ea9f8fae4c | ||
|
|
a6363131ac | ||
|
|
fc60356b8b | ||
|
|
755420d5b3 | ||
|
|
0200aa5f85 | ||
|
|
7dff623b75 | ||
|
|
49f5e649b7 | ||
|
|
1656e50c3b | ||
|
|
99a1648734 | ||
|
|
9672aa8e05 | ||
|
|
d72ecb5cfd | ||
|
|
39fccbe6cb | ||
|
|
84efb253cf | ||
|
|
4c63860dc1 | ||
|
|
36acc7e523 | ||
|
|
700397a995 | ||
|
|
dc6bd89497 | ||
|
|
c2ed83d511 | ||
|
|
0a41da1659 | ||
|
|
96e412414a | ||
|
|
483476b5fa | ||
|
|
ed8bcf7dc8 | ||
|
|
376c7cf9a4 | ||
|
|
05d34d563d | ||
|
|
e59db6954a | ||
|
|
9c05fb399b | ||
|
|
40d4bc41c6 | ||
|
|
1f9a79db48 | ||
|
|
0943d38926 | ||
|
|
5469b56841 | ||
|
|
d31730b5c3 | ||
|
|
bd36ee7399 | ||
|
|
b8f5f57878 | ||
|
|
63de646eae | ||
|
|
e70ee44a37 | ||
|
|
6ee66fdccc | ||
|
|
5ecffa1352 | ||
|
|
46efc42e24 | ||
|
|
35829ce982 | ||
|
|
756ef4fae5 | ||
|
|
ce31a5a6ef | ||
|
|
14ea4d8d84 | ||
|
|
f2eb1464f6 | ||
|
|
45b464ee13 | ||
|
|
c3f9ea47fd | ||
|
|
87012d7671 | ||
|
|
1fce4055d7 | ||
|
|
b83dd501fc | ||
|
|
94a40a4a87 | ||
|
|
2fa867ce44 | ||
|
|
4d1a599263 | ||
|
|
8641c95169 | ||
|
|
4f6584ac27 | ||
|
|
cb25c5bf56 | ||
|
|
5c534ed388 | ||
|
|
368bf0ee15 | ||
|
|
c9ccf3e7f8 | ||
|
|
0ced94cb57 | ||
|
|
b158e11e25 | ||
|
|
f4658daa9a | ||
|
|
56b4ccb848 | ||
|
|
2748eeb367 | ||
|
|
8647578802 | ||
|
|
3422c20322 | ||
|
|
4561b06428 | ||
|
|
652f239af3 | ||
|
|
c2428ff7c2 | ||
|
|
2d5e592622 | ||
|
|
3a569a2e2e | ||
|
|
f600764364 | ||
|
|
ab2669b555 | ||
|
|
f43a81de3f | ||
|
|
33ae3fa48a | ||
|
|
12fc3eee03 | ||
|
|
396954e0ee | ||
|
|
d65aaa6da6 | ||
|
|
ae67833cb2 | ||
|
|
4261652bdf | ||
|
|
49d83a297f | ||
|
|
b3a48b23ee | ||
|
|
b802f9b02e | ||
|
|
0afdb9c2cf | ||
|
|
c295430866 | ||
|
|
883375dc9b | ||
|
|
6a1208b45d | ||
|
|
25084b7a94 | ||
|
|
c325c9c30c | ||
|
|
d89409cc73 | ||
|
|
0ff564a192 | ||
|
|
930804cf48 | ||
|
|
699981d9a2 | ||
|
|
947c966660 | ||
|
|
554d9a5d0b | ||
|
|
45e5c39739 | ||
|
|
74e540cb61 | ||
|
|
c1ec50e166 | ||
|
|
58ce18f981 | ||
|
|
f1fa98880f | ||
|
|
0c754d09ed | ||
|
|
b40e4fcc26 | ||
|
|
a7bb33c3a0 | ||
|
|
c3930b2e08 | ||
|
|
979180860e | ||
|
|
61fb70975c | ||
|
|
1af9f7c915 | ||
|
|
810411de7e | ||
|
|
b9bf9ca10d | ||
|
|
526c16daa9 | ||
|
|
e58104d5b5 | ||
|
|
92aeb3c8aa |
13
.gitattributes
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
*.psd filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ogg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tga filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.opus filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.kra filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wav filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|
||||||
|
*.tga binary diff=hex
|
||||||
|
*.kra binary diff=hex
|
||||||
6
.gitignore
vendored
@@ -7,3 +7,9 @@ Terrarum-sans-bitmap*.zip
|
|||||||
TerrarumSansBitmap*.jar
|
TerrarumSansBitmap*.jar
|
||||||
Font*.jar
|
Font*.jar
|
||||||
tmp_*
|
tmp_*
|
||||||
|
*~
|
||||||
|
.tmp*
|
||||||
|
tmp_*
|
||||||
|
*.bak
|
||||||
|
*-autosave.kra
|
||||||
|
.directory
|
||||||
|
|||||||
76
.idea/artifacts/FontDemoGDX.xml
generated
@@ -6,6 +6,82 @@
|
|||||||
<element id="directory" name="META-INF">
|
<element id="directory" name="META-INF">
|
||||||
<element id="file-copy" path="$PROJECT_DIR$/FontTestGDX/META-INF/MANIFEST.MF" />
|
<element id="file-copy" path="$PROJECT_DIR$/FontTestGDX/META-INF/MANIFEST.MF" />
|
||||||
</element>
|
</element>
|
||||||
|
<element id="artifact" artifact-name="TerrarumSansBitmap" />
|
||||||
|
<element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-stdlib.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-test.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk7.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk8.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jnlp.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-1.10.0.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.2.3.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jinput-2.0.5.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jutils-1.0.0.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jorbis-0.0.17.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jlayer-1.0.1-gdx.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-glfw-3.2.3.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/TerrarumSansBitmap.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-1.10.0-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-1.10.0-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-openal-3.2.3.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-opengl-3.2.3.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-platform-1.10.0.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.2.3-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.2.3-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jinput-2.0.5-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jinput-2.0.5-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jutils-1.0.0-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jutils-1.0.0-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-jemalloc-3.2.3.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jorbis-0.0.17-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jorbis-0.0.17-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jlayer-1.0.1-gdx-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jlayer-1.0.1-gdx-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-glfw-3.2.3-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-glfw-3.2.3-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-backend-lwjgl3-1.10.0.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.2.3-natives-linux.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.2.3-natives-macos.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-openal-3.2.3-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-openal-3.2.3-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-opengl-3.2.3-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-opengl-3.2.3-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.2.3-natives-windows.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-jemalloc-3.2.3-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-jemalloc-3.2.3-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-glfw-3.2.3-natives-linux.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-glfw-3.2.3-natives-macos.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.2.3-natives-linux-arm32.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.2.3-natives-linux-arm64.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-3.2.3-natives-windows-x86.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-glfw-3.2.3-natives-windows.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-openal-3.2.3-natives-linux.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-openal-3.2.3-natives-macos.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-opengl-3.2.3-natives-linux.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-opengl-3.2.3-natives-macos.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-backend-lwjgl3-1.10.0-javadoc.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-backend-lwjgl3-1.10.0-sources.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jinput-platform-2.0.5-natives-osx.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-jemalloc-3.2.3-natives-linux.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-jemalloc-3.2.3-natives-macos.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-openal-3.2.3-natives-windows.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-opengl-3.2.3-natives-windows.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gdx-platform-1.10.0-natives-desktop.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jinput-platform-2.0.5-natives-linux.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-glfw-3.2.3-natives-linux-arm32.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-glfw-3.2.3-natives-linux-arm64.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-glfw-3.2.3-natives-windows-x86.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-jemalloc-3.2.3-natives-windows.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jinput-platform-2.0.5-natives-windows.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-openal-3.2.3-natives-linux-arm32.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-openal-3.2.3-natives-linux-arm64.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-openal-3.2.3-natives-windows-x86.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-opengl-3.2.3-natives-linux-arm32.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-opengl-3.2.3-natives-linux-arm64.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-opengl-3.2.3-natives-windows-x86.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-jemalloc-3.2.3-natives-linux-arm32.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-jemalloc-3.2.3-natives-linux-arm64.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/lwjgl-jemalloc-3.2.3-natives-windows-x86.jar" path-in-jar="/" />
|
||||||
</root>
|
</root>
|
||||||
</artifact>
|
</artifact>
|
||||||
</component>
|
</component>
|
||||||
7
.idea/kotlinc.xml
generated
@@ -1,10 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="Kotlin2JvmCompilerArguments">
|
|
||||||
<option name="jvmTarget" value="1.8" />
|
|
||||||
</component>
|
|
||||||
<component name="KotlinCommonCompilerArguments">
|
<component name="KotlinCommonCompilerArguments">
|
||||||
<option name="apiVersion" value="1.2" />
|
<option name="apiVersion" value="1.4" />
|
||||||
<option name="languageVersion" value="1.2" />
|
<option name="languageVersion" value="1.4" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
4
.idea/libraries/KotlinJavaRuntime.xml
generated
Executable file → Normal file
@@ -1,16 +1,14 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="KotlinJavaRuntime">
|
<library name="KotlinJavaRuntime">
|
||||||
<CLASSES>
|
<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-stdlib.jar!/" />
|
||||||
|
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
|
||||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-test.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-jdk7.jar!/" />
|
||||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk8.jar!/" />
|
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-stdlib-jdk8.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<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-stdlib-sources.jar!/" />
|
||||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect-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-test-sources.jar!/" />
|
||||||
|
|||||||
10
.idea/libraries/TesterLib.xml
generated
@@ -1,10 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="TesterLib">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="file://$PROJECT_DIR$/FontTestGDX/lib" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC />
|
|
||||||
<SOURCES />
|
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/FontTestGDX/lib" recursive="false" />
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
3
.idea/libraries/GdxLib.xml → .idea/libraries/lib.xml
generated
Executable file → Normal file
@@ -1,5 +1,5 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="GdxLib">
|
<library name="lib">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$PROJECT_DIR$/lib" />
|
<root url="file://$PROJECT_DIR$/lib" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
</NATIVE>
|
</NATIVE>
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="file://$PROJECT_DIR$/lib" />
|
<root url="file://$PROJECT_DIR$/lib" />
|
||||||
<root url="jar://$PROJECT_DIR$/lib/gdx.jar!/" />
|
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
|
||||||
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" type="SOURCES" />
|
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" type="SOURCES" />
|
||||||
124
.idea/uiDesigner.xml
generated
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Palette2">
|
||||||
|
<group name="Swing">
|
||||||
|
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="Button" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="RadioButton" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="CheckBox" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||||
|
<initial-values>
|
||||||
|
<property name="text" value="Label" />
|
||||||
|
</initial-values>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||||
|
<preferred-size width="150" height="-1" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||||
|
<preferred-size width="150" height="50" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||||
|
<preferred-size width="200" height="200" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||||
|
<preferred-size width="200" height="200" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||||
|
<preferred-size width="-1" height="20" />
|
||||||
|
</default-constraints>
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||||
|
</item>
|
||||||
|
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||||
|
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||||
|
</item>
|
||||||
|
</group>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
146
.idea/workspace.xml
generated
Executable file → Normal file
@@ -5,16 +5,35 @@
|
|||||||
<artifact name="TerrarumSansBitmap" />
|
<artifact name="TerrarumSansBitmap" />
|
||||||
</artifacts-to-build>
|
</artifacts-to-build>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="AutoImportSettings">
|
||||||
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
|
</component>
|
||||||
<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$/.idea/artifacts/TerrarumSansBitmap.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/artifacts/TerrarumSansBitmap.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/FontTestGDX/FontTestGDX.iml" beforeDir="false" afterPath="$PROJECT_DIR$/FontTestGDX/FontTestGDX.iml" 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/META-INF/MANIFEST.MF" beforeDir="false" afterPath="$PROJECT_DIR$/FontTestGDX/META-INF/MANIFEST.MF" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/assets/cjkpunct.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/cjkpunct.tga" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/FontTestGDX/lib/TerrarumSansBitmap.jar" beforeDir="false" />
|
<change beforePath="$PROJECT_DIR$/assets/currencies_variable.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/currencies_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$/assets/futhark.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/futhark.tga" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/assets/latinExtC_variable.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/latinExtC_variable.tga" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/assets/richtext_furigana.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/richtext_furigana.tga" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/assets/typewriter/typewriter_intl_qwerty.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/typewriter/typewriter_intl_qwerty.tga" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/assets/typewriter/typewriter_ko_3set-390.tga" beforeDir="false" afterPath="$PROJECT_DIR$/assets/typewriter/typewriter_ko_3set-390.tga" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/assets/wenquanyi.tga.gz" beforeDir="false" afterPath="$PROJECT_DIR$/assets/wenquanyi.tga.gz" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/font_drawing_template.png" beforeDir="false" afterPath="$PROJECT_DIR$/font_drawing_template.png" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/glyph_height_pos_annotation.png" beforeDir="false" afterPath="$PROJECT_DIR$/glyph_height_pos_annotation.png" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/samples/wikipedia_x86.png" beforeDir="false" afterPath="$PROJECT_DIR$/samples/wikipedia_x86.png" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/terrarum_sans_cyrillic_2.png" beforeDir="false" afterPath="$PROJECT_DIR$/terrarum_sans_cyrillic_2.png" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/testing.PNG" beforeDir="false" afterPath="$PROJECT_DIR$/testing.PNG" 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" />
|
<change beforePath="$PROJECT_DIR$/testtext.txt" beforeDir="false" afterPath="$PROJECT_DIR$/testtext.txt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/width_bit_encoding_annotated.png" beforeDir="false" afterPath="$PROJECT_DIR$/width_bit_encoding_annotated.png" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/work_files/typewriter_input/alphnum_glyphs_master.kra" beforeDir="false" afterPath="$PROJECT_DIR$/work_files/typewriter_input/alphnum_glyphs_master.kra" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/work_files/typewriter_input/alphnum_glyphs_resized.kra" beforeDir="false" afterPath="$PROJECT_DIR$/work_files/typewriter_input/alphnum_glyphs_resized.kra" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/work_files/typewriter_input/hangul_3set_glyphs_master.kra" beforeDir="false" afterPath="$PROJECT_DIR$/work_files/typewriter_input/hangul_3set_glyphs_master.kra" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/work_files/typewriter_input/typewriter_input_template.psd" beforeDir="false" afterPath="$PROJECT_DIR$/work_files/typewriter_input/typewriter_input_template.psd" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/work_files/typewriter_input/typewriter_intl_qwerty.psd" beforeDir="false" afterPath="$PROJECT_DIR$/work_files/typewriter_input/typewriter_intl_qwerty.psd" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/work_files/typewriter_input/typewriter_ko_3set-390.psd" beforeDir="false" afterPath="$PROJECT_DIR$/work_files/typewriter_input/typewriter_ko_3set-390.psd" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/work_files/typewriter_input/typewriter_ko_3set_glyphs_resized.kra" beforeDir="false" afterPath="$PROJECT_DIR$/work_files/typewriter_input/typewriter_ko_3set_glyphs_resized.kra" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -33,22 +52,30 @@
|
|||||||
<component name="Git.Settings">
|
<component name="Git.Settings">
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="GitSEFilterConfiguration">
|
||||||
|
<file-type-list>
|
||||||
|
<filtered-out-file-type name="LOCAL_BRANCH" />
|
||||||
|
<filtered-out-file-type name="REMOTE_BRANCH" />
|
||||||
|
<filtered-out-file-type name="TAG" />
|
||||||
|
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
|
||||||
|
</file-type-list>
|
||||||
|
</component>
|
||||||
|
<component name="MarkdownSettingsMigration">
|
||||||
|
<option name="stateVersion" value="1" />
|
||||||
|
</component>
|
||||||
<component name="ProjectId" id="1aVE5t6KObkWt36lb07GBy1GY1S" />
|
<component name="ProjectId" id="1aVE5t6KObkWt36lb07GBy1GY1S" />
|
||||||
<component name="ProjectViewState">
|
<component name="ProjectViewState">
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">
|
<component name="PropertiesComponent">{
|
||||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
"keyToString": {
|
||||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
"last_opened_file_path": "/home/torvald/Documents/Terrarum-sans-bitmap",
|
||||||
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
"project.structure.last.edited": "Artifacts",
|
||||||
<property name="SearchEverywhereHistoryKey" value="HashMap	PSI	JAVA://java.util.HashMap soft wr	ACTION	EditorToggleUseSoftWraps" />
|
"project.structure.proportion": "0.0",
|
||||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/lib" />
|
"project.structure.side.proportion": "0.0"
|
||||||
<property name="project.structure.last.edited" value="Modules" />
|
}
|
||||||
<property name="project.structure.proportion" value="0.15" />
|
}</component>
|
||||||
<property name="project.structure.side.proportion" value="0.32068965" />
|
|
||||||
<property name="settings.editor.selected.configurable" value="preferences.language.Kotlin" />
|
|
||||||
</component>
|
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="MoveFile.RECENT_KEYS">
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
<recent name="C:\Users\minjaesong\Documents\Terrarum-sans-bitmap\" />
|
<recent name="C:\Users\minjaesong\Documents\Terrarum-sans-bitmap\" />
|
||||||
@@ -56,7 +83,7 @@
|
|||||||
<recent name="C:\Users\minjaesong\Documents\Terrarum-sans-bitmap\FontTestGDX\src" />
|
<recent name="C:\Users\minjaesong\Documents\Terrarum-sans-bitmap\FontTestGDX\src" />
|
||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager">
|
<component name="RunManager" selected="Kotlin.FontTestGDXKt">
|
||||||
<configuration default="true" type="Applet">
|
<configuration default="true" type="Applet">
|
||||||
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
|
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
@@ -90,14 +117,8 @@
|
|||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="FontTestGDXKt" type="JetRunConfigurationType" temporary="true">
|
<configuration name="FontTestGDXKt" type="JetRunConfigurationType" temporary="true">
|
||||||
<module name="FontTestGDX" />
|
|
||||||
<option name="VM_PARAMETERS" value="" />
|
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH" />
|
|
||||||
<option name="PASS_PARENT_ENVS" value="true" />
|
|
||||||
<option name="MAIN_CLASS_NAME" value="FontTestGDXKt" />
|
<option name="MAIN_CLASS_NAME" value="FontTestGDXKt" />
|
||||||
<option name="WORKING_DIRECTORY" value="" />
|
<module name="FontTestGDX" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
<option name="BuildArtifacts" enabled="true">
|
<option name="BuildArtifacts" enabled="true">
|
||||||
@@ -105,36 +126,15 @@
|
|||||||
</option>
|
</option>
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<configuration name="TypewriterGDXKt" type="JetRunConfigurationType" temporary="true" nameIsGenerated="true">
|
||||||
|
<option name="MAIN_CLASS_NAME" value="TypewriterGDXKt" />
|
||||||
|
<module name="FontTestGDX" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
<configuration default="true" type="KotlinStandaloneScriptRunConfigurationType">
|
<configuration default="true" type="KotlinStandaloneScriptRunConfigurationType">
|
||||||
<option name="filePath" />
|
<option name="filePath" />
|
||||||
<option name="vmParameters" />
|
|
||||||
<option name="alternativeJrePath" />
|
|
||||||
<option name="programParameters" />
|
|
||||||
<option name="passParentEnvs" value="true" />
|
|
||||||
<option name="workingDirectory" />
|
|
||||||
<option name="isAlternativeJrePathEnabled" value="false" />
|
|
||||||
<option name="VM_PARAMETERS" />
|
|
||||||
<option name="PROGRAM_PARAMETERS" />
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH" />
|
|
||||||
<option name="PASS_PARENT_ENVS" value="true" />
|
|
||||||
<option name="MAIN_CLASS_NAME" />
|
|
||||||
<option name="WORKING_DIRECTORY" />
|
|
||||||
<module name="" />
|
|
||||||
<option name="filePath" />
|
|
||||||
<option name="vmParameters" />
|
|
||||||
<option name="alternativeJrePath" />
|
|
||||||
<option name="programParameters" />
|
|
||||||
<option name="passParentEnvs" value="true" />
|
|
||||||
<option name="workingDirectory" />
|
|
||||||
<option name="isAlternativeJrePathEnabled" value="false" />
|
|
||||||
<option name="VM_PARAMETERS" />
|
|
||||||
<option name="PROGRAM_PARAMETERS" />
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
|
||||||
<option name="ALTERNATIVE_JRE_PATH" />
|
|
||||||
<option name="PASS_PARENT_ENVS" value="true" />
|
|
||||||
<option name="MAIN_CLASS_NAME" />
|
|
||||||
<option name="WORKING_DIRECTORY" />
|
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
@@ -160,6 +160,7 @@
|
|||||||
<recent_temporary>
|
<recent_temporary>
|
||||||
<list>
|
<list>
|
||||||
<item itemvalue="Kotlin.FontTestGDXKt" />
|
<item itemvalue="Kotlin.FontTestGDXKt" />
|
||||||
|
<item itemvalue="Kotlin.TypewriterGDXKt" />
|
||||||
</list>
|
</list>
|
||||||
</recent_temporary>
|
</recent_temporary>
|
||||||
</component>
|
</component>
|
||||||
@@ -196,45 +197,10 @@
|
|||||||
</entry>
|
</entry>
|
||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
<option name="oldMeFiltersMigrated" value="true" />
|
|
||||||
</component>
|
</component>
|
||||||
<component name="WindowStateProjectService">
|
<component name="XSLT-Support.FileAssociations.UIState">
|
||||||
<state x="86" y="97" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1601262877161">
|
<expand />
|
||||||
<screen x="72" y="0" width="1848" height="1080" />
|
<select />
|
||||||
</state>
|
|
||||||
<state x="86" y="97" key="#com.intellij.execution.impl.EditConfigurationsDialog/72.0.1848.1080@72.0.1848.1080" timestamp="1601262877161" />
|
|
||||||
<state x="391" y="199" key="FileChooserDialogImpl" timestamp="1601263114996">
|
|
||||||
<screen x="72" y="0" width="1848" height="1080" />
|
|
||||||
</state>
|
|
||||||
<state x="391" y="199" key="FileChooserDialogImpl/72.0.1848.1080@72.0.1848.1080" timestamp="1601263114996" />
|
|
||||||
<state width="1802" height="288" key="GridCell.Tab.0.bottom" timestamp="1601263214814">
|
|
||||||
<screen x="72" y="0" width="1848" height="1080" />
|
|
||||||
</state>
|
|
||||||
<state width="1802" height="288" key="GridCell.Tab.0.bottom/72.0.1848.1080@72.0.1848.1080" timestamp="1601263214814" />
|
|
||||||
<state width="1802" height="288" key="GridCell.Tab.0.center" timestamp="1601263214814">
|
|
||||||
<screen x="72" y="0" width="1848" height="1080" />
|
|
||||||
</state>
|
|
||||||
<state width="1802" height="288" key="GridCell.Tab.0.center/72.0.1848.1080@72.0.1848.1080" timestamp="1601263214814" />
|
|
||||||
<state width="1802" height="288" key="GridCell.Tab.0.left" timestamp="1601263214814">
|
|
||||||
<screen x="72" y="0" width="1848" height="1080" />
|
|
||||||
</state>
|
|
||||||
<state width="1802" height="288" key="GridCell.Tab.0.left/72.0.1848.1080@72.0.1848.1080" timestamp="1601263214814" />
|
|
||||||
<state width="1802" height="288" key="GridCell.Tab.0.right" timestamp="1601263214814">
|
|
||||||
<screen x="72" y="0" width="1848" height="1080" />
|
|
||||||
</state>
|
|
||||||
<state width="1802" height="288" key="GridCell.Tab.0.right/72.0.1848.1080@72.0.1848.1080" timestamp="1601263214814" />
|
|
||||||
<state x="91" y="33" key="SettingsEditor" timestamp="1601263194258">
|
|
||||||
<screen x="72" y="0" width="1848" height="1080" />
|
|
||||||
</state>
|
|
||||||
<state x="91" y="33" key="SettingsEditor/72.0.1848.1080@72.0.1848.1080" timestamp="1601263194258" />
|
|
||||||
<state width="502" height="446" key="SwitcherDM" timestamp="1601260171295">
|
|
||||||
<screen x="72" y="0" width="1848" height="1080" />
|
|
||||||
</state>
|
|
||||||
<state width="502" height="446" key="SwitcherDM/72.0.1848.1080@72.0.1848.1080" timestamp="1601260171295" />
|
|
||||||
<state width="600" height="428" key="javadoc.popup" timestamp="1601255716058">
|
|
||||||
<screen x="72" y="0" width="1848" height="1080" />
|
|
||||||
</state>
|
|
||||||
<state width="600" height="428" key="javadoc.popup/72.0.1848.1080@72.0.1848.1080" timestamp="1601255716058" />
|
|
||||||
</component>
|
</component>
|
||||||
<component name="antWorkspaceConfiguration">
|
<component name="antWorkspaceConfiguration">
|
||||||
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
|
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
|
||||||
|
|||||||
4
BuildJAR_TerrarumSansBitmap.iml
Executable file → Normal file
@@ -5,9 +5,9 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="jdk" jdkName="1.8.0_242" jdkType="JavaSDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||||
<orderEntry type="library" name="GdxLib" level="project" />
|
<orderEntry type="library" scope="PROVIDED" name="lib" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
110
CONTRIBUTING.md
@@ -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.
|
#### Before getting started, you did read our design goals, right? Good. Now you may continue your awesome work.
|
||||||
|
|
||||||
### Ascenders, descenders, width informations (aka Glyph Tags)
|
## Ascenders, descenders, width informations (aka Glyph Tags)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -26,11 +26,11 @@ Each cell is 16 px wide, and any glyph you draw **must be contained within lefts
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Font Metrics
|
## Font Metrics for variable-width font sheets
|
||||||
|
|
||||||
Although the font is basically a Spritesheet, some of the sheet expects variable widths to be supported. Any sheets with ```_variable``` means it expects variable widths. Anything else expects fixed width (regular Spritesheet behaviour). ```cjkpunct``` has width of 10, ```kana``` and ```hangul_johab``` has width of 12, ```wenquanyi``` has width of 16.
|
Although the font is basically a Spritesheet, some of the sheet expects variable widths to be supported. Any sheets with ```_variable``` means it expects variable widths. Anything else expects fixed width (regular Spritesheet behaviour). ```cjkpunct``` has width of 10, ```kana``` and ```hangul_johab``` has width of 12, ```wenquanyi``` has width of 16.
|
||||||
|
|
||||||
### Parsing glyph widths for variable font sheets
|
### Parsing Glyph Tags
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -38,21 +38,95 @@ Width is encoded in binary bits, on pixels. On the font spritesheet, every glyph
|
|||||||
|
|
||||||
### Glyph Tags
|
### Glyph Tags
|
||||||
|
|
||||||
Green-tinted area (should be 10 px tall) contains the tags. Tags are defined as following:
|
Rightmost vertical column (should be 20 px tall) contains the tags. Tags are defined as following:
|
||||||
|
|
||||||
```
|
```
|
||||||
(LSB) 0 == Use Compiler Directive (Undefined right now, keep it as 0)
|
(LSB) W -,
|
||||||
1 -, 1 = Align to this X pos of prev char,
|
W |
|
||||||
1 | 2 = only valid if write-on-top is 1
|
W |= Width of the character
|
||||||
1 | 4 = and is centre-aligned and non-zero
|
W |
|
||||||
1 -' 8 = (if this is zero, floorOf(width/2) will be used instead)
|
W -'
|
||||||
0 -, 0 Align 1 Align 0 Align 1 Align before
|
m --Is this character lowheight?
|
||||||
1 -' 0 left 0 right 1 centre 1 the glyph
|
K -,
|
||||||
1 == write-on-top, usually it's diatritics but not always (e.g. devanagari vowel sign O)
|
K |= Tags used by the "Keming Machine"
|
||||||
1 -, 0 Stack 1 Stack 0 Before 1 Up &
|
K -'
|
||||||
(MSB) 0 -' 0 up 0 down 1 &After 1 Down (e.g. U+0C48)
|
Q ---Compiler Directive (see below)
|
||||||
|
n --,
|
||||||
|
Y -, `-Nudging Bits (see below)
|
||||||
|
X |
|
||||||
|
Y |= Diacritics Anchor Points (see below)
|
||||||
|
X -'
|
||||||
|
A -,_ 0 Align 1 Align 0 Align 1 Align before
|
||||||
|
A -' 0 Left 0 Right 1 Centre 1 the glyph
|
||||||
|
D --Diacritics Type Bit (see below; not all diacritics are actually marked as a diacritics on the spritesheet)
|
||||||
|
S -,_ 0 Stack 1 Stack 0 Before 1 Up &
|
||||||
|
(MSB) S -' 0 up 0 down 1 &After 1 Down* (e.g. U+0C48)
|
||||||
|
|
||||||
|
Align Centre and Align Right will respect the diacritics anchor points.
|
||||||
|
The Align Right AND Custom anchor point is being used for Thai diacritics.
|
||||||
|
When a width AND diacritics type bit is set, the entire glyph is shifted to the right as specified and the space of same width will be inserted.
|
||||||
|
(See SUNDANESE PAMINGKAL U+1BA1)
|
||||||
|
|
||||||
|
Up&Down:
|
||||||
|
1. when two pixels are both #00FF00 it's "don't stack"
|
||||||
|
2. otherwise, it's actually up&down
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Nudging Bits Encoding
|
||||||
|
|
||||||
|
<MSB,Red> SXXXXXXX SYYYYYYY 00000000 <LSB,Blue>
|
||||||
|
|
||||||
|
Each X and Y numbers are Signed 8-Bit Integer.
|
||||||
|
|
||||||
|
X-positive: nudges towards left
|
||||||
|
Y-positive: nudges towards up
|
||||||
|
|
||||||
|
#### Diacritics Anchor Point Encoding
|
||||||
|
|
||||||
|
4 Pixels are further divided as follows:
|
||||||
|
|
||||||
|
| LSB | | Red | Green | Blue |
|
||||||
|
| ------------ | ------------ | ------------ | ------------ | ------------ |
|
||||||
|
| Y | Anchor point Y for: | undefined | undefined | undefined |
|
||||||
|
| X | Anchor point X for: | undefined | undefined | undefined |
|
||||||
|
| Y | Anchor point Y for: | (unused) | (unused) | (unused) |
|
||||||
|
| X | Anchor point X for: | Type-0 | Type-1 | Type-2 |
|
||||||
|
| **MSB** | | | | |
|
||||||
|
|
||||||
|
<MSB,Red> 1Y1Y1Y1Y 1Y2Y2Y2Y 1Y3Y3Y3Y <LSB,Blue>
|
||||||
|
<MSB,Red> 1X1X1X1X 1X2X2X2X 1X3X3X3X <LSB,Blue>
|
||||||
|
|
||||||
|
where Red is first, Green is second, Blue is the third diacritics.
|
||||||
|
MSB for each word must be set so that the pixel would appear brighter on the image editor.
|
||||||
|
(the font program will only read low 7 bits for each RGB channel)
|
||||||
|
|
||||||
|
#### Diacritics Type Bit Encoding
|
||||||
|
|
||||||
|
<MSB,Red> FFFFFFFF FFFFFFFF FFFFFFFF <LSB,Blue> (For Type-0)
|
||||||
|
<MSB,Red> TTTT0000 00000000 00000000 <LSB,Blue> (For Type-1 to Type-15)
|
||||||
|
|
||||||
|
Certain types of diacritics have predefined meanings (but some writing systems define their own meaning e.g. Devanagari):
|
||||||
|
|
||||||
|
* Type-0: Above
|
||||||
|
* Type-1: Below (when it should be separated from being above)
|
||||||
|
* Type-2: Overlaid (will shift down 2 pixels for lowheight glyphs instead of the default of 4 pixels)
|
||||||
|
|
||||||
|
|
||||||
|
#### Compiler Directives
|
||||||
|
|
||||||
|
<MSB,Red> [Opcode] [arg1] [arg2] <LSB,Blue>
|
||||||
|
|
||||||
|
Currently supported opcodes:
|
||||||
|
|
||||||
|
*00000000: No-operation; does not use the Compiler Directive system.
|
||||||
|
|
||||||
|
*10000111: Replace a character with maximum 7 subchars.
|
||||||
|
Replacement characters are encoded vertically from X-zero, bit by bit
|
||||||
|
(colour of the pixel doesn't matter) with LSB sitting on Y-zero.
|
||||||
|
|
||||||
|
*11111111: Tagging Used by the Subsystems. e.g. #FF0000 marks invalid combination.
|
||||||
|
|
||||||
#### Stack Up/Down
|
#### Stack Up/Down
|
||||||
|
|
||||||
When the tag is stack-up, it'll be drawn 4 px lower if the underlying
|
When the tag is stack-up, it'll be drawn 4 px lower if the underlying
|
||||||
@@ -80,6 +154,10 @@ This tag can be used as a general "replace this with these" directive, as long a
|
|||||||
|
|
||||||
Also note that the font compiler will not "stack" these diacritics.
|
Also note that the font compiler will not "stack" these diacritics.
|
||||||
|
|
||||||
|
#### The Keming Machine Tags
|
||||||
|
|
||||||
|
Keming Machine Tags define the rough shape of the glyph. Please read `keming_machine.txt` for further information.
|
||||||
|
|
||||||
|
|
||||||
#### NOTES
|
#### NOTES
|
||||||
- If glyphs are right or centre aligned, they must be aligned in the same way inside of the bitmap; the font compiler assumes every variable-width glyphs to have a width of 15, regardless of the tagged width.
|
- If glyphs are right or centre aligned, they must be aligned in the same way inside of the bitmap; the font compiler assumes every variable-width glyphs to have a width of 15, regardless of the tagged width.
|
||||||
@@ -89,13 +167,13 @@ 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 Ꮺ)
|
(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
|
## 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.
|
- 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.
|
- 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.
|
||||||
- Due to how the compiler is coded, actual glyph must have alpha value of 255, the tags must have alpha values LESS THAN 255 (and obviously greater than zero). RGB plane of the TGA image doesn't do anything, keep it as #FFFFFF white.
|
- Due to how the compiler is coded, actual glyph must have alpha value of 255, the tags must have alpha values LESS THAN 255 (and obviously greater than zero). RGB plane of the TGA image doesn't do anything, keep it as #FFFFFF white.
|
||||||
|
|
||||||
### Implementing the Korean writing system
|
## Implementation of 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.
|
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.
|
||||||
|
|
||||||
|
|||||||
BIN
FontDemoGDX.jar
7
FontTestGDX/FontTestGDX.iml
Executable file → Normal file
@@ -5,11 +5,10 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="jdk" jdkName="1.8.0_242" jdkType="JavaSDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<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" />
|
<orderEntry type="module" module-name="BuildJAR_TerrarumSansBitmap" />
|
||||||
|
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||||
|
<orderEntry type="library" name="lib" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
Manifest-Version: 1.0
|
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 lib/TerrarumSansB
|
|
||||||
itmap.jar
|
|
||||||
Main-Class: FontTestGDXKt
|
Main-Class: FontTestGDXKt
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,30 @@
|
|||||||
import com.badlogic.gdx.*
|
import com.badlogic.gdx.*
|
||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplication
|
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application
|
||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration
|
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration
|
||||||
|
import com.badlogic.gdx.files.FileHandle
|
||||||
import com.badlogic.gdx.graphics.*
|
import com.badlogic.gdx.graphics.*
|
||||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||||
|
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||||
import com.badlogic.gdx.graphics.glutils.FrameBuffer
|
import com.badlogic.gdx.graphics.glutils.FrameBuffer
|
||||||
import com.badlogic.gdx.utils.ScreenUtils
|
import com.badlogic.gdx.utils.ScreenUtils
|
||||||
import net.torvald.terrarumsansbitmap.gdx.GameFontBase
|
import com.badlogic.gdx.utils.StreamUtils
|
||||||
|
import net.torvald.terrarumsansbitmap.MovableType
|
||||||
|
import net.torvald.terrarumsansbitmap.gdx.CodepointSequence
|
||||||
|
import net.torvald.terrarumsansbitmap.gdx.TerrarumSansBitmap
|
||||||
|
import java.io.File
|
||||||
|
import java.io.IOException
|
||||||
|
import java.io.OutputStream
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by minjaesong on 2018-07-26.
|
* Created by minjaesong on 2018-07-26.
|
||||||
*/
|
*/
|
||||||
class FontTestGDX : Game() {
|
class FontTestGDX : Game() {
|
||||||
|
|
||||||
lateinit var font: GameFontBase
|
lateinit var font: TerrarumSansBitmap
|
||||||
|
|
||||||
lateinit var inputText: List<String>
|
lateinit var inputText: String
|
||||||
|
|
||||||
lateinit var batch: SpriteBatch
|
lateinit var batch: FlippingSpriteBatch
|
||||||
|
|
||||||
lateinit var frameBuffer: FrameBuffer
|
lateinit var frameBuffer: FrameBuffer
|
||||||
|
|
||||||
@@ -24,35 +32,64 @@ class FontTestGDX : Game() {
|
|||||||
|
|
||||||
private val testing = false
|
private val testing = false
|
||||||
|
|
||||||
private val demotextName = if (testing) "testtext.txt" else "demotext.txt"
|
private val demotextName = if (testing) "testtext.txt" else "demotext_unaligned.txt"
|
||||||
private val outimageName = if (testing) "testing.PNG" else "demo.PNG"
|
private val outimageName = if (testing) "testing.PNG" else "demo.PNG"
|
||||||
|
|
||||||
|
private lateinit var faketex: Texture
|
||||||
|
|
||||||
|
private val lineHeight = 24
|
||||||
|
|
||||||
|
|
||||||
|
lateinit var layout: MovableType
|
||||||
|
|
||||||
|
private lateinit var testtex: TextureRegion
|
||||||
|
|
||||||
override fun create() {
|
override fun create() {
|
||||||
font = GameFontBase("./assets", flipY = false, errorOnUnknownChar = false) // must test for two flipY cases
|
font = TerrarumSansBitmap("./assets", debug = true, flipY = false, errorOnUnknownChar = false, shadowAlpha = 0.5f) // must test for two flipY cases
|
||||||
|
// font.scale = 2
|
||||||
|
// font.interchar = 1
|
||||||
|
|
||||||
|
testtex = TextureRegion(Texture("./testtex.tga"))
|
||||||
|
|
||||||
val inTextFile = Gdx.files.internal("./$demotextName")
|
val inTextFile = Gdx.files.internal("./$demotextName")
|
||||||
val reader = inTextFile.reader("UTF-8")
|
val reader = inTextFile.reader("UTF-8")
|
||||||
inputText = reader.readLines()
|
inputText = reader.readLines().joinToString("\n")
|
||||||
reader.close()
|
reader.close()
|
||||||
|
|
||||||
batch = SpriteBatch()
|
batch = FlippingSpriteBatch()
|
||||||
|
|
||||||
|
|
||||||
|
// create faketex
|
||||||
|
val fakepix = Pixmap(1,1,Pixmap.Format.RGBA8888)
|
||||||
println(font.charsetOverrideDefault)
|
fakepix.drawPixel(0,0,-1)
|
||||||
println(font.charsetOverrideBulgarian)
|
faketex = Texture(fakepix)
|
||||||
println(font.charsetOverrideSerbian)
|
fakepix.dispose()
|
||||||
|
|
||||||
frameBuffer = FrameBuffer(Pixmap.Format.RGBA8888, TEXW, TEXH, true)
|
frameBuffer = FrameBuffer(Pixmap.Format.RGBA8888, TEXW, TEXH, true)
|
||||||
|
|
||||||
camera = OrthographicCamera(TEXW.toFloat(), TEXH.toFloat())
|
camera = OrthographicCamera(TEXW.toFloat(), TEXH.toFloat())
|
||||||
camera.translate(TEXW.div(2f), 0f)
|
camera.translate(0f, 0f)
|
||||||
camera.setToOrtho(true, TEXW.toFloat(), TEXH.toFloat())
|
camera.setToOrtho(false, TEXW.toFloat(), TEXH.toFloat())
|
||||||
camera.update()
|
camera.update()
|
||||||
|
|
||||||
|
|
||||||
Gdx.input.inputProcessor = Navigator(this)
|
Gdx.input.inputProcessor = Navigator(this)
|
||||||
|
|
||||||
|
|
||||||
|
println(font.charsetOverrideCodestyle)
|
||||||
|
println(font.charsetOverrideDefault)
|
||||||
|
|
||||||
|
val cs1 = CodepointSequence(listOf(0, 65, 0))
|
||||||
|
val cs2 = CodepointSequence(listOf(0, 65))
|
||||||
|
val cs3 = CodepointSequence(listOf(65, 0))
|
||||||
|
val cs4 = CodepointSequence(listOf(65))
|
||||||
|
println("w1: ${font.getWidthNormalised(cs1)}; ${font.getWidth(cs1)}")
|
||||||
|
println("w2: ${font.getWidthNormalised(cs2)}; ${font.getWidth(cs2)}")
|
||||||
|
println("w3: ${font.getWidthNormalised(cs3)}; ${font.getWidth(cs3)}")
|
||||||
|
println("w4: ${font.getWidthNormalised(cs4)}; ${font.getWidth(cs4)}")
|
||||||
|
println("These four numbers must match, even with interchar > 0")
|
||||||
|
|
||||||
|
layout = font.typesetParagraph(batch, inputText, TEXW - 48)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getScreen(): Screen? {
|
override fun getScreen(): Screen? {
|
||||||
@@ -67,6 +104,8 @@ class FontTestGDX : Game() {
|
|||||||
var tex: Texture? = null
|
var tex: Texture? = null
|
||||||
var screenshotExported = false
|
var screenshotExported = false
|
||||||
|
|
||||||
|
private val backcol = Color(.141f, .141f, .141f, 1f)
|
||||||
|
|
||||||
override fun render() {
|
override fun render() {
|
||||||
|
|
||||||
if (tex == null) {
|
if (tex == null) {
|
||||||
@@ -76,15 +115,27 @@ class FontTestGDX : Game() {
|
|||||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||||
Gdx.gl.glEnable(GL20.GL_TEXTURE_2D)
|
Gdx.gl.glEnable(GL20.GL_TEXTURE_2D)
|
||||||
Gdx.gl.glEnable(GL20.GL_BLEND)
|
Gdx.gl.glEnable(GL20.GL_BLEND)
|
||||||
Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA)
|
batch.setBlendFunctionSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA) // for not premultiplied textures
|
||||||
|
|
||||||
batch.projectionMatrix = camera.combined
|
batch.projectionMatrix = camera.combined
|
||||||
batch.begin()
|
batch.begin()
|
||||||
|
|
||||||
batch.color = Color(0xeeeeeeff.toInt())
|
batch.color = backcol
|
||||||
inputText.forEachIndexed { index, s ->
|
batch.draw(faketex, 0f, 0f, TEXW.toFloat(), TEXH.toFloat())
|
||||||
font.draw(batch, s, 10f, TEXH - 30f - index * font.lineHeight)
|
batch.flush()
|
||||||
}
|
|
||||||
|
batch.color = Color.WHITE
|
||||||
|
// inputText.forEachIndexed { index, s ->
|
||||||
|
// font.draw(batch, s, 10f, TEXH - 30f - index * lineHeight)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// draw position debuggers
|
||||||
|
// font.draw(batch, "soft\uFE0F\u00ADhyphen\uFE0F\u00ADated", 24f, 12f)
|
||||||
|
// batch.draw(testtex, 24f, 12f)
|
||||||
|
// val layoutDrawCall = { x: Float, y: Float, _: Int -> batch.draw(testtex, x, y) }
|
||||||
|
// layout.draw(batch, 24f, 12f, mapOf(0 to layoutDrawCall))
|
||||||
|
// end of draw position debuggers
|
||||||
|
layout.draw(batch, 24f, 12f)
|
||||||
|
|
||||||
batch.end()
|
batch.end()
|
||||||
|
|
||||||
@@ -94,6 +145,7 @@ class FontTestGDX : Game() {
|
|||||||
val pixmap = ScreenUtils.getFrameBufferPixmap(0, 0, frameBuffer.width, frameBuffer.height)
|
val pixmap = ScreenUtils.getFrameBufferPixmap(0, 0, frameBuffer.width, frameBuffer.height)
|
||||||
|
|
||||||
PixmapIO.writePNG(Gdx.files.local(outimageName), pixmap)
|
PixmapIO.writePNG(Gdx.files.local(outimageName), pixmap)
|
||||||
|
// writeTGA(Gdx.files.local(outimageName), pixmap, false)
|
||||||
pixmap.dispose()
|
pixmap.dispose()
|
||||||
|
|
||||||
screenshotExported = true
|
screenshotExported = true
|
||||||
@@ -107,11 +159,19 @@ class FontTestGDX : Game() {
|
|||||||
tex = frameBuffer.colorBufferTexture
|
tex = frameBuffer.colorBufferTexture
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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)
|
||||||
|
batch.setBlendFunctionSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA) // for not premultiplied textures
|
||||||
|
|
||||||
|
camera.setToOrtho(true, WIDTH.toFloat(), HEIGHT.toFloat())
|
||||||
|
|
||||||
|
batch.projectionMatrix = camera.combined
|
||||||
batch.begin()
|
batch.begin()
|
||||||
batch.color = Color.WHITE
|
batch.color = Color.WHITE
|
||||||
batch.draw(tex, 0f, (TEXH.toFloat()/appConfig.height)*TEXH - scrollOffsetY, TEXW.toFloat(), -(TEXH.toFloat() / appConfig.height) * TEXH.toFloat())
|
batch.draw(tex!!, 0f, scrollOffsetY)
|
||||||
|
|
||||||
|
|
||||||
batch.end()
|
batch.end()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,22 +186,24 @@ class FontTestGDX : Game() {
|
|||||||
|
|
||||||
override fun dispose() {
|
override fun dispose() {
|
||||||
font.dispose()
|
font.dispose()
|
||||||
|
faketex.dispose()
|
||||||
|
testtex.texture.dispose()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun scrollAdd(x: Int = 1) {
|
fun scrollAdd(x: Int = 1) {
|
||||||
scrollOffsetY -= (TEXH.toFloat() / appConfig.height) * 20f * x
|
scrollOffsetY += lineHeight * x
|
||||||
}
|
}
|
||||||
|
|
||||||
fun scrollSub(x: Int = 1) {
|
fun scrollSub(x: Int = 1) {
|
||||||
scrollOffsetY += (TEXH.toFloat() / appConfig.height) * 20f * x
|
scrollOffsetY -= lineHeight * x
|
||||||
}
|
}
|
||||||
|
|
||||||
class Navigator(val main: FontTestGDX) : InputAdapter() {
|
class Navigator(val main: FontTestGDX) : InputAdapter() {
|
||||||
override fun scrolled(amount: Int): Boolean {
|
override fun scrolled(amountX: Float, amountY: Float): Boolean {
|
||||||
if (amount >= 0)
|
if (amountY >= 0)
|
||||||
main.scrollSub(amount)
|
main.scrollSub(amountY.toInt())
|
||||||
else
|
else
|
||||||
main.scrollAdd(-amount)
|
main.scrollAdd(-amountY.toInt())
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -155,19 +217,149 @@ class FontTestGDX : Game() {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(IOException::class)
|
||||||
|
private fun writeTGA(file: FileHandle, pixmap: Pixmap, flipY: Boolean) {
|
||||||
|
val output = file.write(false)
|
||||||
|
try {
|
||||||
|
_writeTGA(output, pixmap, true, flipY)
|
||||||
|
} finally {
|
||||||
|
StreamUtils.closeQuietly(output)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(IOException::class)
|
||||||
|
private fun _writeTGA(out: OutputStream, pixmap: Pixmap, verbatim: Boolean, flipY: Boolean) {
|
||||||
|
val width: ByteArray = toShortLittle(pixmap.width)
|
||||||
|
val height: ByteArray = toShortLittle(pixmap.height)
|
||||||
|
val zero: ByteArray = toShortLittle(0)
|
||||||
|
out.write(0) // ID field: empty
|
||||||
|
out.write(0) // no colour map, but should be ignored anyway as it being unmapped RGB
|
||||||
|
out.write(2) // 2 means unmapped RGB
|
||||||
|
out.write(byteArrayOf(0, 0, 0, 0, 0)) // color map spec: empty
|
||||||
|
out.write(zero) // x origin: 0
|
||||||
|
out.write(zero) // y origin: 0
|
||||||
|
out.write(width) // width
|
||||||
|
out.write(height) // height
|
||||||
|
out.write(32) // image pixel size: we're writing 32-bit image (8bpp BGRA)
|
||||||
|
out.write(8) // image descriptor: dunno, Photoshop writes 8 in there
|
||||||
|
|
||||||
|
// write actual image data
|
||||||
|
// since we're following Photoshop's conventional header, we also follows Photoshop's
|
||||||
|
// TGA saving scheme, that is:
|
||||||
|
// 1. BGRA order
|
||||||
|
// 2. Y-Flipped but not X-Flipped
|
||||||
|
if (!flipY) {
|
||||||
|
for (y in pixmap.height - 1 downTo 0) {
|
||||||
|
for (x in 0 until pixmap.width) {
|
||||||
|
writeTga(x, y, verbatim, pixmap, out)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (y in 0 until pixmap.height) {
|
||||||
|
for (x in 0 until pixmap.width) {
|
||||||
|
writeTga(x, y, verbatim, pixmap, out)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// write footer
|
||||||
|
// 00 00 00 00 00 00 00 00 TRUEVISION-XFILE 2E 00
|
||||||
|
out.write(byteArrayOf(0, 0, 0, 0, 0, 0, 0, 0))
|
||||||
|
if (verbatim) out.write("TRUEVISION-XFILE".toByteArray()) else out.write("TerrarumHappyTGA".toByteArray())
|
||||||
|
out.write(byteArrayOf(0x2E, 0))
|
||||||
|
out.flush()
|
||||||
|
out.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
private val zeroalpha = byteArrayOf(0, 0, 0, 0)
|
||||||
|
@Throws(IOException::class)
|
||||||
|
private fun writeTga(x: Int, y: Int, verbatim: Boolean, pixmap: Pixmap, out: OutputStream) {
|
||||||
|
val color = pixmap.getPixel(x, y)
|
||||||
|
|
||||||
|
// if alpha == 0, write special value instead
|
||||||
|
if (verbatim && color and 0xFF == 0) {
|
||||||
|
out.write(zeroalpha)
|
||||||
|
} else {
|
||||||
|
out.write(RGBAtoBGRA(color))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun toShortLittle(i: Int): ByteArray {
|
||||||
|
return byteArrayOf(
|
||||||
|
(i and 0xFF).toByte(),
|
||||||
|
(i ushr 8 and 0xFF).toByte()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun RGBAtoBGRA(rgba: Int): ByteArray {
|
||||||
|
return byteArrayOf(
|
||||||
|
(rgba ushr 8 and 0xFF).toByte(),
|
||||||
|
(rgba ushr 16 and 0xFF).toByte(),
|
||||||
|
(rgba ushr 24 and 0xFF).toByte(),
|
||||||
|
(rgba and 0xFF).toByte()
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lateinit var appConfig: LwjglApplicationConfiguration
|
class FlippingSpriteBatch(size: Int = 1000) : SpriteBatch(size) {
|
||||||
const val TEXW = 874
|
|
||||||
const val TEXH = 2400
|
/**
|
||||||
|
* This function draws the flipped version of the image by giving flipped uv-coord to the SpriteBatch
|
||||||
|
*/
|
||||||
|
override fun draw(texture: Texture, x: Float, y: Float, width: Float, height: Float) =
|
||||||
|
draw(texture, x, y, width, height, 0f, 0f, 1f, 1f)
|
||||||
|
|
||||||
|
override fun draw(texture: Texture, x: Float, y: Float) =
|
||||||
|
draw(texture, x, y, texture.width.toFloat(), texture.height.toFloat(), 0f, 0f, 1f, 1f)
|
||||||
|
|
||||||
|
fun drawFlipped(texture: Texture, x: Float, y: Float, width: Float, height: Float) =
|
||||||
|
draw(texture, x, y, width, height, 0f, 1f, 1f, 0f)
|
||||||
|
fun drawFlipped(texture: Texture, x: Float, y: Float) =
|
||||||
|
draw(texture, x, y, texture.width.toFloat(), texture.height.toFloat(), 0f, 1f, 1f, 0f)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function does obey the flipping set to the TextureRegion and try to draw flipped version of it,
|
||||||
|
* without touching the flipping setting of the given region.
|
||||||
|
*/
|
||||||
|
override fun draw(region: TextureRegion, x: Float, y: Float, width: Float, height: Float) =
|
||||||
|
draw(region.texture, x, y, width, height, region.u, region.v, region.u2, region.v2)
|
||||||
|
|
||||||
|
override fun draw(region: TextureRegion, x: Float, y: Float) =
|
||||||
|
draw(region.texture, x, y, region.regionWidth.toFloat(), region.regionHeight.toFloat(), region.u, region.v, region.u2, region.v2)
|
||||||
|
|
||||||
|
fun drawFlipped(region: TextureRegion, x: Float, y: Float, width: Float, height: Float) =
|
||||||
|
draw(region.texture, x, y, width, height, region.u, region.v2, region.u2, region.v)
|
||||||
|
fun drawFlipped(region: TextureRegion, x: Float, y: Float) =
|
||||||
|
draw(region.texture, x, y, region.regionWidth.toFloat(), region.regionHeight.toFloat(), region.u, region.v2, region.u2, region.v)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE TO SELF:
|
||||||
|
*
|
||||||
|
* It seems that original SpriteBatch Y-flips when it's drawing a texture, but NOT when it's drawing a textureregion
|
||||||
|
*
|
||||||
|
* (textureregion's default uv-coord is (0,0,1,1)
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
lateinit var appConfig: Lwjgl3ApplicationConfiguration
|
||||||
|
const val TEXW = 800
|
||||||
|
const val TEXH = 24 * 171
|
||||||
|
|
||||||
|
const val WIDTH = TEXW
|
||||||
|
const val HEIGHT = 768
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
appConfig = LwjglApplicationConfiguration()
|
appConfig = Lwjgl3ApplicationConfiguration()
|
||||||
appConfig.vSyncEnabled = false
|
appConfig.useVsync(false)
|
||||||
appConfig.resizable = false//true;
|
appConfig.setResizable(false)
|
||||||
appConfig.width = TEXW
|
appConfig.setWindowedMode(WIDTH, HEIGHT)
|
||||||
appConfig.height = 768
|
appConfig.setTitle("Terrarum Sans Bitmap Test")
|
||||||
appConfig.title = "Terrarum Sans Bitmap Test (GDX)"
|
|
||||||
|
|
||||||
LwjglApplication(FontTestGDX(), appConfig)
|
Lwjgl3Application(FontTestGDX(), appConfig)
|
||||||
}
|
}
|
||||||
|
|||||||
247
FontTestGDX/src/TypewriterGDX.kt
Normal file
@@ -0,0 +1,247 @@
|
|||||||
|
import com.badlogic.gdx.Game
|
||||||
|
import com.badlogic.gdx.Gdx
|
||||||
|
import com.badlogic.gdx.Input
|
||||||
|
import com.badlogic.gdx.InputAdapter
|
||||||
|
import com.badlogic.gdx.audio.AudioDevice
|
||||||
|
import com.badlogic.gdx.audio.Sound
|
||||||
|
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application
|
||||||
|
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration
|
||||||
|
import com.badlogic.gdx.graphics.Color
|
||||||
|
import com.badlogic.gdx.graphics.GL20
|
||||||
|
import com.badlogic.gdx.graphics.OrthographicCamera
|
||||||
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||||
|
import com.badlogic.gdx.utils.GdxRuntimeException
|
||||||
|
import net.torvald.terrarum.gamecontroller.InputStrober
|
||||||
|
import net.torvald.terrarumsansbitmap.gdx.CodepointSequence
|
||||||
|
import net.torvald.terrarumtypewriterbitmap.gdx.TerrarumTypewriterBitmap
|
||||||
|
import java.io.StringReader
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by minjaesong on 2021-11-05.
|
||||||
|
*/
|
||||||
|
class TypewriterGDX(val width: Int, val height: Int, val cols: Int, val hmargin: Int, val vmargin: Int) : Game() {
|
||||||
|
|
||||||
|
lateinit var font: TerrarumTypewriterBitmap
|
||||||
|
lateinit var batch: SpriteBatch
|
||||||
|
// lateinit var frameBuffer: FrameBuffer
|
||||||
|
lateinit var camera: OrthographicCamera
|
||||||
|
|
||||||
|
lateinit var inputStrober: InputStrober
|
||||||
|
|
||||||
|
lateinit var sndMovingkey: Sound
|
||||||
|
lateinit var sndDeadkey: Sound
|
||||||
|
lateinit var sndShiftin: Sound
|
||||||
|
lateinit var sndShiftout: Sound
|
||||||
|
lateinit var sndSpace: Sound
|
||||||
|
lateinit var sndCRs: Array<Sound>
|
||||||
|
lateinit var sndLF: Sound
|
||||||
|
|
||||||
|
override fun create() {
|
||||||
|
font = TerrarumTypewriterBitmap(
|
||||||
|
"./assets/typewriter",
|
||||||
|
StringReader(
|
||||||
|
"""ko_kr_3set-390_typewriter,typewriter_ko_3set-390.tga,16
|
||||||
|
|en_intl_qwerty_typewriter,typewriter_intl_qwerty.tga,0
|
||||||
|
""".trimMargin()
|
||||||
|
),
|
||||||
|
true, false, 256, true
|
||||||
|
)
|
||||||
|
|
||||||
|
batch = SpriteBatch()
|
||||||
|
|
||||||
|
// frameBuffer = FrameBuffer(Pixmap.Format.RGBA8888, TEXW, TEXH, true)
|
||||||
|
|
||||||
|
camera = OrthographicCamera(width.toFloat(), height.toFloat())
|
||||||
|
camera.translate(width.div(2f), 0f)
|
||||||
|
camera.setToOrtho(true, width.toFloat(), height.toFloat())
|
||||||
|
camera.update()
|
||||||
|
|
||||||
|
|
||||||
|
inputStrober = InputStrober(this)
|
||||||
|
|
||||||
|
try {
|
||||||
|
sndMovingkey = Gdx.audio.newSound(Gdx.files.internal("assets/typewriter/audio/movingkey.wav"))
|
||||||
|
sndDeadkey = Gdx.audio.newSound(Gdx.files.internal("assets/typewriter/audio/deadkey.wav"))
|
||||||
|
sndShiftin = Gdx.audio.newSound(Gdx.files.internal("assets/typewriter/audio/shiftin.wav"))
|
||||||
|
sndShiftout = Gdx.audio.newSound(Gdx.files.internal("assets/typewriter/audio/shiftout.wav"))
|
||||||
|
sndSpace = Gdx.audio.newSound(Gdx.files.internal("assets/typewriter/audio/space.wav"))
|
||||||
|
|
||||||
|
sndCRs = Array(6) {
|
||||||
|
Gdx.audio.newSound(Gdx.files.internal("assets/typewriter/audio/cr$it.wav"))
|
||||||
|
}
|
||||||
|
|
||||||
|
sndLF = Gdx.audio.newSound(Gdx.files.internal("assets/typewriter/audio/crlf.wav"))
|
||||||
|
}
|
||||||
|
catch (e: GdxRuntimeException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val intro = listOf(
|
||||||
|
39,50,29, // kva (HANG_GONG)
|
||||||
|
42,31, // nc (HANG_SE)
|
||||||
|
74,48,51, // ;tw (HANG_BEOL)
|
||||||
|
62, // space
|
||||||
|
0x561F71, // shiftin
|
||||||
|
184,164,171,170, // >HON (ASC_3-90)
|
||||||
|
0x561F70, // shiftout
|
||||||
|
62, // space
|
||||||
|
74,48, // ;t (HANG_BEO)
|
||||||
|
43,12, // o5 (HANG_CYU)
|
||||||
|
38,48,51, // jtw (HANG_EOL)
|
||||||
|
0x561F71, // shiftin
|
||||||
|
164, // H (ASC_-)
|
||||||
|
0x561F70, // shiftout
|
||||||
|
75,34, // 'f (HANG_TA)
|
||||||
|
40,34, // lf (HANG_JA)
|
||||||
|
39,32, // kd (HANG_GI)
|
||||||
|
Input.Keys.ENTER,Input.Keys.ENTER
|
||||||
|
)
|
||||||
|
|
||||||
|
private val textbuf: ArrayList<CodepointSequence> = arrayListOf(
|
||||||
|
CodepointSequence()
|
||||||
|
)
|
||||||
|
|
||||||
|
var keylayoutbase = 0xFA000
|
||||||
|
private val printableKeys = ((Input.Keys.NUM_0..Input.Keys.NUM_9) + (Input.Keys.A..Input.Keys.PERIOD) + 62 + (Input.Keys.BACKSPACE..Input.Keys.SLASH)).toHashSet()
|
||||||
|
|
||||||
|
var initDone = false
|
||||||
|
var initTimer = 0f
|
||||||
|
var initTypingCursor = 0
|
||||||
|
var keystrokeDelay = 0.08f
|
||||||
|
|
||||||
|
fun acceptKey(keycode: Int, force: Boolean = false) {
|
||||||
|
if (initDone || force) {
|
||||||
|
// println("[TypewriterGDX] Accepting key: $keycode")
|
||||||
|
|
||||||
|
val lowkeycode = keycode and 127
|
||||||
|
|
||||||
|
if (keycode == Input.Keys.ENTER) {
|
||||||
|
val tbufsize = textbuf.last().size.div(cols.toFloat()).times(6f).coerceIn(0f, 6f).roundToInt() // 0..6
|
||||||
|
textbuf.add(CodepointSequence())
|
||||||
|
if (tbufsize == 0) sndLF.play()
|
||||||
|
else sndCRs[tbufsize - 1].play()
|
||||||
|
} else if (printableKeys.contains(lowkeycode)) {
|
||||||
|
val cp = keycode + keylayoutbase
|
||||||
|
textbuf.last().add(cp)
|
||||||
|
// println("[TypewriterGDX] width: ${font.glyphProps[cp]}")
|
||||||
|
|
||||||
|
// play audio
|
||||||
|
val isDeadkey = font.glyphProps[cp]?.width == 0
|
||||||
|
if (isDeadkey) {
|
||||||
|
sndDeadkey.play()
|
||||||
|
} else if (lowkeycode == Input.Keys.SPACE || lowkeycode == Input.Keys.BACKSPACE) {
|
||||||
|
sndSpace.play()
|
||||||
|
} else {
|
||||||
|
sndMovingkey.play()
|
||||||
|
}
|
||||||
|
} else if (lowkeycode == Input.Keys.SHIFT_LEFT || lowkeycode == Input.Keys.SHIFT_RIGHT) {
|
||||||
|
sndShiftin.play()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For Shift-out only
|
||||||
|
*/
|
||||||
|
fun shiftOut() {
|
||||||
|
sndShiftout.play()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private val textCol = Color(0.1f,0.1f,0.1f,1f)
|
||||||
|
override fun render() {
|
||||||
|
Gdx.gl.glClearColor(0.97f,0.96f,0.95f,1f)
|
||||||
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT)
|
||||||
|
Gdx.gl.glEnable(GL20.GL_TEXTURE_2D)
|
||||||
|
Gdx.gl.glEnable(GL20.GL_BLEND)
|
||||||
|
Gdx.gl.glBlendFuncSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE)
|
||||||
|
|
||||||
|
batch.projectionMatrix = camera.combined
|
||||||
|
batch.begin()
|
||||||
|
|
||||||
|
batch.color = textCol
|
||||||
|
|
||||||
|
try {
|
||||||
|
textbuf.forEachIndexed { index, s ->
|
||||||
|
font.draw(batch, s, hmargin.toFloat(), vmargin.toFloat() + 20 * index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e: ConcurrentModificationException) {}
|
||||||
|
|
||||||
|
batch.end()
|
||||||
|
|
||||||
|
if (!initDone) {
|
||||||
|
while (initTimer > keystrokeDelay) {
|
||||||
|
val keyToType = intro[initTypingCursor]
|
||||||
|
|
||||||
|
if (keyToType < 256) {
|
||||||
|
acceptKey(keyToType, true)
|
||||||
|
}
|
||||||
|
else if (keyToType == 0x561F71) {
|
||||||
|
acceptKey(Input.Keys.SHIFT_LEFT + 128, true)
|
||||||
|
}
|
||||||
|
else if (keyToType == 0x561F70) {
|
||||||
|
shiftOut()
|
||||||
|
}
|
||||||
|
initTypingCursor += 1
|
||||||
|
initTimer -= keystrokeDelay
|
||||||
|
|
||||||
|
if (keyToType == Input.Keys.ENTER)
|
||||||
|
initTimer -= 0.35f
|
||||||
|
else if (keyToType == 0x561F71)
|
||||||
|
initTimer -= 0.15f
|
||||||
|
else if (keyToType == 0x561F70)
|
||||||
|
initTimer -= 0.1f
|
||||||
|
else
|
||||||
|
initTimer -= Math.random().toFloat() * 0.04f
|
||||||
|
}
|
||||||
|
|
||||||
|
initTimer += Gdx.graphics.deltaTime
|
||||||
|
|
||||||
|
if (initTypingCursor >= intro.size) {
|
||||||
|
initDone = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun dispose() {
|
||||||
|
font.dispose()
|
||||||
|
batch.dispose()
|
||||||
|
inputStrober.dispose()
|
||||||
|
sndMovingkey.dispose()
|
||||||
|
sndDeadkey.dispose()
|
||||||
|
sndShiftin.dispose()
|
||||||
|
sndShiftout.dispose()
|
||||||
|
sndSpace.dispose()
|
||||||
|
sndCRs.forEach { it.dispose() }
|
||||||
|
sndLF.dispose()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TypewriterInput(val main: TypewriterGDX) : InputAdapter() {
|
||||||
|
|
||||||
|
private var shiftIn = false
|
||||||
|
|
||||||
|
override fun keyDown(keycode: Int): Boolean {
|
||||||
|
// FIXME this shiftIn would not work at all...
|
||||||
|
shiftIn = (keycode == Input.Keys.SHIFT_LEFT || keycode == Input.Keys.SHIFT_RIGHT)
|
||||||
|
if (keycode < 128 && keycode != Input.Keys.SHIFT_LEFT && keycode != Input.Keys.SHIFT_RIGHT) {
|
||||||
|
main.acceptKey(shiftIn.toInt() * 128 + keycode)
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun Boolean.toInt() = if (this) 1 else 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
appConfig = Lwjgl3ApplicationConfiguration()
|
||||||
|
appConfig.useVsync(false)
|
||||||
|
appConfig.setResizable(false)
|
||||||
|
appConfig.setWindowedMode(534, 668)
|
||||||
|
appConfig.setTitle("Terrarum Typewriter Bitmap Test")
|
||||||
|
|
||||||
|
Lwjgl3Application(TypewriterGDX(534, 668, 64, 32, 24), appConfig)
|
||||||
|
}
|
||||||
@@ -0,0 +1,401 @@
|
|||||||
|
package net.torvald.terrarum.gamecontroller
|
||||||
|
|
||||||
|
import TypewriterGDX
|
||||||
|
import com.badlogic.gdx.Gdx
|
||||||
|
import com.badlogic.gdx.Input
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by minjaesong on 2021-11-06.
|
||||||
|
*/
|
||||||
|
class InputStrober(val typewriter: TypewriterGDX) {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val KEY_DOWN = 0
|
||||||
|
const val KEY_CHANGE = 1
|
||||||
|
const val N_KEY_ROLLOVER = 8
|
||||||
|
}
|
||||||
|
|
||||||
|
var KEYBOARD_DELAYS = longArrayOf(0L,250000000L,0L,25000000L,0L)
|
||||||
|
private var stroboTime = 0L
|
||||||
|
private var stroboStatus = 0
|
||||||
|
private var repeatCount = 0
|
||||||
|
private var oldKeys = IntArray(N_KEY_ROLLOVER) { 0 }
|
||||||
|
/** always Low Layer */
|
||||||
|
// private var keymap = IME.getLowLayerByName(App.getConfigString("basekeyboardlayout"))
|
||||||
|
|
||||||
|
private val thread = Thread { while (!Thread.interrupted()) {
|
||||||
|
if (Gdx.input != null) withKeyboardEvent()
|
||||||
|
} }
|
||||||
|
|
||||||
|
init {
|
||||||
|
// println("InputStrobe start")
|
||||||
|
thread.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun dispose() {
|
||||||
|
thread.interrupt()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun resetKeyboardStrobo() {
|
||||||
|
stroboStatus = 0
|
||||||
|
repeatCount = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// code proudly stolen from tsvm's TVDOS.SYS
|
||||||
|
private fun withKeyboardEvent() {
|
||||||
|
val keys = strobeKeys()
|
||||||
|
var keyChanged = !arrayEq(keys, oldKeys)
|
||||||
|
val keyDiff = arrayDiff(keys, oldKeys)
|
||||||
|
|
||||||
|
// println("Key strobed: ${keys.joinToString()}")
|
||||||
|
|
||||||
|
if (stroboStatus % 2 == 0 && (keys[0] != 0 || oldKeys[0] != 0)) {
|
||||||
|
stroboStatus += 1
|
||||||
|
stroboTime = System.nanoTime()
|
||||||
|
repeatCount += 1
|
||||||
|
|
||||||
|
val shiftin = keys.contains(Input.Keys.SHIFT_LEFT) || keys.contains(Input.Keys.SHIFT_RIGHT)
|
||||||
|
val newKeysym0 = keysToStr(keyDiff)
|
||||||
|
|
||||||
|
val newKeysym = if (newKeysym0 == null) null
|
||||||
|
else if (shiftin && newKeysym0.size > 1 && newKeysym0[1]?.isNotBlank() == true) newKeysym0[1]
|
||||||
|
else newKeysym0[0]
|
||||||
|
|
||||||
|
val headKeyCode = (if (keyDiff.size < 1) keys[0] else keyDiff[0]).and(127) or (if (shiftin) 128 else 0)
|
||||||
|
|
||||||
|
if (repeatCount == 1) {
|
||||||
|
if (!keyChanged) {
|
||||||
|
// println("KEY_DOWN '$keysym' ($headKeyCode) $repeatCount; ${keys.joinToString()}")
|
||||||
|
// App.inputStrobed(TerrarumKeyboardEvent(KEY_DOWN, keysym, headKeyCode, repeatCount, keys))
|
||||||
|
typewriter.acceptKey(headKeyCode)
|
||||||
|
} else if (newKeysym != null) {
|
||||||
|
// println("KEY_DOWC '$newKeysym' ($headKeyCode) $repeatCount; ${keys.joinToString()}")
|
||||||
|
// App.inputStrobed(TerrarumKeyboardEvent(KEY_DOWN, newKeysym, headKeyCode, repeatCount, keys))
|
||||||
|
typewriter.acceptKey(headKeyCode)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// println("shiftin=${shiftin} oldkeys=${oldKeys.joinToString()}")
|
||||||
|
|
||||||
|
if (!shiftin && (oldKeys.contains(Input.Keys.SHIFT_LEFT) || oldKeys.contains(Input.Keys.SHIFT_RIGHT))) {
|
||||||
|
typewriter.shiftOut()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
oldKeys = keys // don't put this outside of if-cascade
|
||||||
|
}
|
||||||
|
else if (keyChanged || keys[0] == 0) {
|
||||||
|
stroboStatus = 0
|
||||||
|
repeatCount = 0
|
||||||
|
|
||||||
|
if (keys[0] == 0) keyChanged = false
|
||||||
|
}
|
||||||
|
else if (stroboStatus % 2 == 1 && System.nanoTime() - stroboTime < KEYBOARD_DELAYS[stroboStatus]) {
|
||||||
|
Thread.sleep(1L)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
stroboStatus += 1
|
||||||
|
if (stroboStatus >= 4)
|
||||||
|
stroboStatus = 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun keysToStr(keys: IntArray): Array<String?>? {
|
||||||
|
if (keys.isEmpty()) return null
|
||||||
|
val headkey = keys[0]
|
||||||
|
return keymap[headkey]
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun strobeKeys(): IntArray {
|
||||||
|
var keysPushed = 0
|
||||||
|
val keyEventBuffers = IntArray(N_KEY_ROLLOVER) { 0 }
|
||||||
|
for (k in 1..254) {
|
||||||
|
if (Gdx.input.isKeyPressed(k)) {
|
||||||
|
keyEventBuffers[keysPushed] = k
|
||||||
|
keysPushed += 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keysPushed >= N_KEY_ROLLOVER) break
|
||||||
|
}
|
||||||
|
return keyEventBuffers
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun arrayEq(a: IntArray, b: IntArray): Boolean {
|
||||||
|
for (i in a.indices) {
|
||||||
|
if (a[i] != b.getOrNull(i)) return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun arrayDiff(a: IntArray, b: IntArray): IntArray {
|
||||||
|
return a.filter { !b.contains(it) }.toIntArray()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private val keymap = arrayOf(arrayOf<String?>(""),arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>("<HOME>"),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>("<CALL>"),
|
||||||
|
arrayOf<String?>("<ENDCALL>"),
|
||||||
|
arrayOf<String?>("0",")"),
|
||||||
|
arrayOf<String?>("1","!"),
|
||||||
|
arrayOf<String?>("2","@"),
|
||||||
|
arrayOf<String?>("3","#"),
|
||||||
|
arrayOf<String?>("4","$"),
|
||||||
|
arrayOf<String?>("5","%"),
|
||||||
|
arrayOf<String?>("6","^"),
|
||||||
|
arrayOf<String?>("7","&"),
|
||||||
|
arrayOf<String?>("8","*"),
|
||||||
|
arrayOf<String?>("9","("),
|
||||||
|
arrayOf<String?>("*"),
|
||||||
|
arrayOf<String?>("#"),
|
||||||
|
arrayOf<String?>("<UP>"),
|
||||||
|
arrayOf<String?>("<DOWN>"),
|
||||||
|
arrayOf<String?>("<LEFT>"),
|
||||||
|
arrayOf<String?>("<RIGHT>"),
|
||||||
|
arrayOf<String?>("<CENTER>"),
|
||||||
|
arrayOf<String?>("<VOL_UP>"),
|
||||||
|
arrayOf<String?>("<VOL_DOWN>"),
|
||||||
|
arrayOf<String?>("<POWER>"),
|
||||||
|
arrayOf<String?>("<CAMERA>"),
|
||||||
|
arrayOf<String?>("<CLEAR>"),
|
||||||
|
arrayOf<String?>("a","A"),
|
||||||
|
arrayOf<String?>("b","B"),
|
||||||
|
arrayOf<String?>("c","C"),
|
||||||
|
arrayOf<String?>("d","D"),
|
||||||
|
arrayOf<String?>("e","E"),
|
||||||
|
arrayOf<String?>("f","F"),
|
||||||
|
arrayOf<String?>("g","G"),
|
||||||
|
arrayOf<String?>("h","H"),
|
||||||
|
arrayOf<String?>("i","I"),
|
||||||
|
arrayOf<String?>("j","J"),
|
||||||
|
arrayOf<String?>("k","K"),
|
||||||
|
arrayOf<String?>("l","L"),
|
||||||
|
arrayOf<String?>("m","M"),
|
||||||
|
arrayOf<String?>("n","N"),
|
||||||
|
arrayOf<String?>("o","O"),
|
||||||
|
arrayOf<String?>("p","P"),
|
||||||
|
arrayOf<String?>("q","Q"),
|
||||||
|
arrayOf<String?>("r","R"),
|
||||||
|
arrayOf<String?>("s","S"),
|
||||||
|
arrayOf<String?>("t","T"),
|
||||||
|
arrayOf<String?>("u","U"),
|
||||||
|
arrayOf<String?>("v","V"),
|
||||||
|
arrayOf<String?>("w","W"),
|
||||||
|
arrayOf<String?>("x","X"),
|
||||||
|
arrayOf<String?>("y","Y"),
|
||||||
|
arrayOf<String?>("z","Z"),
|
||||||
|
arrayOf<String?>(",","<"),
|
||||||
|
arrayOf<String?>(".",">"),
|
||||||
|
arrayOf<String?>("<ALT_L>"),
|
||||||
|
arrayOf<String?>("<ALT_R>"),
|
||||||
|
arrayOf<String?>("<SHIFT_L>"),
|
||||||
|
arrayOf<String?>("<SHIFT_R>"),
|
||||||
|
arrayOf<String?>("<TAB>"),
|
||||||
|
arrayOf<String?>(" "),
|
||||||
|
arrayOf<String?>("<SYM>"),
|
||||||
|
arrayOf<String?>("<EXPLORER>"),
|
||||||
|
arrayOf<String?>("<ENVELOPE>"),
|
||||||
|
arrayOf<String?>("\n"),
|
||||||
|
arrayOf<String?>("\u0008"),
|
||||||
|
arrayOf<String?>("`","~"),
|
||||||
|
arrayOf<String?>("-","_"),
|
||||||
|
arrayOf<String?>("=","+"),
|
||||||
|
arrayOf<String?>("arrayOf<String?>(","{"),
|
||||||
|
arrayOf<String?>(")","}"),
|
||||||
|
arrayOf<String?>("\\","|"),
|
||||||
|
arrayOf<String?>(";",":"),
|
||||||
|
arrayOf<String?>("'","\""),
|
||||||
|
arrayOf<String?>("/","?"),
|
||||||
|
arrayOf<String?>("<AT>"),
|
||||||
|
arrayOf<String?>("<NUM_LOCK>"),
|
||||||
|
arrayOf<String?>("<HEADSETHOOK>"),
|
||||||
|
arrayOf<String?>("<FOCUS>"),
|
||||||
|
arrayOf<String?>("+"),
|
||||||
|
arrayOf<String?>("<MENU>"),
|
||||||
|
arrayOf<String?>("<NOTIFICATION>"),
|
||||||
|
arrayOf<String?>("<SEARCH>"),
|
||||||
|
arrayOf<String?>("<PLAY_PAUSE>"),
|
||||||
|
arrayOf<String?>("<STOP>"),
|
||||||
|
arrayOf<String?>("<NEXT>"),
|
||||||
|
arrayOf<String?>("<PREV>"),
|
||||||
|
arrayOf<String?>("<REW>"),
|
||||||
|
arrayOf<String?>("<FFWD>"),
|
||||||
|
arrayOf<String?>("<MUTE>"),
|
||||||
|
arrayOf<String?>("<PAGE_UP>"),
|
||||||
|
arrayOf<String?>("<PAGE_DOWN>"),
|
||||||
|
arrayOf<String?>("<PICTSYMBOLS>"),
|
||||||
|
arrayOf<String?>("<SW:>TCH_CHARSET>"),
|
||||||
|
arrayOf<String?>("<:A:>"),
|
||||||
|
arrayOf<String?>("<:B:>"),
|
||||||
|
arrayOf<String?>("<:C:>"),
|
||||||
|
arrayOf<String?>("<:X:>"),
|
||||||
|
arrayOf<String?>("<:Y:>"),
|
||||||
|
arrayOf<String?>("<:Z:>"),
|
||||||
|
arrayOf<String?>("<:L1:>"),
|
||||||
|
arrayOf<String?>("<:R1:>"),
|
||||||
|
arrayOf<String?>("<:L2:>"),
|
||||||
|
arrayOf<String?>("<:R2:>"),
|
||||||
|
arrayOf<String?>("<:TL:>"),
|
||||||
|
arrayOf<String?>("<:TR:>"),
|
||||||
|
arrayOf<String?>("<:START:>"),
|
||||||
|
arrayOf<String?>("<:SELECT:>"),
|
||||||
|
arrayOf<String?>("<:MODE:>"),
|
||||||
|
arrayOf<String?>("<ESC>"),
|
||||||
|
arrayOf<String?>("<DEL>"),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>("<CAPS_LOCK>"),
|
||||||
|
arrayOf<String?>("<SCROLL_LOCK>"),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>("<PRINT_SCREEN_SYS_RQ>"),
|
||||||
|
arrayOf<String?>("<PAUSE_BREAK>"),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>("<END>"),
|
||||||
|
arrayOf<String?>("<INSERT>"),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>("<CTRL_L>"),
|
||||||
|
arrayOf<String?>("<CTRL_R>"),
|
||||||
|
arrayOf<String?>("<F1>"),
|
||||||
|
arrayOf<String?>("<F2>"),
|
||||||
|
arrayOf<String?>("<F3>"),
|
||||||
|
arrayOf<String?>("<F4>"),
|
||||||
|
arrayOf<String?>("<F5>"),
|
||||||
|
arrayOf<String?>("<F6>"),
|
||||||
|
arrayOf<String?>("<F7>"),
|
||||||
|
arrayOf<String?>("<F8>"),
|
||||||
|
arrayOf<String?>("<F9>"),
|
||||||
|
arrayOf<String?>("<F10>"),
|
||||||
|
arrayOf<String?>("<F11>"),
|
||||||
|
arrayOf<String?>("<F12>"),
|
||||||
|
arrayOf<String?>("<NUM_LOCK>"),
|
||||||
|
arrayOf<String?>("0"),
|
||||||
|
arrayOf<String?>("1"),
|
||||||
|
arrayOf<String?>("2"),
|
||||||
|
arrayOf<String?>("3"),
|
||||||
|
arrayOf<String?>("4"),
|
||||||
|
arrayOf<String?>("5"),
|
||||||
|
arrayOf<String?>("6"),
|
||||||
|
arrayOf<String?>("7"),
|
||||||
|
arrayOf<String?>("8"),
|
||||||
|
arrayOf<String?>("9"),
|
||||||
|
arrayOf<String?>("/"),
|
||||||
|
arrayOf<String?>("*"),
|
||||||
|
arrayOf<String?>("-"),
|
||||||
|
arrayOf<String?>("+"),
|
||||||
|
arrayOf<String?>("."),
|
||||||
|
arrayOf<String?>("."),
|
||||||
|
arrayOf<String?>("\n"),
|
||||||
|
arrayOf<String?>("="),
|
||||||
|
arrayOf<String?>("("),
|
||||||
|
arrayOf<String?>(")"),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>(null),
|
||||||
|
arrayOf<String?>("<:CIRCLE:>")
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
data class TerrarumKeyboardEvent(
|
||||||
|
val type: Int,
|
||||||
|
val character: String?, // representative key symbol
|
||||||
|
val headkey: Int, // representative keycode
|
||||||
|
val repeatCount: Int,
|
||||||
|
val keycodes: IntArray
|
||||||
|
)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2017-2020 see CONTRIBUTORS.txt
|
Copyright (c) 2017-2024 CuriousTorvald (minjaesong)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
57
README.md
@@ -2,16 +2,16 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
This font is a bitmap font used in [my game project called Terrarum](https://github.com/minjaesong/Terrarum) (hence the name). The font supports more than 90 % of european languages, as well as Chinese, Japanese and Korean. More technical side, it supports Latin-1 Supplement, Latin Ext-A/B/C, IPA Extension, Greek, Cyrillic (+ Bulgarian, Serbian variants) and the supplement, Armenian, Devanagari, Bengali, Thai, Georgian (Mkhedruli and Mtavruli), General Punctuations, Super/Subscrips, CJK Punctuations, All of the Kana (minus the Hentaigana), Chinese (limited to Unihan and Ext-A), Hangul (every possible syllables) and Fullwidth forms.
|
This font is a bitmap font used in [my game project called Terrarum](https://github.com/minjaesong/Terrarum) (hence the name). The font supports more than 90 % of european languages, as well as Chinese, Japanese, and Korean.
|
||||||
|
|
||||||
The JAR package is meant to be used with LibGDX (extends ```BitmapFont``` class). If you are not using the framework, please refer to the __Font metrics__ section to implement the font metrics correctly on your system.
|
The JAR package is meant to be used with LibGDX (extends ```BitmapFont``` class). If you are not using the framework, please refer to the __Font metrics__ section to implement the font metrics correctly on your system.
|
||||||
|
|
||||||
The issue page is open. If you have some issues to submit, or have a question, please leave it on the page.
|
The issue page is open. If you have some issues to submit, or have a question, please leave it on the page.
|
||||||
|
|
||||||
#### Little notes
|
#### Notes and Limitations
|
||||||
- To display Bulgarian/Serbian variants, you need special Control Characters. (GameFontBase.charsetOverrideBulgarian -- U+FFFC1; GameFontBase.charsetOverrideSerbian -- U+FFFC2)
|
- Displaying Bulgarian/Serbian variants of Cyrillic requires 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 people can understand other's variant and as long as I can, we don't bother anyway.
|
- All Han characters are in Mainland Chinese variant. There is no plan to support the other variants unless there is someone willing to do the drawing of the characters
|
||||||
- Indian script in general is not perfect: right now 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.
|
- Only the Devanagari and Tamil has full (as much as I can) ligature support for Indic scripts -- Bengali script does not have any ligature support
|
||||||
- Slick2d versions are now unsupported. I couldn't extend myself to work on both versions, but I'm still welcome to merge your pull requests.
|
- Slick2d versions are now unsupported. I couldn't extend myself to work on both versions, but I'm still welcome to merge your pull requests.
|
||||||
|
|
||||||
### Design Goals
|
### Design Goals
|
||||||
@@ -33,12 +33,14 @@ The issue page is open. If you have some issues to submit, or have a question, p
|
|||||||
|
|
||||||
On your code (Kotlin):
|
On your code (Kotlin):
|
||||||
|
|
||||||
|
import net.torvald.terrarumsansbitmap.gdx.TerrarumSansBitmap
|
||||||
|
|
||||||
class YourGame : Game() {
|
class YourGame : Game() {
|
||||||
|
|
||||||
lateinit var fontGame: Font
|
lateinit var fontGame: Font
|
||||||
|
|
||||||
override fun create() {
|
override fun create() {
|
||||||
fontGame = GameFontBase(path_to_assets)
|
fontGame = TerrarumSansBitmap(path_to_assets, ...)
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,12 +55,14 @@ On your code (Kotlin):
|
|||||||
|
|
||||||
On your code (Java):
|
On your code (Java):
|
||||||
|
|
||||||
|
import net.torvald.terrarumsansbitmap.gdx.TerrarumSansBitmap;
|
||||||
|
|
||||||
class YourGame extends BasicGame {
|
class YourGame extends BasicGame {
|
||||||
|
|
||||||
Font fontGame;
|
Font fontGame;
|
||||||
|
|
||||||
@Override void create() {
|
@Override void create() {
|
||||||
fontGame = new GameFontBase(path_to_assets);
|
fontGame = new TerrarumSansBitmap(path_to_assets, ...);
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,43 +75,6 @@ On your code (Java):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
### Using on Slick2d (legacy version only)
|
|
||||||
|
|
||||||
On your code (Kotlin):
|
|
||||||
|
|
||||||
class YourGame : BasicGame("YourGameName") {
|
|
||||||
|
|
||||||
lateinit var fontGame: Font
|
|
||||||
|
|
||||||
override fun init(gc: GameContainer) {
|
|
||||||
fontGame = GameFontBase(path_to_assets)
|
|
||||||
...
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun render(gc: GameContainer, g: Graphics) {
|
|
||||||
g.font = fontGame
|
|
||||||
g.drawString(...)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
On your code (Java):
|
|
||||||
|
|
||||||
class YourGame extends BasicGame {
|
|
||||||
|
|
||||||
Font fontGame;
|
|
||||||
|
|
||||||
@Override void init(GameContainer gc) {
|
|
||||||
fontGame = new GameFontBase(path_to_assets);
|
|
||||||
...
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override void render(GameContainer gc, Graphics g) {
|
|
||||||
g.setFont(fontGame);
|
|
||||||
g.drawString(...);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
### How to Use Color Code
|
### How to Use Color Code
|
||||||
|
|
||||||
Color codes are individual unicode characters. While you can somehow make a raw character and paste in on your code, it's certainly not desirable. Fortunately, we're also providing utility functions for the color codes.
|
Color codes are individual unicode characters. While you can somehow make a raw character and paste in on your code, it's certainly not desirable. Fortunately, we're also providing utility functions for the color codes.
|
||||||
@@ -130,4 +97,4 @@ Please refer to [CONTRIBUTING.md](https://github.com/minjaesong/Terrarum-sans-bi
|
|||||||
|
|
||||||
Thanks to kind people of [/r/Typography](https://www.reddit.com/r/typography/) for amazing feedbacks.
|
Thanks to kind people of [/r/Typography](https://www.reddit.com/r/typography/) for amazing feedbacks.
|
||||||
|
|
||||||
CJK Ideographs are powered by [WenQuanYi Font](http://wenq.org/wqy2/index.cgi?BitmapSong). The font is distributed under the GNU GPL version 2. Although the shapes of typefaces are not copyrightable (the program codes—e.g. TTF—do), we would like to give a credit for the font and the people behind it.
|
CJK Ideographs are powered by [WenQuanYi Font](http://wenq.org/wqy2/index.cgi?BitmapSong). The font is distributed under the GNU GPL version 2. Although the shapes of typefaces are not copyrightable (the program codes—e.g. TTF—do), we would like to give a credit to the font and the people behind it.
|
||||||
|
|||||||
BIN
assets/alphabetic_presentation_forms_extrawide_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 131 B |
BIN
assets/bengali_variable.tga
LFS
Executable file
BIN
assets/braille_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 50 KiB |
BIN
assets/cjkpunct_variable.tga
LFS
Normal file
BIN
assets/control_pictures_variable.tga
LFS
Normal file
BIN
assets/currencies_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 380 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 320 KiB |
BIN
assets/devanagari_internal_extrawide_variable.tga
LFS
Normal file
BIN
assets/devanagari_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 131 B |
BIN
assets/enclosed_alphanumeric_supplement_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 131 B |
BIN
assets/halfwidth_fullwidth_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 131 B |
BIN
assets/hentaigana_variable.tga
LFS
Normal file
BIN
assets/internal_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 131 B |
BIN
assets/kana.tga
|
Before Width: | Height: | Size: 210 KiB |
BIN
assets/kana_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 131 B |
BIN
assets/letterlike_symbols_variable.tga
LFS
Normal file
BIN
assets/phonetic_extensions_variable.tga
LFS
Normal file
BIN
assets/pua_codestyle_ascii_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 324 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 130 B |
BIN
assets/sundanese_variable.tga
LFS
Normal file
BIN
assets/tamil_extrawide_variable.tga
LFS
Normal file
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 131 B |
BIN
assets/typewriter/audio/cr0.wav
LFS
Normal file
BIN
assets/typewriter/audio/cr1.wav
LFS
Normal file
BIN
assets/typewriter/audio/cr2.wav
LFS
Normal file
BIN
assets/typewriter/audio/cr3.wav
LFS
Normal file
BIN
assets/typewriter/audio/cr4.wav
LFS
Normal file
BIN
assets/typewriter/audio/cr5.wav
LFS
Normal file
BIN
assets/typewriter/audio/crlf.wav
LFS
Normal file
BIN
assets/typewriter/audio/deadkey.wav
LFS
Normal file
BIN
assets/typewriter/audio/movingkey.wav
LFS
Normal file
BIN
assets/typewriter/audio/shiftin.wav
LFS
Normal file
BIN
assets/typewriter/audio/shiftout.wav
LFS
Normal file
BIN
assets/typewriter/audio/space.wav
LFS
Normal file
BIN
assets/typewriter/typewriter_intl_qwerty.tga
Normal file
|
After Width: | Height: | Size: 320 KiB |
BIN
assets/typewriter/typewriter_ko_3set-390.tga
Normal file
|
After Width: | Height: | Size: 320 KiB |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 131 B |
BIN
demo.PNG
Executable file → Normal file
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 167 KiB |
33
demotext.txt
@@ -1,15 +1,16 @@
|
|||||||
The bitmap font for games developers who seek good font that has real multilingual support,
|
The bitmap font for game developers who seek good font that has real multilingual support,
|
||||||
for free (as in freedom and without cost)
|
for free (as in freedom and without cost)
|
||||||
|
|
||||||
There are many bitmap fonts on the internet. You care for the multilingual support, but alas!
|
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
|
most of them do not support your language, vector fonts take too much time to load, and even
|
||||||
then their legibility suffers because screw 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:
|
You somehow found a multilingual one, and it makes your text as if they came straight from an old
|
||||||
|
computer terminal, and you say:
|
||||||
|
|
||||||
“Well, better than nothing… no, it’s ugly.”
|
“Well, better than nothing… no, it’s ugly.”
|
||||||
|
|
||||||
You speak japanese and you wish to support it, but then このクソなfont only good for displaying
|
You speak Japanese and 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.
|
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 mildly infuriating.
|
Eventually you just mix different fonts together, and the results were always mildly infuriating.
|
||||||
@@ -51,17 +52,20 @@ How multilingual? Real multilingual!
|
|||||||
Ѕидарски пејзаж: шугав билмез со чудење џвака ќофте и кељ на туѓ цех
|
Ѕидарски пејзаж: шугав билмез со чудење џвака ќофте и кељ на туѓ цех
|
||||||
Щётканы фермд пийшин цувъя. Бөгж зогсч хэльюү
|
Щётканы фермд пийшин цувъя. Бөгж зогсч хэльюү
|
||||||
Pchnąć w tę łódź jeża lub ośm skrzyń fig
|
Pchnąć w tę łódź jeża lub ośm skrzyń fig
|
||||||
कः खगौघाङचिच्छौजा झाञ्ज्ञोऽटौठीडडण्ढणः। तथोदधीन् पफर्बाभीर्मयोऽरिल्वाशिषां सहः॥
|
|
||||||
Înjurând pițigăiat, zoofobul comandă vexat whisky și tequila
|
Înjurând pițigăiat, zoofobul comandă vexat whisky și tequila
|
||||||
Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства
|
Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства
|
||||||
|
अद्वैतामृवर्षिणीं भगवतीमष्टादशाध्यायिनीम् अम्ब त्वामनुसन्दधामि भगवद्गीते भवद्वेषिणीम् ॥
|
||||||
Ајшо, лепото и чежњо, за љубав срца мога дођи у Хаџиће на кафу
|
Ајшо, лепото и чежњо, за љубав срца мога дођи у Хаџиће на кафу
|
||||||
|
ᮙᮛᮔᮨᮂᮔ ᮓᮤᮘᮨᮛᮨ ᮃᮊᮜ᮪ ᮏᮩᮀ ᮠᮒᮨ ᮔᮥᮛᮔᮤ, ᮎᮙ᮪ᮕᮥᮁ-ᮌᮅᮜ᮪ ᮏᮩᮀ ᮞᮞᮙᮔ ᮃᮚ ᮓᮤᮔ ᮞᮥᮙᮔᮨᮒ᮪ ᮓᮥᮓᮥᮜᮥᮛᮔ᮪
|
||||||
Jovencillo emponzoñado de whisky: ¡qué figurota exhibe!
|
Jovencillo emponzoñado de whisky: ¡qué figurota exhibe!
|
||||||
|
எழுத்து வடிவங்களுக்கு வார்த்தைகள் மற்றும் வாக்கியங்கள் போலவே தொனி, ஒலி பண்பு, தன்மை உண்டு
|
||||||
นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ
|
นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ
|
||||||
Pijamalı hasta yağız şoföre çabucak güvendi
|
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
|
Do bạch kim rất quý nên sẽ dùng để lắp vô xương
|
||||||
日堀油告観観藤村抄海評業庁経賃室弁市。太撮収改売週法所何都慣次現。価紙一無三洋日話転手治稿載末替付致治。
|
日堀油告観観藤村抄海評業庁経賃室弁市。太撮収改売週法所何都慣次現。価紙一無三洋日話転手治稿載末替付致治。
|
||||||
[pʰnɣɬɥi.m͡ŋχɫʍɨnaɸ.cθʊɫɯ.ɹɨɫʏ͡ɛx.ɯ͡ɣaxɲaɣɫ.ɸtʰɑɣɴ]
|
[pʰnɣɬɥi.m͡ŋχɫʍɨnaɸ.cθʊɫɯ.ɹɨɫʏ͡ɛx.ɯ͡ɣaxɲaɣɫ.ɸtʰɑɣɴ]
|
||||||
|
⠑⠥⠊⠵⠀⠟⠫⠒⠵⠀⠓⠗⠎⠉⠂⠀⠠⠊⠗⠘⠍⠓⠎⠀⠨⠣⠩⠐⠥⠍⠑⠱⠀⠈⠪⠀⠨⠷⠎⠢⠈⠧⠀⠈⠏⠒⠐⠕⠝⠀⠕⠌⠎⠀⠊⠿⠊⠪⠶⠚⠊
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
@@ -103,14 +107,21 @@ How multilingual? Real multilingual!
|
|||||||
|
|
||||||
Rejoice, now we can render Old Korean in a correct way!
|
Rejoice, now we can render Old Korean in a correct way!
|
||||||
|
|
||||||
Unicode References:
|
Supported Unicode Blocks:
|
||||||
|
|
||||||
Basic Latin Latin-1 Supplement Latin Extended-A Latin Extended-B IPA Extension Greek Cyrillic
|
Basic Latin Latin-1 Supplement Latin Extended-A Latin Extended-B IPA Extensions Spacing Modifier Letters
|
||||||
Cyrillic Supplement Armenian Devanagari Bengali Thai Georgian Hangul Jamo Cherokee Runic
|
Combining Diacritical Marks Greek and Copticᴱ Cyrillicᴭ Cyrillic Supplementᴭ Armenian Devanagari
|
||||||
Georgian Extended Greek Extended General Punctuations Superscripts and Subscripts CJK Symbols
|
Bengaliᶠⁱ Tamil Thai Georgianჼ Hangul Jamo Cherokee⁷ Runic Sundanese Georgian Extended
|
||||||
Latin Extended-C Kana Hangul Compatibility Jamo Kana Phonetic Extensions CJK Unihan Extension A
|
Sundanese Supplement Phonetic Extensions Phonetic Extensions Supplement Latin Extended Additional
|
||||||
CJK Unihan Latin Extended-D Hangul Jamo Extended-A Hangul Syllables Hangul Jamo Extended-B
|
Greek Extended General Punctuations Superscripts and Subscripts Currency Symbols Letterlike Symbols
|
||||||
Fullwidth Forms Kana Supplement
|
Braile Patterns Latin Extended-C CJK Symbols and Punctuation Hiragana Katakana
|
||||||
|
Hangul Compatibility Jamo Katakana Phonetic Extensions CJK Unified Ideographs Extension A¹²·¹
|
||||||
|
CJK Unified Ideographs⁶ Latin Extended-D Hangul Jamo Extended-A Hangul Syllables
|
||||||
|
Hangul Jamo Extended-B Halfwidth and Fullwidth Forms Kana Supplement⁹ Enclosed Alphanumeric Supplement
|
||||||
|
|
||||||
|
ᴭ No support for archæic letters ᴱ No support for Coptic
|
||||||
|
ᶠⁱ No support for ligatures ჼ Mkhedruli only
|
||||||
|
⁶ ⁷ ⁹ ¹²·¹ Up to the specified Unicode version
|
||||||
|
|
||||||
GitHub’s issue page is open! You can report any errors, or leave suggestions.
|
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
|
You can help this font to be more versatile. (for more languages, more frameworks) Clone this repo, make
|
||||||
|
|||||||
158
demotext_unaligned.txt
Executable file
@@ -0,0 +1,158 @@
|
|||||||
|
The bitmap font for game 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 screw built-in antialias.
|
||||||
|
|
||||||
|
You somehow found a multilingual one, and it makes your text as if they came straight from an old computer terminal, and you say:
|
||||||
|
|
||||||
|
“Well, better than nothing… no, it’s ugly.”
|
||||||
|
|
||||||
|
You speak Japanese and 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 mildly infuriating.
|
||||||
|
|
||||||
|
No more suffering. This font has everything you need.
|
||||||
|
|
||||||
|
while (isVisible(BAD_FONTS)) {
|
||||||
|
ripAndTear(BAD_FONTS).where { GUTS };
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS
|
||||||
|
hƿæt ƿe ᵹardena inᵹear ꝺaᵹum þeoꝺ cynninᵹa þꞃym ᵹeꝼꞃumon
|
||||||
|
Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich GROẞEN GROẞE
|
||||||
|
ζαφείρι δέξου πάγκαλο, βαθῶν ψυχῆς τὸ σῆμα
|
||||||
|
ΔΙΑΦΥΛΆΞΤΕ ΓΕΝΙΚΆ ΤΗ ΖΩΉ ΣΑΣ ΑΠΌ ΒΑΘΕΙΆ ΨΥΧΙΚΆ ΤΡΑΎΜΑΤΑ
|
||||||
|
სწრაფი ყავისფერი მელა გადაახტა ზარმაც ძაღლს ᲘᲜᲢᲔᲚ ᲞᲔᲜᲢᲘᲣᲛᲘ ᲛᲘᲙᲠᲝᲞᲠᲝᲪᲔᲡᲝᲠᲘ
|
||||||
|
ऋषियों को सताने वाले दुष्ट राक्षसों के राजा रावण का सर्वनाश करने वाले विष्णुवतार भगवान श्रीराम अयोध्या के महाराज दशरथ के
|
||||||
|
Kæmi ný öxi hér, ykist þjófum nú bæði víl og ádrepa
|
||||||
|
Ċuaiġ bé ṁórṡáċ le dlúṫspád fíoꝛḟinn trí hata mo ḋea-ṗoꝛcá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
|
||||||
|
Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства
|
||||||
|
अद्वैतामृवर्षिणीं भगवतीमष्टादशाध्यायिनीम् अम्ब त्वामनुसन्दधामि भगवद्गीते भवद्वेषिणीम् ॥
|
||||||
|
Ајшо, лепото и чежњо, за љубав срца мога дођи у Хаџиће на кафу
|
||||||
|
ᮙᮛᮔᮨᮂᮔ ᮓᮤᮘᮨᮛᮨ ᮃᮊᮜ᮪ ᮏᮩᮀ ᮠᮒᮨ ᮔᮥᮛᮔᮤ, ᮎᮙ᮪ᮕᮥᮁ-ᮌᮅᮜ᮪ ᮏᮩᮀ ᮞᮞᮙᮔ ᮃᮚ ᮓᮤᮔ ᮞᮥᮙᮔᮨᮒ᮪ ᮓᮥᮓᮥᮜᮥᮛᮔ᮪
|
||||||
|
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
|
||||||
|
日堀油告観観藤村抄海評業庁経賃室弁市。太撮収改売週法所何都慣次現。価紙一無三洋日話転手治稿載末替付致治。
|
||||||
|
[pʰnɣɬɥi.m͡ŋχɫʍɨnaɸ.cθʊɫɯ.ɹɨɫʏ͡ɛx.ɯ͡ɣaxɲaɣɫ.ɸtʰɑɣɴ]
|
||||||
|
⠑⠥⠊⠵⠀⠟⠫⠒⠵⠀⠓⠗⠎⠉⠂⠀⠠⠊⠗⠘⠍⠓⠎⠀⠨⠣⠩⠐⠥⠍⠑⠱⠀⠈⠪⠀⠨⠷⠎⠢⠈⠧⠀⠈⠏⠒⠐⠕⠝⠀⠕⠌⠎⠀⠊⠿⠊⠪⠶⠚⠊
|
||||||
|
|
||||||
|
Features:
|
||||||
|
|
||||||
|
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 (tabulated) numbers, because number-crunching matters
|
||||||
|
|
||||||
|
ᚱᛂᚴᛋᛂᛋᛏᛋᚮᚾᛔᚢᛏᛚᚮᛋ᛬ᚱᛂᚴᛋᛋᚢᚼᚾᚢᛘᚢᛚᚾᛏᚮ᛬ᛏᚮᛋᛁᚮᚵᛂᚢᛏᚮᚱᛘᛔᚱᛂᚴᛋᛏ᛭ᛋᚢᚼᚾᚢᛋᛘᚮᛁᚵᚾᛁᛂᛏᚮᛑ᛭ᚵᛂᚢᛏᚮᚱ
|
||||||
|
|
||||||
|
‣ Colour-code that supports 4096 colours via 4 bit RGB
|
||||||
|
|
||||||
|
Щиглецът се яде само пържен в юфка без чушки и хвойна (Bulgarian)
|
||||||
|
Љубазни фењерџија чађавог лица хоће да ми покаже штос (Serbian)
|
||||||
|
Разъяренный чтец эгоистично бьёт пятью жердями шустрого фехтовальщика (Russian)
|
||||||
|
|
||||||
|
‣ 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!
|
||||||
|
|
||||||
|
5¹⁹⁄₃₂ inch is 142.1 mm · (C₂F₄)ₙ is godly · Error = MoreCode²
|
||||||
|
NOTE: we don’t do fractions. 142¹⁄₁₀ mm is illegal!
|
||||||
|
|
||||||
|
‣ Unicode fractions, also known as super/subscripts
|
||||||
|
|
||||||
|
ᄀᆞᄅᆞᇝ ᄀᆞᅀᅢ 자거늘 밀므리 사ᄋᆞ리로ᄃᆡ 나거ᅀᅡ ᄌᆞᄆᆞ니ᅌᅵ다 셤 안해 자시ᇙ 제 한비 사ᄋᆞ리로ᄃᆡ 뷔어ᅀᅡ ᄌᆞᄆᆞ니ᅌᅵ다
|
||||||
|
쾅 ᄒᆞ는 소리 헨 “아이구, 베락 털어져ᇝ인가?” 영 걷어진 쥥은 몰르곡 경헨 나왕 보고들랑 영헤연 ᄇᆞᆰ도록 ᄌᆞᆷ ᄒᆞᆫᄌᆞᆷ들 안 잣수다 이 시간 동네 사람들.
|
||||||
|
|
||||||
|
‣ Full support for Old Korean/Jeju dialect orthography
|
||||||
|
|
||||||
|
𛀆𛄆𛂦𛂌𛂻𛂶𛁻𛁦𛃶𛂑𛃺𛄚𛄋𛀙𛃫𛁟𛄀𛁛𛁫𛂗𛂁𛃭𛃑𛀋𛂜𛀕𛀬𛃟𛃅𛀴𛂱𛀸𛀁𛁲𛀄𛀿𛀣𛃥𛃔𛃎𛁈ゑ𛂯𛃙𛁕𛁏𛄝
|
||||||
|
|
||||||
|
‣ Full support for Archaic Kana/Hentaigana
|
||||||
|
|
||||||
|
Supported Unicode Blocks:
|
||||||
|
|
||||||
|
⁃ Basic Latin
|
||||||
|
⁃ Latin-1 Supplement
|
||||||
|
⁃ Latin Extended Additional
|
||||||
|
⁃ Latin Extended-A/B/C/D
|
||||||
|
⁃ Armenian
|
||||||
|
⁃ Bengaliᶠⁱ
|
||||||
|
⁃ Braile Patterns
|
||||||
|
⁃ Cherokee⁷
|
||||||
|
⁃ CJK Symbols and Punctuation
|
||||||
|
⁃ CJK Unified Ideographs⁶
|
||||||
|
⁃ CJK Unified Ideographs Extension A¹²·¹
|
||||||
|
⁃ Combining Diacritical Marks
|
||||||
|
⁃ Currency Symbols
|
||||||
|
⁃ Cyrillicᴭ
|
||||||
|
⁃ Cyrillic Supplementᴭ
|
||||||
|
⁃ Devanagari
|
||||||
|
⁃ Enclosed Alphanumeric Supplement
|
||||||
|
⁃ General Punctuations
|
||||||
|
⁃ Georgianჼ
|
||||||
|
⁃ Georgian Extended
|
||||||
|
⁃ Greek and Copticᴱ
|
||||||
|
⁃ Greek Extended
|
||||||
|
⁃ Halfwidth and Fullwidth Forms
|
||||||
|
⁃ Hangul Compatibility Jamo
|
||||||
|
⁃ Hangul Jamo
|
||||||
|
⁃ Hangul Jamo Extended-A/B
|
||||||
|
⁃ Hangul Syllables
|
||||||
|
⁃ IPA Extensions
|
||||||
|
⁃ Hiragana
|
||||||
|
⁃ Katakana
|
||||||
|
⁃ Katakana Phonetic Extensions
|
||||||
|
⁃ Kana Supplement
|
||||||
|
⁃ Kana Extended-A
|
||||||
|
⁃ Small Kana Extension
|
||||||
|
⁃ Letterlike Symbols
|
||||||
|
⁃ Phonetic Extensions
|
||||||
|
⁃ Phonetic Extensions Supplement
|
||||||
|
⁃ Runic
|
||||||
|
⁃ Spacing Modifier Letters
|
||||||
|
⁃ Sundanese
|
||||||
|
⁃ Sundanese Supplement
|
||||||
|
⁃ Superscripts and Subscripts
|
||||||
|
⁃ Tamil
|
||||||
|
⁃ Thai
|
||||||
|
|
||||||
|
ᴭ No support for archæic letters ᴱ No support for Coptic
|
||||||
|
ᶠⁱ No support for ligatures ჼ Mkhedruli only
|
||||||
|
⁶ ⁷ ⁹ ¹²·¹ Up to the specified Unicode version
|
||||||
|
|
||||||
|
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 changes, and make a pull request! I appreciate any and all supports.
|
||||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 129 B |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 129 B |
108
keming_machine.txt
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
--- Pixel 0
|
||||||
|
- Lowheight bit
|
||||||
|
- encoding: has pixel - it's low height
|
||||||
|
- used by the diacritics system to quickly look up if the character is low height without parsing the Pixel 1
|
||||||
|
|
||||||
|
### Legends
|
||||||
|
#
|
||||||
|
# A·B < unset for lowheight miniscules, as in e
|
||||||
|
# |·| < space we don't care
|
||||||
|
# C·D < middle hole for majuscules, as in C
|
||||||
|
# E·F < middle hole for miniscules, as in c
|
||||||
|
# G·H
|
||||||
|
# ――― < baseline
|
||||||
|
# |·|
|
||||||
|
# J·K
|
||||||
|
|
||||||
|
--- Pixel 1
|
||||||
|
- A..K Occupied (1024)
|
||||||
|
- Is ABGH are all Ys instead of Bars? (2)
|
||||||
|
- Say, A is Bar but E is wye (e.g. Ꮨ), this condition is false; this character must be encoded as ABDFGH(B).
|
||||||
|
- encoding:
|
||||||
|
- <MSB> Y0000000 JK000000 ABCDEFGH <LSB>
|
||||||
|
- Y: Bar/Wye Mode
|
||||||
|
- A..K: arguments
|
||||||
|
- B-type will contract the space by 2 pixels, while Y-type will do it by 1
|
||||||
|
|
||||||
|
# Capital/lower itself is given using the pixel 0 due to the diacritics processing
|
||||||
|
|
||||||
|
--- Examples
|
||||||
|
- AB(B): T
|
||||||
|
- ABCEGH(B): C
|
||||||
|
- ABCEFGH(Y): K
|
||||||
|
- ABCDEG: Ꮅ
|
||||||
|
- ABCDEFGH: B,D,O
|
||||||
|
- ABCDFH: Ч
|
||||||
|
- ABCEG: Г
|
||||||
|
- ABGH: Ꮖ
|
||||||
|
- ACDEG: Ꮀ
|
||||||
|
- ACDEFGH: h,Ƅ
|
||||||
|
- ACDFH: ߆
|
||||||
|
- ACEGH: L
|
||||||
|
- AH(Y): \
|
||||||
|
- BDEFGH: J
|
||||||
|
- BDFGH: ɺ,ป
|
||||||
|
- BG(Y): /
|
||||||
|
- CD: Ⴕ
|
||||||
|
- CDEF(Y): Φ
|
||||||
|
- CDEFGH: a,c,e,i,o,φ,ϕ
|
||||||
|
- CDEFGHJK: g
|
||||||
|
- CDEFGHK: ƞ
|
||||||
|
|
||||||
|
- AB(Y): Y
|
||||||
|
- ABCD(Y): V
|
||||||
|
- CDEF(Y): v
|
||||||
|
- EFGH(Y): ʌ
|
||||||
|
- CDGH(Y): A
|
||||||
|
|
||||||
|
--- Rules
|
||||||
|
# Legend: _ dont care
|
||||||
|
# @ must have a bit set
|
||||||
|
# ` must have a bit unset
|
||||||
|
- ͟A͟B͟C͟D͟E͟F͟G͟H͟J͟K͟ ͟ ͟ ͟A͟B͟C͟D͟E͟F͟G͟H͟J͟K͟
|
||||||
|
- _@_`___`__ — `_________ # Γe,TJ ; Ye,YJ,Ve,VJ,TA,ΓA,VA,Vʌ,YA,Yʌ,yA,yʌ,/a,/d
|
||||||
|
- _@_@___`__ — `___`_@___ # Pɺ but NOT Po,PJ
|
||||||
|
- _@_@___`__ — `___@_____ # Fo,PJ (always 1 px)
|
||||||
|
- ___`_`____ — `___@_`___ # Cꟶ,Kꟶ,Lꟶ,Γꟶ
|
||||||
|
- ___`_`____ — `_@___`___ # CꟵ,KꟵ,LꟵ,ΓꟵ
|
||||||
|
-----------------------------------------------------
|
||||||
|
- _`________ — @_`___`___ # eꞀ,LT ; eY,LY,eV,LV,AT,AꞀ,AY,Ay,λY,λy,a\,b\
|
||||||
|
- _`___`_@__ — @_@___`___ # Lꟼ but NOT oꟼ,bꟼ
|
||||||
|
- _`___@____ — @_@___`___ # oꟼ,bꟼ (always 1 px)
|
||||||
|
- _`___@_`__ — __`_`_____ # ⱶƆ,ⱶJ
|
||||||
|
- _`_@___`__ — __`_`_____ # ⱵƆ,ⱵJ
|
||||||
|
|
||||||
|
|
||||||
|
--- Implementation
|
||||||
|
code: |
|
||||||
|
val posTable = intArrayOf(7,6,5,4,3,2,1,0,9,8)
|
||||||
|
|
||||||
|
class RuleMask(s: String) {
|
||||||
|
|
||||||
|
private var careBits = 0
|
||||||
|
private var ruleBits = 0
|
||||||
|
|
||||||
|
init {
|
||||||
|
s.forEachIndexed { index, char ->
|
||||||
|
when (char) {
|
||||||
|
'@' -> {
|
||||||
|
careBits = careBits or (1 shl posTable[index])
|
||||||
|
ruleBits = ruleBits or (1 shl posTable[index])
|
||||||
|
}
|
||||||
|
'`' -> {
|
||||||
|
careBits = careBits or (1 shl posTable[index])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun matches(shapeBits: Int) = ((shapeBits and careBits) and ruleBits) == 0
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
--- Pixel 2
|
||||||
|
dot removal for diacritics:
|
||||||
|
- All 24 bits are used to put replacement character
|
||||||
|
- encoding:
|
||||||
|
- <MSB> RRRRRRRR GGGGGGGG BBBBBBBB <LSB>
|
||||||
|
|
||||||
@@ -1,16 +1,39 @@
|
|||||||
package net.torvald.terrarumsansbitmap
|
package net.torvald.terrarumsansbitmap
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by minjaesong on 2021-11-25.
|
||||||
|
*/
|
||||||
|
data class DiacriticsAnchor(val type: Int, val x: Int, val y: Int, val xUsed: Boolean, val yUsed: Boolean)
|
||||||
/**
|
/**
|
||||||
* Created by minjaesong on 2018-08-07.
|
* Created by minjaesong on 2018-08-07.
|
||||||
*/
|
*/
|
||||||
data class GlyphProps(
|
data class GlyphProps(
|
||||||
val width: Int,
|
val width: Int,
|
||||||
val writeOnTop: Boolean,
|
|
||||||
val alignWhere: Int,
|
val isLowheight: Boolean = false,
|
||||||
val alignXPos: Int,
|
|
||||||
|
val nudgeX: Int = 0,
|
||||||
|
val nudgeY: Int = 0,
|
||||||
|
|
||||||
|
val diacriticsAnchors: Array<DiacriticsAnchor> = Array(6) { DiacriticsAnchor(it, 0, 0, false, false) },
|
||||||
|
|
||||||
|
val alignWhere: Int = 0, // ALIGN_LEFT..ALIGN_BEFORE
|
||||||
|
|
||||||
|
val writeOnTop: Int = -1, // -1: false, 0: Type-0, 1: Type-1, etc;
|
||||||
|
|
||||||
|
val stackWhere: Int = 0, // STACK_UP..STACK_UP_N_DOWN
|
||||||
|
|
||||||
|
val extInfo: IntArray = IntArray(15),
|
||||||
|
|
||||||
|
val hasKernData: Boolean = false,
|
||||||
|
val isKernYtype: Boolean = false,
|
||||||
|
val kerningMask: Int = 255,
|
||||||
|
|
||||||
|
val directiveOpcode: Int = 0, // 8-bits wide
|
||||||
|
val directiveArg1: Int = 0, // 8-bits wide
|
||||||
|
val directiveArg2: Int = 0, // 8-bits wide
|
||||||
|
|
||||||
val rtl: Boolean = false,
|
val rtl: Boolean = false,
|
||||||
val stackWhere: Int = 0,
|
|
||||||
var extInfo: IntArray? = null
|
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
const val ALIGN_LEFT = 0
|
const val ALIGN_LEFT = 0
|
||||||
@@ -22,35 +45,62 @@ data class GlyphProps(
|
|||||||
const val STACK_DOWN = 1
|
const val STACK_DOWN = 1
|
||||||
const val STACK_BEFORE_N_AFTER = 2
|
const val STACK_BEFORE_N_AFTER = 2
|
||||||
const val STACK_UP_N_DOWN = 3
|
const val STACK_UP_N_DOWN = 3
|
||||||
|
const val STACK_DONT = 4
|
||||||
|
|
||||||
const val DIA_OVERLAY = 1
|
const val DIA_OVERLAY = 2
|
||||||
const val DIA_JOINER = 2
|
// const val DIA_JOINER = 2
|
||||||
|
|
||||||
private fun Boolean.toInt() = if (this) 1 else 0
|
private fun Boolean.toInt() = if (this) 1 else 0
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(width: Int, tags: Int) : this(
|
/*constructor(width: Int, tags: Int) : this(
|
||||||
width,
|
width,
|
||||||
tags.ushr(7).and(1) == 1,
|
tags.ushr(7).and(1) == 1,
|
||||||
tags.ushr(5).and(3),
|
tags.ushr(5).and(3),
|
||||||
tags.ushr(1).and(15),
|
tags.ushr(1).and(15),
|
||||||
tags.and(1) == 1,
|
tags.and(1) == 1,
|
||||||
tags.ushr(8).and(3)
|
tags.ushr(8).and(3),
|
||||||
|
tags.and(1) == 1
|
||||||
)
|
)
|
||||||
|
|
||||||
fun isOverlay() = writeOnTop && alignXPos == 1
|
constructor(width: Int, tags: Int, isLowheight: Boolean, isKernYtype: Boolean, kerningMask: Int) : this(
|
||||||
|
width,
|
||||||
|
tags.ushr(7).and(1) == 1,
|
||||||
|
tags.ushr(5).and(3),
|
||||||
|
tags.ushr(1).and(15),
|
||||||
|
tags.and(1) == 1,
|
||||||
|
tags.ushr(8).and(3),
|
||||||
|
tags.and(1) == 1,
|
||||||
|
null,
|
||||||
|
|
||||||
|
true,
|
||||||
|
isLowheight,
|
||||||
|
isKernYtype,
|
||||||
|
kerningMask
|
||||||
|
)*/
|
||||||
|
|
||||||
|
// fun isOverlay() = writeOnTop && alignXPos == 1
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
val tags = rtl.toInt() or alignXPos.shl(1) or alignWhere.shl(5) or
|
val tags = rtl.toInt() or alignWhere.shl(5) or
|
||||||
writeOnTop.toInt().shl(7) or stackWhere.shl(8)
|
writeOnTop.toInt().shl(7) or stackWhere.shl(8)
|
||||||
|
|
||||||
var hash = -2128831034
|
var hash = -2128831034
|
||||||
|
|
||||||
extInfo?.forEach {
|
extInfo.forEach {
|
||||||
hash = hash xor it
|
hash = hash xor it
|
||||||
hash = hash * 16777619
|
hash = hash * 16777619
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diacriticsAnchors.forEach {
|
||||||
|
hash = hash xor it.type
|
||||||
|
hash = hash * 16777619
|
||||||
|
hash = hash xor (it.x or (if (it.xUsed) 128 else 0))
|
||||||
|
hash = hash * 16777619
|
||||||
|
hash = hash xor (it.y or (if (it.yUsed) 128 else 0))
|
||||||
|
hash = hash * 16777619
|
||||||
|
}
|
||||||
|
|
||||||
hash = hash xor tags
|
hash = hash xor tags
|
||||||
hash = hash * 167677619
|
hash = hash * 167677619
|
||||||
|
|
||||||
@@ -62,5 +112,21 @@ data class GlyphProps(
|
|||||||
return other is GlyphProps && this.hashCode() == other.hashCode()
|
return other is GlyphProps && this.hashCode() == other.hashCode()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun requiredExtInfoCount() = if (stackWhere == STACK_BEFORE_N_AFTER) 2 else 0
|
fun requiredExtInfoCount() =
|
||||||
|
if (stackWhere == STACK_BEFORE_N_AFTER)
|
||||||
|
2
|
||||||
|
else if (directiveOpcode in 0b10000_000..0b10000_111)
|
||||||
|
7
|
||||||
|
else 0
|
||||||
|
|
||||||
|
fun isPragma(pragma: String) = when (pragma) {
|
||||||
|
"replacewith" -> directiveOpcode in 0b10000_000..0b10000_111
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
|
|
||||||
|
fun forEachExtInfo(action: (Int) -> Unit) = extInfo.slice(0 until requiredExtInfoCount()).forEach(action)
|
||||||
|
fun forEachExtInfoIndexed(action: (Int, Int) -> Unit) = extInfo.slice(0 until requiredExtInfoCount()).forEachIndexed(action)
|
||||||
|
|
||||||
|
val isIllegal: Boolean
|
||||||
|
get() = directiveOpcode == 255
|
||||||
}
|
}
|
||||||
1398
src/net/torvald/terrarumsansbitmap/MovableType.kt
Normal file
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Terrarum Sans Bitmap
|
* Terrarum Sans Bitmap
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018 Minjae Song (Torvald)
|
* Copyright (c) 2017-2021 Minjae Song (Torvald)
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -110,8 +110,6 @@ class PixmapRegionPack(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// todo globalFlipY ?
|
|
||||||
|
|
||||||
/*return*/region
|
/*return*/region
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,8 +150,6 @@ class PixmapRegionPack(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// todo globalFlipY ?
|
|
||||||
|
|
||||||
/*return*/region
|
/*return*/region
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3109
src/net/torvald/terrarumsansbitmap/gdx/TerrarumSansBitmap.kt
Executable file
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Terrarum Sans Bitmap
|
* Terrarum Sans Bitmap
|
||||||
*
|
*
|
||||||
* Copyright (c) 2017 Minjae Song (Torvald)
|
* Copyright (c) 2017-2021 Minjae Song (Torvald)
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -40,17 +40,18 @@ class TextureRegionPack(
|
|||||||
val vGap: Int = 0,
|
val vGap: Int = 0,
|
||||||
val hFrame: Int = 0,
|
val hFrame: Int = 0,
|
||||||
val vFrame: Int = 0,
|
val vFrame: Int = 0,
|
||||||
val xySwapped: Boolean = false // because Unicode chart does, duh
|
val xySwapped: Boolean = false, // because Unicode chart does, duh
|
||||||
|
val flipX: Boolean = false,
|
||||||
|
val flipY: Boolean = false
|
||||||
): Disposable {
|
): Disposable {
|
||||||
|
|
||||||
constructor(ref: String, tileW: Int, tileH: Int, hGap: Int = 0, vGap: Int = 0, hFrame: Int = 0, vFrame: Int = 0, xySwapped: Boolean = false) :
|
constructor(ref: String, tileW: Int, tileH: Int, hGap: Int = 0, vGap: Int = 0, hFrame: Int = 0, vFrame: Int = 0, xySwapped: Boolean = false, flipX: Boolean = false, flipY: Boolean = false) :
|
||||||
this(Texture(ref), tileW, tileH, hGap, vGap, hFrame, vFrame, xySwapped)
|
this(Texture(ref), tileW, tileH, hGap, vGap, hFrame, vFrame, xySwapped, flipX, flipY)
|
||||||
constructor(fileHandle: FileHandle, tileW: Int, tileH: Int, hGap: Int = 0, vGap: Int = 0, hFrame: Int = 0, vFrame: Int = 0, xySwapped: Boolean = false) :
|
constructor(fileHandle: FileHandle, tileW: Int, tileH: Int, hGap: Int = 0, vGap: Int = 0, hFrame: Int = 0, vFrame: Int = 0, xySwapped: Boolean = false, flipX: Boolean = false, flipY: Boolean = false) :
|
||||||
this(Texture(fileHandle), tileW, tileH, hGap, vGap, hFrame, vFrame, xySwapped)
|
this(Texture(fileHandle), tileW, tileH, hGap, vGap, hFrame, vFrame, xySwapped, flipX, flipY)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
/** Intented for Y-down coord system, typically fon Non-GDX codebase */
|
|
||||||
var globalFlipY = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val regions: Array<TextureRegion>
|
val regions: Array<TextureRegion>
|
||||||
@@ -70,7 +71,7 @@ class TextureRegionPack(
|
|||||||
region.setRegion(texture)
|
region.setRegion(texture)
|
||||||
region.setRegion(rx, ry, tileW, tileH)
|
region.setRegion(rx, ry, tileW, tileH)
|
||||||
|
|
||||||
region.flip(false, globalFlipY)
|
region.flip(flipX, flipY)
|
||||||
|
|
||||||
/*return*/region
|
/*return*/region
|
||||||
}
|
}
|
||||||
@@ -84,7 +85,7 @@ class TextureRegionPack(
|
|||||||
region.setRegion(texture)
|
region.setRegion(texture)
|
||||||
region.setRegion(rx, ry, tileW, tileH)
|
region.setRegion(rx, ry, tileW, tileH)
|
||||||
|
|
||||||
region.flip(false, globalFlipY)
|
region.flip(flipX, flipY)
|
||||||
|
|
||||||
/*return*/region
|
/*return*/region
|
||||||
}
|
}
|
||||||
@@ -93,6 +94,8 @@ class TextureRegionPack(
|
|||||||
|
|
||||||
fun get(x: Int, y: Int) = regions[y * horizontalCount + x]
|
fun get(x: Int, y: Int) = regions[y * horizontalCount + x]
|
||||||
|
|
||||||
|
fun forEach(action: (TextureRegion) -> Unit) = regions.forEach(action)
|
||||||
|
|
||||||
override fun dispose() {
|
override fun dispose() {
|
||||||
texture.dispose()
|
texture.dispose()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,636 @@
|
|||||||
|
package net.torvald.terrarumtypewriterbitmap.gdx
|
||||||
|
|
||||||
|
import com.badlogic.gdx.Gdx
|
||||||
|
import com.badlogic.gdx.Input
|
||||||
|
import com.badlogic.gdx.graphics.Pixmap
|
||||||
|
import com.badlogic.gdx.graphics.Texture
|
||||||
|
import com.badlogic.gdx.graphics.g2d.Batch
|
||||||
|
import com.badlogic.gdx.graphics.g2d.BitmapFont
|
||||||
|
import com.badlogic.gdx.graphics.g2d.GlyphLayout
|
||||||
|
import com.badlogic.gdx.utils.GdxRuntimeException
|
||||||
|
import net.torvald.terrarumsansbitmap.DiacriticsAnchor
|
||||||
|
import net.torvald.terrarumsansbitmap.GlyphProps
|
||||||
|
import net.torvald.terrarumsansbitmap.gdx.*
|
||||||
|
import net.torvald.terrarumsansbitmap.gdx.CodePoint
|
||||||
|
import net.torvald.terrarumsansbitmap.gdx.TerrarumSansBitmap.Companion.TextCacheObj
|
||||||
|
import net.torvald.terrarumsansbitmap.gdx.TerrarumSansBitmap.Companion.ShittyGlyphLayout
|
||||||
|
import java.io.BufferedOutputStream
|
||||||
|
import java.io.FileOutputStream
|
||||||
|
import java.io.Reader
|
||||||
|
import java.util.zip.GZIPInputStream
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Config File Syntax:
|
||||||
|
*
|
||||||
|
* ```
|
||||||
|
* identifier,image file name,relative codepoint
|
||||||
|
* # working example:
|
||||||
|
* intl_qwerty_typewriter,typewriter_intl_qwerty.tga,0
|
||||||
|
* ko_kr_3set-390_typewriter,typewriter_ko_3set-390.tga,16
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* // the Relative Codepoint of 16 should point to U+F3000
|
||||||
|
*
|
||||||
|
* Created by minjaesong on 2021-11-04.
|
||||||
|
*/
|
||||||
|
class TerrarumTypewriterBitmap(
|
||||||
|
fontDir: String,
|
||||||
|
configFile: Reader,
|
||||||
|
val flipY: Boolean = false,
|
||||||
|
var errorOnUnknownChar: Boolean = false,
|
||||||
|
val textCacheSize: Int = 256,
|
||||||
|
val debug: Boolean = false
|
||||||
|
) : BitmapFont() {
|
||||||
|
|
||||||
|
override fun getLineHeight() = 20f
|
||||||
|
|
||||||
|
override fun getXHeight() = 8f
|
||||||
|
override fun getCapHeight() = 12f
|
||||||
|
override fun getAscent() = 3f
|
||||||
|
override fun getDescent() = 3f
|
||||||
|
override fun isFlipped() = flipY
|
||||||
|
|
||||||
|
var interchar = 0
|
||||||
|
|
||||||
|
val glyphProps = HashMap<CodePoint, GlyphProps>()
|
||||||
|
private val sheets = HashMap<String, PixmapRegionPack>()
|
||||||
|
|
||||||
|
private val spriteSheetNames = HashMap<String, String>()
|
||||||
|
private val codepointStart = HashMap<String, CodePoint>()
|
||||||
|
private val codepointToSheetID = HashMap<Int, String>()
|
||||||
|
|
||||||
|
private var textCacheCap = 0
|
||||||
|
private val textCache = HashMap<Long, TextCacheObj>(textCacheSize * 2)
|
||||||
|
private val colourBuffer = HashMap<CodePoint, ARGB8888>()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insertion sorts the last element fo the textCache
|
||||||
|
*/
|
||||||
|
private fun addToCache(text: CodepointSequence, linotype: Texture, width: Int) {
|
||||||
|
val cacheObj =
|
||||||
|
TextCacheObj(text.getHash(), ShittyGlyphLayout(text, linotype, width))
|
||||||
|
|
||||||
|
if (textCacheCap < textCacheSize) {
|
||||||
|
textCache[cacheObj.hash] = cacheObj
|
||||||
|
textCacheCap += 1
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// randomly eliminate one
|
||||||
|
textCache.remove(textCache.keys.random())!!.dispose()
|
||||||
|
|
||||||
|
// add new one
|
||||||
|
textCache[cacheObj.hash] = cacheObj
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getCache(hash: Long): TextCacheObj? {
|
||||||
|
return textCache[hash]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun getColour(codePoint: Int): Int { // input: 0x10F_RGB, out: RGBA8888
|
||||||
|
if (colourBuffer.containsKey(codePoint))
|
||||||
|
return colourBuffer[codePoint]!!
|
||||||
|
|
||||||
|
val r = codePoint.and(0x0F00).ushr(8)
|
||||||
|
val g = codePoint.and(0x00F0).ushr(4)
|
||||||
|
val b = codePoint.and(0x000F)
|
||||||
|
|
||||||
|
val col = r.shl(28) or r.shl(24) or
|
||||||
|
g.shl(20) or g.shl(16) or
|
||||||
|
b.shl(12) or b.shl(8) or
|
||||||
|
0xFF
|
||||||
|
|
||||||
|
|
||||||
|
colourBuffer[codePoint] = col
|
||||||
|
return col
|
||||||
|
}
|
||||||
|
|
||||||
|
init {
|
||||||
|
val fontParentDir = if (fontDir.endsWith('/') || fontDir.endsWith('\\')) fontDir else "$fontDir/"
|
||||||
|
|
||||||
|
configFile.forEachLine {
|
||||||
|
if (!it.startsWith("#")) {
|
||||||
|
val csv = it.split(',')
|
||||||
|
if (csv.size != 3) throw IllegalArgumentException("Malformed CSV line: '$it'")
|
||||||
|
val key = csv[0]
|
||||||
|
val sheetname = csv[1]
|
||||||
|
val cpstart = csv[2].toInt() * 256 + 0xF9000
|
||||||
|
|
||||||
|
spriteSheetNames[key] = sheetname
|
||||||
|
codepointStart[key] = cpstart
|
||||||
|
|
||||||
|
for (k in cpstart until cpstart + 256) {
|
||||||
|
codepointToSheetID[k] = key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
spriteSheetNames.forEach { key, filename ->
|
||||||
|
var pixmap: Pixmap
|
||||||
|
|
||||||
|
println("[TerrarumTypewriterBitmap] loading texture $filename [VARIABLE]")
|
||||||
|
|
||||||
|
// unpack gz if applicable
|
||||||
|
if (filename.endsWith(".gz")) {
|
||||||
|
val tmpFileName = "tmp_${filename.dropLast(7)}.tga"
|
||||||
|
|
||||||
|
try {
|
||||||
|
val gzi = GZIPInputStream(Gdx.files.internal(fontParentDir + filename).read(8192))
|
||||||
|
val wholeFile = gzi.readBytes()
|
||||||
|
gzi.close()
|
||||||
|
val fos = BufferedOutputStream(FileOutputStream(tmpFileName))
|
||||||
|
fos.write(wholeFile)
|
||||||
|
fos.flush()
|
||||||
|
fos.close()
|
||||||
|
|
||||||
|
pixmap = Pixmap(Gdx.files.internal(tmpFileName))
|
||||||
|
}
|
||||||
|
catch (e: GdxRuntimeException) {
|
||||||
|
//e.printStackTrace()
|
||||||
|
System.err.println("[TerrarumTypewriterBitmap] said texture not found, skipping...")
|
||||||
|
|
||||||
|
pixmap = Pixmap(1, 1, Pixmap.Format.RGBA8888)
|
||||||
|
}
|
||||||
|
//File(tmpFileName).delete()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pixmap = try {
|
||||||
|
Pixmap(Gdx.files.internal(fontParentDir + filename))
|
||||||
|
} catch (e: GdxRuntimeException) {
|
||||||
|
//e.printStackTrace()
|
||||||
|
System.err.println("[TerrarumTypewriterBitmap] said texture not found, skipping...")
|
||||||
|
|
||||||
|
Pixmap(1, 1, Pixmap.Format.RGBA8888)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val cpstart = codepointStart[key]!!
|
||||||
|
buildWidthTable(pixmap, cpstart until cpstart + 256, 16)
|
||||||
|
|
||||||
|
val texRegPack = PixmapRegionPack(pixmap,
|
||||||
|
TerrarumSansBitmap.W_VAR_INIT,
|
||||||
|
TerrarumSansBitmap.H,
|
||||||
|
TerrarumSansBitmap.HGAP_VAR, 0
|
||||||
|
)
|
||||||
|
|
||||||
|
sheets[key] = texRegPack
|
||||||
|
|
||||||
|
pixmap.dispose() // you are terminated
|
||||||
|
}
|
||||||
|
|
||||||
|
glyphProps[0] = GlyphProps(0)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getSheetType(c: CodePoint) = codepointToSheetID[c] ?: "unknown"
|
||||||
|
private fun getSheetwisePosition(cPrev: Int, ch: Int) = getSheetType(ch).let {
|
||||||
|
val coff = ch - (codepointStart[it] ?: 0)
|
||||||
|
intArrayOf(coff % 16, coff / 16)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun Boolean.toInt() = if (this) 1 else 0
|
||||||
|
private fun Int.tagify() = if (this and 255 == 0) 0 else this
|
||||||
|
|
||||||
|
private fun buildWidthTable(pixmap: Pixmap, codeRange: Iterable<Int>, cols: Int = 16) {
|
||||||
|
val binaryCodeOffset = TerrarumSansBitmap.W_VAR_INIT
|
||||||
|
|
||||||
|
val cellW = TerrarumSansBitmap.W_VAR_INIT + 1
|
||||||
|
val cellH = TerrarumSansBitmap.H
|
||||||
|
|
||||||
|
for (code in codeRange) {
|
||||||
|
|
||||||
|
val cellX = ((code - codeRange.first()) % cols) * cellW
|
||||||
|
val cellY = ((code - codeRange.first()) / cols) * cellH
|
||||||
|
|
||||||
|
val codeStartX = cellX + binaryCodeOffset
|
||||||
|
val codeStartY = cellY
|
||||||
|
|
||||||
|
var width = (0..4).fold(0) { acc, y -> acc or ((pixmap.getPixel(codeStartX, codeStartY + y).and(255) != 0).toInt() shl y) }
|
||||||
|
val isLowHeight = (pixmap.getPixel(codeStartX, codeStartY + 5).and(255) != 0)
|
||||||
|
|
||||||
|
if (code in 0xF2000..0xF3FFF && code and 127 == Input.Keys.BACKSPACE) {
|
||||||
|
width *= -1
|
||||||
|
}
|
||||||
|
|
||||||
|
// Keming machine parameters
|
||||||
|
val kerningBit1 = pixmap.getPixel(codeStartX, codeStartY + 6).tagify()
|
||||||
|
val kerningBit2 = pixmap.getPixel(codeStartX, codeStartY + 7).tagify()
|
||||||
|
val kerningBit3 = pixmap.getPixel(codeStartX, codeStartY + 8).tagify()
|
||||||
|
val kerningBit4 = pixmap.getPixel(codeStartX, codeStartY + 9).tagify()
|
||||||
|
var isKernYtype = ((kerningBit1 and 0x80000000.toInt()) != 0)
|
||||||
|
var kerningMask = kerningBit1.ushr(8).and(0xFFFFFF)
|
||||||
|
val hasKernData = kerningBit1 and 255 != 0//(kerningBit1 and 255 != 0 && kerningMask != 0xFFFF)
|
||||||
|
if (!hasKernData) {
|
||||||
|
isKernYtype = false
|
||||||
|
kerningMask = 255
|
||||||
|
}
|
||||||
|
|
||||||
|
val nudgingBits = pixmap.getPixel(codeStartX, codeStartY + 10).tagify()
|
||||||
|
val nudgeX = nudgingBits.ushr(24).toByte().toInt() // signed 8-bit int
|
||||||
|
val nudgeY = nudgingBits.ushr(16).toByte().toInt() // signed 8-bit int
|
||||||
|
|
||||||
|
val diacriticsAnchors = (0..5).map {
|
||||||
|
val yPos = 11 + (it / 3) * 2
|
||||||
|
val shift = (3 - (it % 3)) * 8
|
||||||
|
val yPixel = pixmap.getPixel(codeStartX, codeStartY + yPos).tagify()
|
||||||
|
val xPixel = pixmap.getPixel(codeStartX, codeStartY + yPos + 1).tagify()
|
||||||
|
val y = (yPixel ushr shift) and 127
|
||||||
|
val x = (xPixel ushr shift) and 127
|
||||||
|
val yUsed = (yPixel ushr shift) >= 128
|
||||||
|
val xUsed = (yPixel ushr shift) >= 128
|
||||||
|
|
||||||
|
DiacriticsAnchor(it, x, y, xUsed, yUsed)
|
||||||
|
}.toTypedArray()
|
||||||
|
|
||||||
|
val alignWhere = (0..1).fold(0) { acc, y -> acc or ((pixmap.getPixel(codeStartX, codeStartY + y + 15).and(255) != 0).toInt() shl y) }
|
||||||
|
|
||||||
|
var writeOnTop = pixmap.getPixel(codeStartX, codeStartY + 17).tagify()
|
||||||
|
if (writeOnTop == 0) writeOnTop = -1
|
||||||
|
else if (writeOnTop == 0xFFFFFF) writeOnTop = 0
|
||||||
|
|
||||||
|
val stackWhere = (0..1).fold(0) { acc, y -> acc or ((pixmap.getPixel(codeStartX, codeStartY + y + 18).and(255) != 0).toInt() shl y) }
|
||||||
|
|
||||||
|
glyphProps[code] = GlyphProps(width, isLowHeight, nudgeX, nudgeY, diacriticsAnchors, alignWhere, writeOnTop, stackWhere, IntArray(15), hasKernData, isKernYtype, kerningMask)
|
||||||
|
|
||||||
|
// if (nudgingBits != 0) println("${code.charInfo()} nudgeX=$nudgeX, nudgeY=$nudgeY, nudgingBits=0x${nudgingBits.toString(16)}")
|
||||||
|
|
||||||
|
// extra info
|
||||||
|
val extCount = glyphProps[code]?.requiredExtInfoCount() ?: 0
|
||||||
|
if (extCount > 0) {
|
||||||
|
for (x in 0 until extCount) {
|
||||||
|
var info = 0
|
||||||
|
for (y in 0..18) {
|
||||||
|
// if ALPHA is not zero, assume it's 1
|
||||||
|
if (pixmap.getPixel(cellX + x, cellY + y).and(255) != 0) {
|
||||||
|
info = info or (1 shl y)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
glyphProps[code]!!.extInfo[x] = info
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val pixmapOffsetY = 10
|
||||||
|
private val linotypePad = 16
|
||||||
|
private var flagFirstRun = true
|
||||||
|
private @Volatile var textBuffer = CodepointSequence()
|
||||||
|
private @Volatile lateinit var tempLinotype: Texture
|
||||||
|
private var nullProp = GlyphProps(15)
|
||||||
|
|
||||||
|
|
||||||
|
fun draw(batch: Batch, codepoints: CodepointSequence, x: Float, y: Float): GlyphLayout? {
|
||||||
|
// Q&D fix for issue #12
|
||||||
|
// When the line ends with a diacritics, the whole letter won't render
|
||||||
|
// If the line starts with a letter-with-diacritic, it will error out
|
||||||
|
// Some diacritics (e.g. COMBINING TILDE) do not obey lowercase letters
|
||||||
|
val charSeqNotBlank = codepoints.size > 0 // determine emptiness BEFORE you hack a null chars in
|
||||||
|
val newCodepoints = CodepointSequence()
|
||||||
|
newCodepoints.add(0)
|
||||||
|
newCodepoints.addAll(codepoints)
|
||||||
|
newCodepoints.add(0)
|
||||||
|
|
||||||
|
fun Int.flipY() = this * if (flipY) 1 else -1
|
||||||
|
|
||||||
|
// always draw at integer position; this is bitmap font after all
|
||||||
|
val x = Math.round(x)
|
||||||
|
val y = Math.round(y)
|
||||||
|
|
||||||
|
val charSeqHash = newCodepoints.getHash()
|
||||||
|
|
||||||
|
var renderCol = -1 // subject to change with the colour code
|
||||||
|
|
||||||
|
if (charSeqNotBlank) {
|
||||||
|
|
||||||
|
val cacheObj = getCache(charSeqHash)
|
||||||
|
|
||||||
|
if (cacheObj == null || flagFirstRun) {
|
||||||
|
textBuffer = newCodepoints
|
||||||
|
|
||||||
|
val (posXbuffer, posYbuffer) = buildPosMap(textBuffer)
|
||||||
|
|
||||||
|
flagFirstRun = false
|
||||||
|
|
||||||
|
//println("text not in buffer: $charSeq")
|
||||||
|
|
||||||
|
|
||||||
|
//textBuffer.forEach { print("${it.toHex()} ") }
|
||||||
|
//println()
|
||||||
|
|
||||||
|
|
||||||
|
// resetHash(charSeq, x.toFloat(), y.toFloat())
|
||||||
|
|
||||||
|
|
||||||
|
val _pw = posXbuffer.last() + 2*linotypePad
|
||||||
|
val _ph = TerrarumSansBitmap.H + (pixmapOffsetY * 2)
|
||||||
|
if (_pw < 0 || _ph < 0) throw RuntimeException("Illegal linotype dimension (w: $_pw, h: $_ph)")
|
||||||
|
val linotypePixmap = Pixmap(_pw, _ph, Pixmap.Format.RGBA8888)
|
||||||
|
|
||||||
|
|
||||||
|
var index = 0
|
||||||
|
while (index <= textBuffer.lastIndex) {
|
||||||
|
try {
|
||||||
|
val c = textBuffer[index]
|
||||||
|
val sheetID = getSheetType(c)
|
||||||
|
val (sheetX, sheetY) =
|
||||||
|
if (index == 0) getSheetwisePosition(0, c)
|
||||||
|
else getSheetwisePosition(textBuffer[index - 1], c)
|
||||||
|
val hash = getHash(c) // to be used to simulate printing irregularity
|
||||||
|
|
||||||
|
if (TerrarumSansBitmap.isColourCode(c)) {
|
||||||
|
if (c == 0x100000) {
|
||||||
|
renderCol = -1
|
||||||
|
} else {
|
||||||
|
renderCol = getColour(c)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
val posY = posYbuffer[index].flipY()
|
||||||
|
val posX = posXbuffer[index]
|
||||||
|
val texture = sheets[sheetID]?.get(sheetX, sheetY)
|
||||||
|
|
||||||
|
texture?.let {
|
||||||
|
linotypePixmap.drawPixmap(it, posX + linotypePad, posY + pixmapOffsetY, renderCol)
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (noSuchGlyph: ArrayIndexOutOfBoundsException) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
index++
|
||||||
|
}
|
||||||
|
catch (e: NullPointerException) {
|
||||||
|
System.err.println("Shit hit the multithreaded fan")
|
||||||
|
e.printStackTrace()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tempLinotype = Texture(linotypePixmap)
|
||||||
|
tempLinotype.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest)
|
||||||
|
|
||||||
|
// put things into cache
|
||||||
|
//textCache[charSeq] = ShittyGlyphLayout(textBuffer, linotype!!)
|
||||||
|
addToCache(textBuffer, tempLinotype, posXbuffer.last())
|
||||||
|
linotypePixmap.dispose()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
textBuffer = cacheObj.glyphLayout!!.textBuffer
|
||||||
|
tempLinotype = cacheObj.glyphLayout!!.linotype
|
||||||
|
}
|
||||||
|
|
||||||
|
batch.draw(tempLinotype,
|
||||||
|
(x - linotypePad).toFloat(),
|
||||||
|
(y - pixmapOffsetY).toFloat() + (if (flipY) (tempLinotype.height) else 0),
|
||||||
|
(tempLinotype.width.toFloat()),
|
||||||
|
(tempLinotype.height.toFloat()) * (if (flipY) -1 else 1)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun buildPosMap(str: CodepointSequence) = buildPosMap(str.toList())
|
||||||
|
|
||||||
|
/**
|
||||||
|
* posXbuffer's size is greater than the string, last element marks the width of entire string.
|
||||||
|
*/
|
||||||
|
private fun buildPosMap(str: List<Int>): Pair<IntArray, IntArray> {
|
||||||
|
val posXbuffer = IntArray(str.size + 1) { 0 }
|
||||||
|
val posYbuffer = IntArray(str.size) { 0 }
|
||||||
|
|
||||||
|
|
||||||
|
var nonDiacriticCounter = 0 // index of last instance of non-diacritic char
|
||||||
|
var stackUpwardCounter = 0
|
||||||
|
var stackDownwardCounter = 0
|
||||||
|
|
||||||
|
val HALF_VAR_INIT = TerrarumSansBitmap.W_VAR_INIT.minus(1).div(2)
|
||||||
|
|
||||||
|
// this is starting to get dirty...
|
||||||
|
// persisting value. the value is set a few characters before the actual usage
|
||||||
|
var extraWidth = 0
|
||||||
|
|
||||||
|
try {
|
||||||
|
for (charIndex in 0 until posXbuffer.size - 1) {
|
||||||
|
if (charIndex > 0) {
|
||||||
|
// nonDiacriticCounter allows multiple diacritics
|
||||||
|
|
||||||
|
val thisChar = str[charIndex]
|
||||||
|
if (glyphProps[thisChar] == null && errorOnUnknownChar) {
|
||||||
|
val errorGlyphSB = StringBuilder()
|
||||||
|
Character.toChars(thisChar).forEach { errorGlyphSB.append(it) }
|
||||||
|
|
||||||
|
throw InternalError("No GlyphProps for char '$errorGlyphSB' " +
|
||||||
|
"(${thisChar.charInfo()})")
|
||||||
|
}
|
||||||
|
val thisProp = glyphProps[thisChar] ?: nullProp
|
||||||
|
val lastNonDiacriticChar = str[nonDiacriticCounter]
|
||||||
|
val itsProp = glyphProps[lastNonDiacriticChar] ?: nullProp
|
||||||
|
val kerning = 0
|
||||||
|
|
||||||
|
|
||||||
|
//println("char: ${thisChar.charInfo()}\nproperties: $thisProp")
|
||||||
|
|
||||||
|
|
||||||
|
var alignmentOffset = when (thisProp.alignWhere) {
|
||||||
|
GlyphProps.ALIGN_LEFT -> 0
|
||||||
|
GlyphProps.ALIGN_RIGHT -> thisProp.width - TerrarumSansBitmap.W_VAR_INIT
|
||||||
|
GlyphProps.ALIGN_CENTRE -> Math.ceil((thisProp.width - TerrarumSansBitmap.W_VAR_INIT) / 2.0).toInt()
|
||||||
|
else -> 0 // implies "diacriticsBeforeGlyph = true"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (thisProp.writeOnTop < 0) {
|
||||||
|
posXbuffer[charIndex] = -thisProp.nudgeX +
|
||||||
|
when (itsProp.alignWhere) {
|
||||||
|
GlyphProps.ALIGN_RIGHT ->
|
||||||
|
posXbuffer[nonDiacriticCounter] + TerrarumSansBitmap.W_VAR_INIT + alignmentOffset + interchar + kerning + extraWidth
|
||||||
|
GlyphProps.ALIGN_CENTRE ->
|
||||||
|
posXbuffer[nonDiacriticCounter] + HALF_VAR_INIT + itsProp.width + alignmentOffset + interchar + kerning + extraWidth
|
||||||
|
else ->
|
||||||
|
posXbuffer[nonDiacriticCounter] + itsProp.width + alignmentOffset + interchar + kerning + extraWidth
|
||||||
|
}
|
||||||
|
|
||||||
|
nonDiacriticCounter = charIndex
|
||||||
|
|
||||||
|
stackUpwardCounter = 0
|
||||||
|
stackDownwardCounter = 0
|
||||||
|
extraWidth = thisProp.nudgeX // NOTE: sign is flipped!
|
||||||
|
}
|
||||||
|
/*else if (thisProp.writeOnTop >= 0 && thisProp.diacriticsAnchors[0].x == GlyphProps.DIA_JOINER) {
|
||||||
|
posXbuffer[charIndex] = when (itsProp.alignWhere) {
|
||||||
|
GlyphProps.ALIGN_RIGHT ->
|
||||||
|
posXbuffer[nonDiacriticCounter] + TerrarumSansBitmap.W_VAR_INIT + alignmentOffset
|
||||||
|
//GlyphProps.ALIGN_CENTRE ->
|
||||||
|
// posXbuffer[nonDiacriticCounter] + HALF_VAR_INIT + itsProp.width + alignmentOffset
|
||||||
|
else ->
|
||||||
|
posXbuffer[nonDiacriticCounter] + itsProp.width + alignmentOffset
|
||||||
|
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
else {
|
||||||
|
// set X pos according to alignment information
|
||||||
|
posXbuffer[charIndex] = when (thisProp.alignWhere) {
|
||||||
|
GlyphProps.ALIGN_LEFT, GlyphProps.ALIGN_BEFORE -> posXbuffer[nonDiacriticCounter]
|
||||||
|
GlyphProps.ALIGN_RIGHT -> {
|
||||||
|
posXbuffer[nonDiacriticCounter] - (TerrarumSansBitmap.W_VAR_INIT - itsProp.width)
|
||||||
|
}
|
||||||
|
GlyphProps.ALIGN_CENTRE -> {
|
||||||
|
val alignXPos = if (itsProp.diacriticsAnchors[0].x == 0) itsProp.width.div(2) else itsProp.diacriticsAnchors[0].x
|
||||||
|
|
||||||
|
if (itsProp.alignWhere == GlyphProps.ALIGN_RIGHT) {
|
||||||
|
posXbuffer[nonDiacriticCounter] + alignXPos + (itsProp.width + 1).div(2)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
posXbuffer[nonDiacriticCounter] + alignXPos - HALF_VAR_INIT
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else -> throw InternalError("Unsupported alignment: ${thisProp.alignWhere}")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// set Y pos according to diacritics position
|
||||||
|
if (thisProp.alignWhere == GlyphProps.ALIGN_CENTRE) {
|
||||||
|
when (thisProp.stackWhere) {
|
||||||
|
GlyphProps.STACK_DOWN -> {
|
||||||
|
posYbuffer[charIndex] = TerrarumSansBitmap.H_DIACRITICS * stackDownwardCounter
|
||||||
|
stackDownwardCounter++
|
||||||
|
}
|
||||||
|
GlyphProps.STACK_UP -> {
|
||||||
|
posYbuffer[charIndex] = -TerrarumSansBitmap.H_DIACRITICS * stackUpwardCounter
|
||||||
|
|
||||||
|
// shift down on lowercase if applicable
|
||||||
|
/*if (getSheetType(thisChar) in TerrarumSansBitmap.autoShiftDownOnLowercase &&
|
||||||
|
lastNonDiacriticChar.isLowHeight()) {
|
||||||
|
//println("AAARRRRHHHH for character ${thisChar.toHex()}")
|
||||||
|
//println("lastNonDiacriticChar: ${lastNonDiacriticChar.toHex()}")
|
||||||
|
//println("cond: ${thisProp.alignXPos == GlyphProps.DIA_OVERLAY}, charIndex: $charIndex")
|
||||||
|
if (thisProp.alignXPos == GlyphProps.DIA_OVERLAY)
|
||||||
|
posYbuffer[charIndex] -= TerrarumSansBitmap.H_OVERLAY_LOWERCASE_SHIFTDOWN // if minus-assign doesn't work, try plus-assign
|
||||||
|
else
|
||||||
|
posYbuffer[charIndex] -= TerrarumSansBitmap.H_STACKUP_LOWERCASE_SHIFTDOWN // if minus-assign doesn't work, try plus-assign
|
||||||
|
}*/
|
||||||
|
|
||||||
|
stackUpwardCounter++
|
||||||
|
}
|
||||||
|
GlyphProps.STACK_UP_N_DOWN -> {
|
||||||
|
posYbuffer[charIndex] = TerrarumSansBitmap.H_DIACRITICS * stackDownwardCounter
|
||||||
|
stackDownwardCounter++
|
||||||
|
posYbuffer[charIndex] = -TerrarumSansBitmap.H_DIACRITICS * stackUpwardCounter
|
||||||
|
stackUpwardCounter++
|
||||||
|
}
|
||||||
|
// for BEFORE_N_AFTER, do nothing in here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// fill the last of the posXbuffer
|
||||||
|
if (str.isNotEmpty()) {
|
||||||
|
val lastCharProp = glyphProps[str.last()]
|
||||||
|
val penultCharProp = glyphProps[str[nonDiacriticCounter]]!!
|
||||||
|
posXbuffer[posXbuffer.lastIndex] = 1 + posXbuffer[posXbuffer.lastIndex - 1] + // adding 1 to house the shadow
|
||||||
|
if (lastCharProp != null && lastCharProp.writeOnTop >= 0) {
|
||||||
|
val realDiacriticWidth = if (lastCharProp.alignWhere == GlyphProps.ALIGN_CENTRE) {
|
||||||
|
(lastCharProp.width).div(2) + penultCharProp.diacriticsAnchors[0].x
|
||||||
|
}
|
||||||
|
else if (lastCharProp.alignWhere == GlyphProps.ALIGN_RIGHT) {
|
||||||
|
(lastCharProp.width) + penultCharProp.diacriticsAnchors[0].x
|
||||||
|
}
|
||||||
|
else 0
|
||||||
|
|
||||||
|
maxOf(penultCharProp.width, realDiacriticWidth)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
(lastCharProp?.width ?: 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
posXbuffer[0] = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e: NullPointerException) {}
|
||||||
|
|
||||||
|
return posXbuffer to posYbuffer
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* @param col RGBA8888 representation
|
||||||
|
*/
|
||||||
|
private fun Pixmap.drawPixmap(pixmap: Pixmap, xPos: Int, yPos: Int, col: Int) {
|
||||||
|
for (y in 0 until pixmap.height) {
|
||||||
|
for (x in 0 until pixmap.width) {
|
||||||
|
val pixel = pixmap.getPixel(x, y) // Pixmap uses RGBA8888, while Color uses ARGB. What the fuck?
|
||||||
|
|
||||||
|
val newPixel = pixel colorTimes col
|
||||||
|
|
||||||
|
this.drawPixel(xPos + x, yPos + y, newPixel)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private infix fun Int.colorTimes(other: Int): Int {
|
||||||
|
val thisBytes = IntArray(4) { this.ushr(it * 8).and(255) }
|
||||||
|
val otherBytes = IntArray(4) { other.ushr(it * 8).and(255) }
|
||||||
|
|
||||||
|
return (thisBytes[0] times256 otherBytes[0]) or
|
||||||
|
(thisBytes[1] times256 otherBytes[1]).shl(8) or
|
||||||
|
(thisBytes[2] times256 otherBytes[2]).shl(16) or
|
||||||
|
(thisBytes[3] times256 otherBytes[3]).shl(24)
|
||||||
|
}
|
||||||
|
|
||||||
|
private infix fun Int.times256(other: Int) = multTable255[this][other]
|
||||||
|
|
||||||
|
private val multTable255 = Array(256) { left ->
|
||||||
|
IntArray(256) { right ->
|
||||||
|
(255f * (left / 255f).times(right / 255f)).roundToInt()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// randomiser effect hash ONLY
|
||||||
|
private val hashBasis = -3750763034362895579L
|
||||||
|
private val hashPrime = 1099511628211L
|
||||||
|
private var hashAccumulator = hashBasis
|
||||||
|
fun getHash(char: Int): Long {
|
||||||
|
hashAccumulator = hashAccumulator xor char.toLong()
|
||||||
|
hashAccumulator *= hashPrime
|
||||||
|
return hashAccumulator
|
||||||
|
}
|
||||||
|
|
||||||
|
fun CodepointSequence.getHash(): Long {
|
||||||
|
val hashBasis = -3750763034362895579L
|
||||||
|
val hashPrime = 1099511628211L
|
||||||
|
var hashAccumulator = hashBasis
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.forEach {
|
||||||
|
hashAccumulator = hashAccumulator xor it.toLong()
|
||||||
|
hashAccumulator *= hashPrime
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e: NullPointerException) {
|
||||||
|
System.err.println("CodepointSequence is null?!")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
|
||||||
|
return hashAccumulator
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun Int.charInfo() = "U+${this.toString(16).padStart(4, '0').toUpperCase()}: ${Character.getName(this)}"
|
||||||
|
|
||||||
|
|
||||||
|
override fun dispose() {
|
||||||
|
super.dispose()
|
||||||
|
textCache.values.forEach { it.dispose() }
|
||||||
|
sheets.values.forEach { it.dispose() }
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
testing.PNG
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 221 KiB |
BIN
testtex.tga
LFS
Normal file
52
testtext.txt
@@ -1,16 +1,38 @@
|
|||||||
To
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae auctor eu augue ut lectus arcu bibendum. Pulvinar pellentesque habitant morbi tristique senectus et netus. Turpis nunc eget lorem dolor sed viverra ipsum. Duis ultricies lacus sed turpis tincidunt id. Facilisi morbi tempus iaculis urna id volutpat lacus laoreet non. Viverra adipiscing at in tellus integer feugiat scelerisque varius morbi. Viverra vitae congue eu consequat ac felis donec et odio. Quis viverra nibh cras pulvinar. Diam donec adipiscing tristique risus nec feugiat. Ut tristique et egestas quis ipsum suspendisse ultrices. Turpis cursus in hac habitasse. Eget duis at tellus at urna. Eget sit amet tellus cras adipiscing enim eu. Sit amet tellus cras adipiscing enim eu turpis egestas.
|
||||||
uu
|
|
||||||
Td
|
|
||||||
mm
|
|
||||||
Ye
|
|
||||||
Yd
|
|
||||||
|
|
||||||
/œ̃/
|
Aliquam faucibus purus in massa tempor. Eget nullam non nisi est sit amet. Eu ultrices vitae auctor eu augue ut lectus. Tortor at auctor urna nunc. Quam lacus suspendisse faucibus interdum posuere lorem ipsum. Euismod in pellentesque massa placerat. Velit dignissim sodales ut eu sem integer. Lacus vel facilisis volutpat est velit egestas dui id. Urna nec tincidunt praesent semper feugiat. Duis at tellus at urna condimentum mattis. Mi proin sed libero enim sed faucibus. Semper feugiat nibh sed pulvinar proin gravida hendrerit lectus. Ac tincidunt vitae semper quis lectus nulla. Et netus et malesuada fames ac turpis egestas sed tempus. Odio ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Pellentesque massa placerat duis ultricies lacus sed. Venenatis a condimentum vitae sapien pellentesque habitant morbi tristique senectus. Sit amet consectetur adipiscing elit pellentesque.
|
||||||
/ɛ̃/
|
|
||||||
ẽ
|
하수는 두 산 틈에서 나와 돌과 부딪쳐 싸우며, 그 놀란 파도와 성난 물머리와 우는 여울과 노한 물결과 슬픈 곡조와 원망하는 소리가 굽이쳐 돌면서, 우는 듯, 소리치는 듯, 바쁘게 호령하는 듯, 항상 장성을 깨뜨릴 형세가 있어, 전차 만승과 전기 만대나 전포 만가와 전고 만좌로써는 그 무너뜨리고 내뿜는 소리를 족히 형용할 수 없을 것이다. 모래 위에 큰 돌은 홀연히 떨어져 섰고, 강 언덕에 버드나무는 어둡고 컴컴하여 물지킴과 하수 귀신이 다투어 나와서 사람을 놀리는 듯한데, 좌우의 교리가 붙들려고 애쓰는 듯싶었다. 혹은 말하기를, “여기는 옛 전쟁터이므로 강물이 저같이 우는 것이다.” 하지만 이는 그런 것이 아니니, 강물 소리는 듣기 여하에 달렸을 것이다.
|
||||||
Ẽ
|
|
||||||
/ẽ
|
나는 이제야 도를 알았도다. 마음이 어두운 자는 이목이 누가 되지 않고, 이 목만을 믿는 자는 보고 듣는 것을 더욱 밝혀서 병이 되는 것이다. 이제 내 마부가 발을 말굽을 밟혀서 뒷차에 실리었으므로, 나는 드디어 혼자 고삐를 늦추어 강에 띄우고, 무릎을 구부려 발을 모으고 안장 위에 앉았으니, 한번 떨어지면 강이나 물로 땅을 삼고 물로 옷을 삼으며 물로 몸을 삼고 물로 성정을 삼으니, 이제야 내 마음은 한번 떨어질 것을 판단한 터이므로 내 귓속에 강물 소리가 없어지고, 무릇 아홉 번 건너는데도 걱정이 없어 의자 위에서 좌와하고 기거하는 것 같았다. 옛날 우는 강을 건너는데, 황룡이 배를 등으로 져서 지극히 위험했으나 사생의 판단이 먼저 마음 속에 밝고 보니, 용이거나 지렁이거나, 크거나 작거나 족히 관계될 바 없었다. 소리와 빛은 외물이니 외물이 항상 이목에 누가 되어 사람으로 하여금 똑바로 보고 듣는 것을 잃게 하는 것이 이 같거든, 하물며 인생이 세상을 지나는 데 그 험하고 위태로운 것이 강물보다 심하고, 보고 듣는 것이 문득 병이 되는 것임에랴.
|
||||||
o̸
|
|
||||||
O̸
|
数学において体K上定義されたアーベル多様体AがCM-タイプ(CM-type)であるとは、自己準同型環 End(A)の中で十分に大きな部分可換環を持つことをいう。この用語は虚数乗法 (complex multiplication) 論から来ていて、虚数乗法論は19世紀に楕円曲線の研究のため開発された。20世紀の代数的整数論と代数幾何学の主要な成果のひとつに、アーベル多様体の次元d>1の理論の正しい定式化が発見されたことがある。この問題は、多変数複素函数論を使うことが非常に困難であるため、非常に抽象的である。
|
||||||
when the line ends with a diacritics, whole letter wont render
|
|
||||||
if the line starts with a letter-with-diacritic, it will error out
|
CM-タイプ(CM-type)は、単位元におけるAの正則接空間上の、EndQ(A)の(極大)可換部分環Lの作用を記述したものである。単純な種類のスペクトル理論が適用され、Lが固有ベクトルの基底を通して作用することを示すことができる。言い換えると、LはAの正則ベクトル場の上の対角行列を通した作用を持っている。L自体が複数の体の積ではなく数体であるという単純な場合には、CM-タイプはLの複素埋め込み(complex embedding)のリストである。複素共役をペアとして、2d個の複素埋め込みがあり、CM-タイプは各々のペアのから一つを選択する。そのようなCM-タイプの全てが実現されることが知られている。
|
||||||
|
|
||||||
|
從20世紀西北太平洋热带气旋有命名紀錄起至今,有79個熱帶氣旋的名字被除名。在1999年及以前,西北太平洋的熱帶氣旋命名和除名工作是由美國負責。2000年起,命名表改由世界氣象組織颱風委員會制訂,再交由日本氣象廳命名,而颱風委員會都會舉行年度會議,商討部份熱帶氣旋名稱的去留。其會員國有權要求將熱帶氣旋名字除去,在委員會批准替補名字後,就會交由日本氣象廳進行替換工作。大多數被除名的名字是因為在某地區造成嚴重影響而被替換,但有些名字卻基於其他技術性原因而被除名。
|
||||||
|
|
||||||
|
दर्शनशास्त्र (अंग्रेज़ी-philosophy, यूनानी- φιλοσοφία, अर्थात् "प्रज्ञान से प्रेम" ) सामान्य और मौलिक प्रश्नों का सुव्यवस्थित अध्ययन है, जैसे की अस्तित्व, तर्क, ज्ञान, मूल्य, मन और भाषा से संबंधित। दर्शन वास्तविकता के मौलिक सत्य को तर्कबद्ध रूप से समझने और व्याख्या करने का प्रयास है, यथार्थ की परख के लिये एक दृष्टिकोण है। यह मौलिक प्रश्नों को संबोधित करने के अन्य तरीकों (जैसेकि रहस्यवाद , मिथक , या धर्म) से समालोचनात्मक, व्यवस्थित और तर्कसंगत युक्ति पर निर्भर होने के साथ-साथ अपने पूर्वनुमानों और विधियों पर चिंतन करने के कारण अलग है। व्यापक अर्थ में दर्शन, तर्कपूर्ण, विधिपूर्वक एवं क्रमबद्ध विचार की कला है। इसमें भाषा का तार्किक विश्लेषण और शब्दों और अवधारणाओं के अर्थ का स्पष्टीकरण शामिल है। वास्तव में, दर्शन को परिभाषित करना स्वयं में ही एक दार्शनिक प्रश्न है। कुछ स्रोतों का दावा है कि यह शब्द पाइथागोरस (लगभग ५७० - ४९५ ईसा पूर्व) द्वारा गढ़ा गया था, हालांकि यह पूर्णतः निश्चित नहीं है।
|
||||||
|
|
||||||
|
ऐतिहासिक रूप से, दर्शन में ज्ञान के सभी निकाय शामिल थे और इसके अभ्यासक को एक दार्शनिक के रूप में जाना जाता था।." प्राकृतिक दर्शन ", जो प्राचीन ग्रीस में एक शैक्षणिक विद्या के रूप में शुरू हुआ, इसमें खगोल विज्ञान, चिकित्सा और भौतिकी शामिल हैं। उदाहरण के लिए, आइजैक न्यूटन की १६८७ की प्राकृतिक दर्शन के गणितीय सिद्धांत बाद में भौतिकी की एक पुस्तक के रूप में वर्गीकृत हो गई। 19वीं शताब्दी में, आधुनिक अनुसंधान विश्वविद्यालयों के विकास, अकादमिक दर्शनशास्त्र और अन्य विषयों के वृत्तिकरण और उनमें विशेषज्ञता हासिल करने की ओर ले गए। तब से,सामाजिक उत्पादन के विकास और वैज्ञानिक ज्ञान के संचय की प्रक्रिया में अन्वीक्षण के विभिन्न क्षेत्र जो परंपरागत रूप से दर्शनशास्त्र का हिस्सा थे, दर्शनशास्त्र से पृथक होकर अलग-अलग शैक्षणिक विषय बन गए हैं, मूलतः सामाजिक विज्ञान जैसे मनोविज्ञान, समाजशास्त्र, भाषा विज्ञान और अर्थशास्त्र, साथ में दर्शनशास्त्र एक स्वतन्त्र विषय के रूप में विकसित होने लगा।
|
||||||
|
|
||||||
|
மெய்யியல் இயற்கை, சமுதாயம், சிந்தனை ஆகியவற்றின், வளர்ச்சியின் மீது ஆட்சி செய்யும் மிகப்பொதுவான விதிகளைக் குறித்த அறிவியலே மெய்யியல் எனப்படும். மெய்யியலானது இருப்பு, அறிவு, விழுமியம், காரணம், மனம், மொழி தொடர்பான பொதுவானதும், அடிப்படையானதுமான பிரச்சனைகள் பற்றிய படிப்பு என வரையறுக்கப்படுகிறது.
|
||||||
|
|
||||||
|
மெய்யியல் அல்லது மெய்க்கோட்பாட்டு இயல் அல்லது தத்துவம் (philosophy) என்னும் அறிவுத்துறையானது எது உண்மை, எது சரி, எது அறிவு, எது கலை, எது அறம், எது அழகு, கடவுள் என்று ஏதும் உண்டா, என்பது போன்ற அடிப்படையான கேள்விகளைப் பற்றி ஆழ ஆராயும் துறை ஆகும். தத்துவம் என்றால் உண்மை, உள்ளதை உள்ளவாறே அறிவதைப் பற்றிய கொள்கை, இயல் என்று பொருள். மெய்யியல் துறையில் கருத்துக்கள் எவ்வாறு ஏற்கப்படுகின்றன என்பதும், காரணம், ஏரணம், விவாதம் (தருக்கம்) முதலியன யாவை என்றும் கூர்ந்து நோக்கி ஆராயப்படும்.
|
||||||
|
|
||||||
|
தற்காலத்தில் அறிவியல் என்று அறியப்படும் துறை சிறப்புற்று வளரும் முன்னர், மெய்யியல் துறைதான் முன்னணியில் இருந்த அறிவுத்துறை ஆகும். 2500 ஆண்டுகளுக்கு முன்னர் வாழ்ந்த இந்தியர்களும், சீனர்களும், செருமானியர்களும், கிரேக்கர்களும் பிற உலக மாந்த இனங்களும் பலவாறாக, அடிப்படையாகச் சிந்தித்து தொகுத்து வைத்த கருத்துக்கள்தாம் மெய்யியலின் தொடக்கம். மெய்யியல் என்பது ஆங்கிலத்தில் Philosophy (ஃபிலாசஃபி) என்று கூறப்படுவது. இச்சொல் கிரேக்கச் சொல்லாகிய Φιλοσοφία (philo-sophia) என்பதில் இருந்து பெற்றது. இசொல்லின் பொருள் அறிவின் பால் காதல் (அறிவால் ஈர்க்கபடும் துறை) என்பதாகும்.
|
||||||
|
|
||||||
|
ปรัชญา (อังกฤษ: Philosophy จาก กรีก: φιλοσοφία, philosophia, 'ความรักในปัญญา') เป็นการศึกษาปัญหาทั่วไปและปัญหาพื้นฐาน เช่น เกี่ยวกับการดำรงอยู่ (อภิปรัชญา), เหตุผล (ตรรกศาสตร์), ความรู้ (ญาณวิทยา), คุณค่า (จริยศาสตร์), จิตใจ และ ภาษา Such questions are often posed as problems แหล่งข้อมูลบางแหล่งอ้างว่าคำนี้คิดขึ้นโดยพีทากอรัส (c. 570 – c. 495 ปีก่อนค.ศ.) ในขณะที่บางส่วน ปฏิเสธและเชื่อว่าพีทากอรัสนำคำนี้มาใช้จากคำเดิมที่ปรากฏอยู่แล้ว วิธีวิทยาของปรัชญาประกอบด้วยการตั้งคำถาม, การถกเถียงเชิงวิพากษ์, การถกเถียงด้วยเหตุผล และการนำเสนออย่างเป็นระบบระเบียบ
|
||||||
|
|
||||||
|
ในอดีต คำว่า "ปรัชญา" หมายรวมถึงความรู้ทุกแขนง ส่วนผู้ศึกษาปรัชญา เรียก นักปรัชญา นับแต่ยุคของแอริสตอเติล นักปรัชญากรีกโบราณ จนถึงคริสต์ศตวรรษที่ 19 คำว่า "ปรัชญาธรรมชาติ" ครอบคลุมวิชาดาราศาสตร์ แพทยศาสตร์และฟิสิกส์ อย่างเช่น ตำรา Philosophiæ Naturalis Principia Mathematica (หลักคณิตศาสตร์ของปรัชญาธรรมชาติ) ของไอแซก นิวตัน ในปี 1687 เป็นวิชาปรัชญาก่อนที่ภายหลังจะถูกจำแนกเป็นวิชาฟิสิกส์แทน ในศตวรรษที่ 19 ภายหลังการเติบโตของมหาวิทยาลัยวิจัยทำให้ปรัชญาเชิงวิชาการ (academic philosophy) และสาขาวิชาอื่นกลายเป็นอาชีพและมีความเชี่ยวชาญเฉพาะด้านมากขึ้น หลังจากนั้นจึงมีหลายวิชาที่เคยเป็นส่วนหนึ่งของปรัชญาแยกออกไป โดยเฉพาะสังคมศาสตร์ เช่น จิตวิทยา สังคมวิทยา ภาษาศาสตร์ และเศรษฐศาสตร์
|
||||||
|
|
||||||
|
ในปัจจุบัน โดยทั่วไปถือว่าปรัชญาประกอบด้วยสาขาย่อยหลักทางวิชาการได้แก่ อภิปรัชญา ซึ่งศึกษาธรรมชาติพื้นฐานของการดำรงอยู่ และ ความเป็นจริง, ญาณวิทยา ซึ่งศึกษาธรรมชาติของความรู้ และ ความเชื่อ, จริยศาสตร์ ซึ่งศึกษาคุณค่าทางศีลธรรม และ ตรรกศาสตร์ ซึ่งศึกษากฎเกณฑ์ของการให้เหตุผลเพื่อสร้างข้อสรุปจากความจริง สาขาย่อยอื่น ๆ ที่เป็นที่รู้จักของปรัชญา เช่น ปรัชญาวิทยาศาสตร์, ปรัชญาการเมือง, สุนทรียศาสตร์, ปรัชญาภาษา และ ปรัชญาความคิด เป็นต้น
|
||||||
|
สาขาย่อยอื่น ๆ ที่เป็นที่รู้จักของปรัชญา
|
||||||
|
|
||||||
|
ფილოსოფია — მეცნიერება, მსოფლმხედველობა, იდეების და შეხედულებების სისტემა სამყაროზე და მასში ადამიანის ადგილზე. მისი კვლევის საგანია სამყაროსთან ადამიანის შემეცნებითი, სოციალურ-პოლიტიკური, ღირებულებითი, ეთიკური და ესთეტიკური ურთიერთობები. ფილოსოფიის სხვადასხვა პრობლემების გადასაჭრელად იყენებდნენ ისეთ ურთიერთსაწინააღმდეგო მიმართულებებს, როგორებიცაა: დიალექტიკა და მეტაფიზიკა, რაციონალიზმი და ემპირიზმი, მატერიალიზმი და იდეალიზმი, ნატურალიზმი და სპირიტუალიზმი, დეტერმინიზმი და ინდეტერმინიზმი და ა. შ.
|
||||||
|
|
||||||
|
თანამედროვე ფილოსოფიის ძირითადი ტენდენციები დაკავშირებულია ისეთი ფუნდამენტური პრობლემების გააზრებასთან, როგორებიცაა თანამედროვე ცივილიზაციის ბედი, კულტურების მრავალფეროვნება და ერთიანობა, ადამიანის შემეცნების ბუნება, ყოფიერება და ენა.
|
||||||
|
|
||||||
|
Փիլիսոփայություն, գիտություն իմացության և կեցության ընդհանուր սկզբունքների և օրինաչափությունների մասին։ Ձգտում է պարզաբանել ամբողջ կեցության ընդհանուր կապը և միավորել մարդկային գիտելիքի բոլոր ոլորտները։ Փիլիսոփայությունը կարելի է համարել որոշակի աշխարհայացք և աշխարհըմբռնում, որն ունի նաև մեթոդաբանական գործառնություններ։
|
||||||
|
|
||||||
|
«Փիլիսոփայություն» (հին հունարեն՝ φιλοσοφία) բառն ունի հունական ծագում։ Այն առաջացել է հունարեն «սիրել» և «իմաստություն» բառերից։ Այսինքն՝ փիլիսոփայություն թարգմանաբար նշանակում է «իմաստության հանդեպ սեր»։ Հայ մատենագրության մեջ «փիլիսոփայություն» եզրույթին զուգահեռ գործածվել է նաև «իմաստասիրություն» բառը։
|
||||||
34
testtext_typesetting_full.txt
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae auctor eu augue ut lectus arcu bibendum. Pulvinar pellentesque habitant morbi tristique senectus et netus. Turpis nunc eget lorem dolor sed viverra ipsum. Duis ultricies lacus sed turpis tincidunt id. Facilisi morbi tempus iaculis urna id volutpat lacus laoreet non. Viverra adipiscing at in tellus integer feugiat scelerisque varius morbi. Viverra vitae congue eu consequat ac felis donec et odio. Quis viverra nibh cras pulvinar. Diam donec adipiscing tristique risus nec feugiat. Ut tristique et egestas quis ipsum suspendisse ultrices. Turpis cursus in hac habitasse. Eget duis at tellus at urna. Eget sit amet tellus cras adipiscing enim eu. Sit amet tellus cras adipiscing enim eu turpis egestas.
|
||||||
|
|
||||||
|
Aliquam faucibus purus in massa tempor. Eget nullam non nisi est sit amet. Eu ultrices vitae auctor eu augue ut lectus. Tortor at auctor urna nunc. Quam lacus suspendisse faucibus interdum posuere lorem ipsum. Euismod in pellentesque massa placerat. Velit dignissim sodales ut eu sem integer. Lacus vel facilisis volutpat est velit egestas dui id. Urna nec tincidunt praesent semper feugiat. Duis at tellus at urna condimentum mattis. Mi proin sed libero enim sed faucibus. Semper feugiat nibh sed pulvinar proin gravida hendrerit lectus. Ac tincidunt vitae semper quis lectus nulla. Et netus et malesuada fames ac turpis egestas sed tempus. Odio ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Pellentesque massa placerat duis ultricies lacus sed. Venenatis a condimentum vitae sapien pellentesque habitant morbi tristique senectus. Sit amet consectetur adipiscing elit pellentesque.
|
||||||
|
|
||||||
|
Vel eros donec ac odio tempor. Suspendisse in est ante in nibh mauris cursus. Urna cursus eget nunc scelerisque viverra mauris in. Cursus sit amet dictum sit. Quis imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper. Aenean vel elit scelerisque mauris pellentesque. Mauris in aliquam sem fringilla ut morbi. Nulla aliquet enim tortor at auctor. Pellentesque habitant morbi tristique senectus et. Cras pulvinar mattis nunc sed blandit libero volutpat. Eget velit aliquet sagittis id consectetur purus ut. At volutpat diam ut venenatis tellus in. In tellus integer feugiat scelerisque varius. Dapibus ultrices in iaculis nunc sed augue lacus viverra. Varius quam quisque id diam.
|
||||||
|
|
||||||
|
Ut aliquam purus sit amet luctus venenatis lectus magna. Nunc aliquet bibendum enim facilisis gravida neque convallis a cras. Dictum at tempor commodo ullamcorper a lacus vestibulum sed. Mi proin sed libero enim sed faucibus turpis. Vel turpis nunc eget lorem dolor sed viverra ipsum nunc. Est sit amet facilisis magna. Ultricies tristique nulla aliquet enim. Orci sagittis eu volutpat odio facilisis. Aliquet nec ullamcorper sit amet. Massa placerat duis ultricies lacus sed turpis tincidunt id. Morbi tristique senectus et netus et. Quam id leo in vitae turpis massa sed elementum tempus. Proin sagittis nisl rhoncus mattis rhoncus urna neque viverra justo. Tincidunt eget nullam non nisi est sit amet.
|
||||||
|
|
||||||
|
Feugiat in ante metus dictum at tempor commodo. Maecenas accumsan lacus vel facilisis volutpat. Dignissim cras tincidunt lobortis feugiat vivamus. Ante in nibh mauris cursus mattis molestie a iaculis. Odio pellentesque diam volutpat commodo sed egestas egestas fringilla. Leo integer malesuada nunc vel risus. Tellus id interdum velit laoreet id donec ultrices tincidunt. Et tortor consequat id porta nibh venenatis cras sed. Consectetur libero id faucibus nisl tincidunt eget nullam non nisi. Dapibus ultrices in iaculis nunc sed augue lacus viverra vitae. Enim praesent elementum facilisis leo vel fringilla. Lorem ipsum dolor sit amet consectetur adipiscing elit. Mollis aliquam ut porttitor leo.
|
||||||
|
|
||||||
|
하수는 두 산 틈에서 나와 돌과 부딪쳐 싸우며, 그 놀란 파도와 성난 물머리와 우는 여울과 노한 물결과 슬픈 곡조와 원망하는 소리가 굽이쳐 돌면서, 우는 듯, 소리치는 듯, 바쁘게 호령하는 듯, 항상 장성을 깨뜨릴 형세가 있어, 전차 만승과 전기 만대나 전포 만가와 전고 만좌로써는 그 무너뜨리고 내뿜는 소리를 족히 형용할 수 없을 것이다. 모래 위에 큰 돌은 홀연히 떨어져 섰고, 강 언덕에 버드나무는 어둡고 컴컴하여 물지킴과 하수 귀신이 다투어 나와서 사람을 놀리는 듯한데, 좌우의 교리가 붙들려고 애쓰는 듯싶었다. 혹은 말하기를, “여기는 옛 전쟁터이므로 강물이 저같이 우는 것이다.” 하지만 이는 그런 것이 아니니, 강물 소리는 듣기 여하에 달렸을 것이다.
|
||||||
|
|
||||||
|
산중의 내 집 문 앞에는 큰 시내가 있어 매양 여름철이 되어 큰 비가 한번 지나가면, 시냇물이 갑자기 불어서 항상 차기와 포고의 소리를 듣게 되어 드디어 귀에 젖어 버렸다. 내가 일찍이 문을 닫고 누워서 소리 종류를 비교해 보니, 깊은 소나무가 퉁소 소리를 내는 것은 듣는 이가 청아한 탓이요, 산이 찢어지고 언덕이 무너지는 듯한 것은 듣는 이가 분노한 탓이요, 뭇 개구리가 다투어 우는 것은 듣는 이가 교만한 탓이요, 천둥과 우레가 급한 것은 듣는 이가 놀란 탓이요, 찻물이 끓는 듯이 문무가 겸한 것은 듣는 이가 취미로운 탓이요, 거문고가 궁우에 맞는 것은 듣는 이가 슬픈 탓이요, 종이창에 바람이 우는 것은 듣는 이가 의심나는 탓이니, 모두 바르게 듣지 못하고 특히 흉중에 먹은 뜻을 가지고 귀에 들리는 대로 소리를 만든 것이다.
|
||||||
|
|
||||||
|
지금 나는 밤중에 한 강을 아홉 번 건넜다. 강은 새외로부터 나와서 장성을 뚫고 유하와 조하 · 황화 · 진천 등의 모든 물과 합쳐 밀운성 밑을 거쳐 백하가 되었다. 나는 어제 배로 백하를 건넜는데, 이것은 하류였다. 내가 막 요동 땅에 들어왔을 때는 바야흐로 한여름이라, 뜨거운 볕 밑을 가노라니 홀연 큰 강이 앞에 당하였다. 또한 물결이 산같이 일어나 끝을 볼 수 없으니, 이것은 대개 천리 밖에서 폭우가 온 것이다. 물을 건널 때는 사람들이 모두 머리를 우러러 하늘을 보는데, 나는 생각하기에 사람들이 머리를 들고 쳐다보는 것은 하늘에 묵도하는 것인 줄 알았더니, 나중에 알고 보니 물을 건너는 사람들이 물이 돌아 탕탕히 흐르는 것을 보면 자기 몸은 물이 거슬러 올라가는 것 같고 눈은 강물과 함께 따라 내려가는 것 같아서 갑자기 현기가 나면서 물에 빠지는 것이기 때문에, 그들이 머리를 들어 우러러보는 것은 하늘에 비는 것이 아니라 물을 피하여 보지 않으려 함이었다. 또한 어느 겨를에 잠깐 동안의 목숨을 위하여 기도할 수 있겠는가.
|
||||||
|
|
||||||
|
그 위험함이 이와 같으니, 물 소리를 들어보지 못하고 모두 말하기를, “요동 들은 평평하고 넓기 때문에 물 소리가 크게 울지 않는 것이다.” 하지만 이것은 물을 알지 못하는 것이다. 요하가 울지 않는 것이 아니라 특히 밤에 건너 보지 않은 때문이니, 낮에는 눈으로 물을 볼 수 있으므로 눈이 오로지 위험한 데만 보면서 무서움을 느껴 도리어 눈이 있는 것을 걱정하는 판인데, 어찌 또 들리는 소리가 있겠는가. 지금 나는 밤중에 물을 건너는지라 눈으로 위험한 것을 볼 수 없으니, 위험은 오로지 듣는 데만 있어 바야흐로 귀로 무서움을 느끼니 걱정을 이기지 못하는 것이다.
|
||||||
|
|
||||||
|
나는 이제야 도를 알았도다. 마음이 어두운 자는 이목이 누가 되지 않고, 이 목만을 믿는 자는 보고 듣는 것을 더욱 밝혀서 병이 되는 것이다. 이제 내 마부가 발을 말굽을 밟혀서 뒷차에 실리었으므로, 나는 드디어 혼자 고삐를 늦추어 강에 띄우고, 무릎을 구부려 발을 모으고 안장 위에 앉았으니, 한번 떨어지면 강이나 물로 땅을 삼고 물로 옷을 삼으며 물로 몸을 삼고 물로 성정을 삼으니, 이제야 내 마음은 한번 떨어질 것을 판단한 터이므로 내 귓속에 강물 소리가 없어지고, 무릇 아홉 번 건너는데도 걱정이 없어 의자 위에서 좌와하고 기거하는 것 같았다. 옛날 우는 강을 건너는데, 황룡이 배를 등으로 져서 지극히 위험했으나 사생의 판단이 먼저 마음 속에 밝고 보니, 용이거나 지렁이거나, 크거나 작거나 족히 관계될 바 없었다. 소리와 빛은 외물이니 외물이 항상 이목에 누가 되어 사람으로 하여금 똑바로 보고 듣는 것을 잃게 하는 것이 이 같거든, 하물며 인생이 세상을 지나는 데 그 험하고 위태로운 것이 강물보다 심하고, 보고 듣는 것이 문득 병이 되는 것임에랴.
|
||||||
|
|
||||||
|
数学において体K上定義されたアーベル多様体AがCM-タイプ(CM-type)であるとは、自己準同型環 End(A)の中で十分に大きな部分可換環を持つことをいう。この用語は虚数乗法 (complex multiplication) 論から来ていて、虚数乗法論は19世紀に楕円曲線の研究のため開発された。20世紀の代数的整数論と代数幾何学の主要な成果のひとつに、アーベル多様体の次元d>1の理論の正しい定式化が発見されたことがある。この問題は、多変数複素函数論を使うことが非常に困難であるため、非常に抽象的である。
|
||||||
|
|
||||||
|
フォーマルな定義は、有理数体QとEnd(A)のテンソル積
|
||||||
|
End_Q(A)
|
||||||
|
|
||||||
|
はZ上、次元2dの可換部分環を含んでいることである。d=1のとき、このことは二次体以外にはありえなく、End(A)は虚二次体の整環(英語版)(order)である。d>1に対しては、総実体の虚二次拡大であるCM体の場合が比較すべきに対象である。A が単純アーベル多様体ではないかもしれない(例えば、楕円曲線のカルテシアン積)ことを反映する他の他の場合もある。CM-タイプのアーベル多様体の別の名称は、十分に多くの虚数乗法を持つアーベル多様体である。
|
||||||
|
|
||||||
|
Kが複素数体であれば、任意のCM-タイプのAは、実は、数体である定義体(英語版)(field of definition)を持っている。自己準同型環の可能なタイプは、対合(ロサチの対合(英語版)(Rosati involution))をもつ環として既に分類されていて、CM-タイプのアーベル多様体の分類を導き出す。楕円曲線と同じような方法でCM-タイプの多様体を構成するには、C^dの中の格子 Λ から始め、アーベル多様体のリーマンの関係式を考えに入れる必要がある。
|
||||||
|
|
||||||
|
CM-タイプ(CM-type)は、単位元におけるAの正則接空間上の、EndQ(A)の(極大)可換部分環Lの作用を記述したものである。単純な種類のスペクトル理論が適用され、Lが固有ベクトルの基底を通して作用することを示すことができる。言い換えると、LはAの正則ベクトル場の上の対角行列を通した作用を持っている。L自体が複数の体の積ではなく数体であるという単純な場合には、CM-タイプはLの複素埋め込み(complex embedding)のリストである。複素共役をペアとして、2d個の複素埋め込みがあり、CM-タイプは各々のペアのから一つを選択する。そのようなCM-タイプの全てが実現されることが知られている。
|
||||||
|
|
||||||
|
志村五郎と谷山豊の基本的結果は、CM-タイプとヘッケのL-函数のことばで、A のハッセ・ヴェイユのL-函数を計算することができ、これから導出された無限部分を持つ。これらが、楕円曲線の場合のマックス・ドイリング(英語版)(Max Deuring)の結果を一般化する。
|
||||||
|
|
||||||
|
從20世紀西北太平洋热带气旋有命名紀錄起至今,有79個熱帶氣旋的名字被除名。在1999年及以前,西北太平洋的熱帶氣旋命名和除名工作是由美國負責。2000年起,命名表改由世界氣象組織颱風委員會制訂,再交由日本氣象廳命名,而颱風委員會都會舉行年度會議,商討部份熱帶氣旋名稱的去留。其會員國有權要求將熱帶氣旋名字除去,在委員會批准替補名字後,就會交由日本氣象廳進行替換工作。大多數被除名的名字是因為在某地區造成嚴重影響而被替換,但有些名字卻基於其他技術性原因而被除名。
|
||||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 130 B |