control chars for movabletype

This commit is contained in:
minjaesong
2024-04-28 01:18:21 +09:00
parent d87b0dce7c
commit 66c1a1357a
2 changed files with 17 additions and 1 deletions

View File

@@ -749,9 +749,14 @@ class TerrarumSansBitmap(
private fun buildWidthTableInternal() {
for (i in 0 until 16) {
glyphProps[i] = GlyphProps(0)
glyphProps[MOVABLE_BLOCK_1 + i] = GlyphProps(i + 1)
glyphProps[MOVABLE_BLOCK_M1 + i] = GlyphProps(-i - 1)
}
for (i in 0 until 256) {
glyphProps[0xF800 + i] = GlyphProps(0)
}
}
fun getWidth(text: String) = getWidthNormalised(text.toCodePoints())