diff --git a/FontTestGDX/src/FontTestGDX.kt b/FontTestGDX/src/FontTestGDX.kt index 74d0415..6a5eeb8 100755 --- a/FontTestGDX/src/FontTestGDX.kt +++ b/FontTestGDX/src/FontTestGDX.kt @@ -50,11 +50,6 @@ class FontTestGDX : Game() { faketex = Texture(fakepix) fakepix.dispose() - - println(font.charsetOverrideDefault) - println(font.charsetOverrideBulgarian) - println(font.charsetOverrideSerbian) - frameBuffer = FrameBuffer(Pixmap.Format.RGBA8888, TEXW, TEXH, true) camera = OrthographicCamera(TEXW.toFloat(), TEXH.toFloat()) diff --git a/assets/thai_variable.tga b/assets/thai_variable.tga index b432f0b..fc31cd0 100755 Binary files a/assets/thai_variable.tga and b/assets/thai_variable.tga differ diff --git a/demo.PNG b/demo.PNG index 9bebe41..79b25fb 100755 Binary files a/demo.PNG and b/demo.PNG differ diff --git a/src/net/torvald/terrarumsansbitmap/gdx/TerrarumSansBitmap.kt b/src/net/torvald/terrarumsansbitmap/gdx/TerrarumSansBitmap.kt index 2fac14f..335d769 100755 --- a/src/net/torvald/terrarumsansbitmap/gdx/TerrarumSansBitmap.kt +++ b/src/net/torvald/terrarumsansbitmap/gdx/TerrarumSansBitmap.kt @@ -337,7 +337,10 @@ class TerrarumSansBitmap( private val pixmapOffsetY = 10 fun draw(batch: Batch, charSeq: CharSequence, x: Int, y: Int) = draw(batch, charSeq, x.toFloat(), y.toFloat()) - override fun draw(batch: Batch, charSeq: CharSequence, x: Float, y: Float) = drawNormalised(batch, charSeq.toCodePoints(), x, y) + override fun draw(batch: Batch, charSeq: CharSequence, x: Float, y: Float): GlyphLayout? { +// charSeq.forEach { dbgprn("${it.toInt().charInfo()} ${glyphProps[it.toInt()]}") } + return drawNormalised(batch, charSeq.toCodePoints(), x, y) + } fun draw(batch: Batch, codepoints: CodepointSequence, x: Int, y: Int) = drawNormalised(batch, codepoints.normalise(), x.toFloat(), y.toFloat()) fun draw(batch: Batch, codepoints: CodepointSequence, x: Float, y: Float) = drawNormalised(batch, codepoints.normalise(), x, y) @@ -1112,6 +1115,7 @@ class TerrarumSansBitmap( // DOES NOT WORK if said diacritics has codepoint > 0xFFFF else if (i < this.lastIndex && this[i + 1] <= 0xFFFF && glyphProps[this[i + 1]]?.stackWhere == GlyphProps.STACK_BEFORE_N_AFTER) { + val diacriticsProp = glyphProps[this[i + 1]]!! seq.add(c) seq.add(diacriticsProp.extInfo!![0]) diff --git a/work_files/thai_variable.psd b/work_files/thai_variable.psd index 015c743..d81d396 100644 Binary files a/work_files/thai_variable.psd and b/work_files/thai_variable.psd differ