more bug fixes

This commit is contained in:
minjaesong
2024-04-26 01:30:23 +09:00
parent 6c63504497
commit c695a9c5f0
2 changed files with 3 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ class MovableType(
// println("Paper width: $paperWidth")
val lines = inputText.tokenise()
lines.debugprint()
// lines.debugprint()
lines.forEachIndexed { linenum, it ->
// println("Processing input text line ${linenum + 1} (word count: ${it.size})...")
@@ -653,7 +653,7 @@ class MovableType(
proceedToNextLine()
lines.forEach {
if ((it[0].size == 2 && it[0][0] == 0 && it[0][1] == 0) || it[0].isZeroGlue())
if (it.isNotEmpty() && ((it[0].size == 2 && it[0][0] == 0 && it[0][1] == 0) || it[0].isZeroGlue()))
it.removeAt(0)
}

View File

@@ -2532,7 +2532,7 @@ class TerrarumSansBitmap(
private fun isBulgarian(c: CodePoint) = c in 0xF0000..0xF005F
private fun isSerbian(c: CodePoint) = c in 0xF0060..0xF00BF
fun isColourCode(c: CodePoint) = c == 0x100000 || c in 0x10F000..0x10FFFF
private fun isCharsetOverride(c: CodePoint) = c in 0xFFFC0..0xFFFFF
private fun isCharsetOverride(c: CodePoint) = c in 0xFFFC0..0xFFFDF
private fun isDevanagari(c: CodePoint) = c in codeRange[SHEET_DEVANAGARI_VARW]
private fun isHangulCompat(c: CodePoint) = c in codeRangeHangulCompat