mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 11:51:50 +09:00
thai kerning
This commit is contained in:
@@ -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())
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 131 B |
BIN
demo.PNG
BIN
demo.PNG
Binary file not shown.
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
@@ -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])
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user