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