mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-06-12 17:04:03 +09:00
hangul typewriter: more faithful to the machine i'm copying
This commit is contained in:
@@ -57,6 +57,10 @@ class TypewriterGDX(val width: Int, val height: Int) : Game() {
|
|||||||
62, // space
|
62, // space
|
||||||
184,164,171,170, // >HON (ASC_3-90)
|
184,164,171,170, // >HON (ASC_3-90)
|
||||||
62, // space
|
62, // space
|
||||||
|
74,48, // ;t (HANG_BEO)
|
||||||
|
43,12, // o5 (HANG_YU)
|
||||||
|
38,48,51, // jtw (HANG_EOL)
|
||||||
|
164, // H (ASC_-)
|
||||||
75,34, // 'f (HANG_TA)
|
75,34, // 'f (HANG_TA)
|
||||||
40,34, // lf (HANG_JA)
|
40,34, // lf (HANG_JA)
|
||||||
39,32 // kd (HANG_GI)
|
39,32 // kd (HANG_GI)
|
||||||
@@ -67,13 +71,15 @@ class TypewriterGDX(val width: Int, val height: Int) : Game() {
|
|||||||
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()
|
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()
|
||||||
|
|
||||||
fun acceptKey(keycode: Int) {
|
fun acceptKey(keycode: Int) {
|
||||||
// println("[TypewriterGDX] Accepting key: $keycode")
|
println("[TypewriterGDX] Accepting key: $keycode")
|
||||||
|
|
||||||
if (keycode == Input.Keys.ENTER) {
|
if (keycode == Input.Keys.ENTER) {
|
||||||
textbuf.add(CodepointSequence())
|
textbuf.add(CodepointSequence())
|
||||||
}
|
}
|
||||||
else if (printableKeys.contains(keycode and 127)) {
|
else if (printableKeys.contains(keycode and 127)) {
|
||||||
textbuf.last().add(keycode + 0xF3000)
|
val cp = keycode + 0xF3000
|
||||||
|
textbuf.last().add(cp)
|
||||||
|
// println("[TypewriterGDX] width: ${font.glyphProps[cp]}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 320 KiB |
Binary file not shown.
BIN
work_files/typewriter_input/alphnum_glyphs_resized.kra
Normal file
BIN
work_files/typewriter_input/alphnum_glyphs_resized.kra
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user