mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-06-12 17:04:03 +09:00
more errorOnUnknownChar flag check
This commit is contained in:
@@ -940,7 +940,9 @@ class TerrarumSansBitmap(
|
|||||||
// fill the last of the posXbuffer
|
// fill the last of the posXbuffer
|
||||||
if (str.isNotEmpty()) {
|
if (str.isNotEmpty()) {
|
||||||
val lastCharProp = glyphProps[str.last()]
|
val lastCharProp = glyphProps[str.last()]
|
||||||
val penultCharProp = glyphProps[str[nonDiacriticCounter]]!!
|
val penultCharProp = glyphProps[str[nonDiacriticCounter]] ?:
|
||||||
|
(if (errorOnUnknownChar) throw throw InternalError("No GlyphProps for char '${str[nonDiacriticCounter]}' " +
|
||||||
|
"(${str[nonDiacriticCounter].charInfo()})") else nullProp)
|
||||||
posXbuffer[posXbuffer.lastIndex] = 1 + posXbuffer[posXbuffer.lastIndex - 1] + // adding 1 to house the shadow
|
posXbuffer[posXbuffer.lastIndex] = 1 + posXbuffer[posXbuffer.lastIndex - 1] + // adding 1 to house the shadow
|
||||||
if (lastCharProp?.writeOnTop == true) {
|
if (lastCharProp?.writeOnTop == true) {
|
||||||
val realDiacriticWidth = if (lastCharProp.alignWhere == GlyphProps.ALIGN_CENTRE) {
|
val realDiacriticWidth = if (lastCharProp.alignWhere == GlyphProps.ALIGN_CENTRE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user