extra args not needed when you've got flipY

This commit is contained in:
minjaesong
2021-11-18 17:42:51 +09:00
parent d65aaa6da6
commit 396954e0ee

View File

@@ -83,7 +83,6 @@ internal typealias Hash = Long
* Shiftdown only occurs when non-diacritic character before the mark is lowercase, and the mark itself would stack up. * Shiftdown only occurs when non-diacritic character before the mark is lowercase, and the mark itself would stack up.
* Stack-up or down is defined using Tag system. * Stack-up or down is defined using Tag system.
* *
* If shifted glyphs does not appear correctly, try setting `diacriticStackingAlternative` to `true`
* *
* *
* *
@@ -102,8 +101,7 @@ class TerrarumSansBitmap(
val textCacheSize: Int = 256, val textCacheSize: Int = 256,
val debug: Boolean = false, val debug: Boolean = false,
val shadowAlpha: Float = 0.5f, val shadowAlpha: Float = 0.5f,
val shadowAlphaPremultiply: Boolean = false, val shadowAlphaPremultiply: Boolean = false
val diacriticStackingAlternative: Boolean = false
) : BitmapFont() { ) : BitmapFont() {
constructor(fontDir: String, noShadow: Boolean, flipY: Boolean, invertShadow: Boolean) : this(fontDir, noShadow, flipY, invertShadow, false, 256, false) constructor(fontDir: String, noShadow: Boolean, flipY: Boolean, invertShadow: Boolean) : this(fontDir, noShadow, flipY, invertShadow, false, 256, false)
@@ -932,9 +930,9 @@ class TerrarumSansBitmap(
//println("lastNonDiacriticChar: ${lastNonDiacriticChar.toHex()}") //println("lastNonDiacriticChar: ${lastNonDiacriticChar.toHex()}")
//println("cond: ${thisProp.alignXPos == GlyphProps.DIA_OVERLAY}, charIndex: $charIndex") //println("cond: ${thisProp.alignXPos == GlyphProps.DIA_OVERLAY}, charIndex: $charIndex")
if (thisProp.alignXPos == GlyphProps.DIA_OVERLAY) if (thisProp.alignXPos == GlyphProps.DIA_OVERLAY)
posYbuffer[charIndex] -= H_OVERLAY_LOWERCASE_SHIFTDOWN * (!diacriticStackingAlternative).toSign() // if minus-assign doesn't work, try plus-assign posYbuffer[charIndex] -= H_OVERLAY_LOWERCASE_SHIFTDOWN * (!flipY).toSign() // if minus-assign doesn't work, try plus-assign
else else
posYbuffer[charIndex] -= H_STACKUP_LOWERCASE_SHIFTDOWN * (!diacriticStackingAlternative).toSign() // if minus-assign doesn't work, try plus-assign posYbuffer[charIndex] -= H_STACKUP_LOWERCASE_SHIFTDOWN * (!flipY).toSign() // if minus-assign doesn't work, try plus-assign
} }
stackUpwardCounter++ stackUpwardCounter++