mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-13 22:46:07 +09:00
somehow fixed issue #8
This commit is contained in:
@@ -411,8 +411,9 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
|
||||
private var nullProp = GlyphProps(15, 0)
|
||||
|
||||
override fun draw(batch: Batch, str: CharSequence, x: Float, y: Float): GlyphLayout? {
|
||||
val str = str.toCodePoints()
|
||||
|
||||
override fun draw(batch: Batch, charSeq: CharSequence, x: Float, y: Float): GlyphLayout? {
|
||||
val str = charSeq.toCodePoints()
|
||||
|
||||
fun Int.flipY() = this * if (flipY) 1 else -1
|
||||
|
||||
@@ -424,6 +425,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
|
||||
if (textBuffer != str) {
|
||||
textBuffer = str
|
||||
//println(textBuffer)
|
||||
val widths = getWidthOfCharSeq(str)
|
||||
|
||||
glyphWidthBuffer = widths
|
||||
|
||||
Reference in New Issue
Block a user