mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 20:01:52 +09:00
fix: larger scale font whitespaces
This commit is contained in:
@@ -1086,7 +1086,7 @@ class MovableType(
|
||||
|
||||
// process blocks
|
||||
input.forEachIndexed { index, it ->
|
||||
val posX = it.posX - font.interchar * 2
|
||||
val posX = it.posX
|
||||
val prevEndPos = if (index == 0) 0 else input[index-1].getEndPos()
|
||||
if (index > 0 && posX != prevEndPos) {
|
||||
out.addAll((posX - prevEndPos).glueSizeToGlueChars())
|
||||
@@ -1128,7 +1128,7 @@ class MovableType(
|
||||
|
||||
// process blocks
|
||||
input.forEachIndexed { index, it ->
|
||||
val posX = it.posX - font.interchar * 2
|
||||
val posX = it.posX
|
||||
val prevEndPos = if (index == 0) 0 else input[index-1].getEndPos()
|
||||
if (index > 0 && posX != prevEndPos) {
|
||||
out += posX - prevEndPos
|
||||
|
||||
@@ -1071,13 +1071,13 @@ class TerrarumSansBitmap(
|
||||
return 0
|
||||
|
||||
if (s.size == 1) {
|
||||
return glyphProps[s.first()]?.width ?: (
|
||||
return scale * (glyphProps[s.first()]?.width ?: (
|
||||
if (errorOnUnknownChar)
|
||||
throw InternalError("No GlyphProps for char '${s.first().toHex()}' " +
|
||||
"(${s.first().charInfo()})")
|
||||
else
|
||||
0
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
val cacheObj = getCache(s.getHash())
|
||||
|
||||
Reference in New Issue
Block a user