mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 11:51:50 +09:00
fixed a bug where GDX version's getWidth() returns wrong value (and I don't really use GlyphLayout...)
This commit is contained in:
@@ -735,8 +735,7 @@ class GameFontBase(fontDir: String, val noShadow: Boolean = false, val flipY: Bo
|
||||
private val glyphLayout = GlyphLayout()
|
||||
|
||||
fun getWidth(text: String): Int {
|
||||
glyphLayout.setText(this, text)
|
||||
return glyphLayout.width.toInt()
|
||||
return getWidthOfCharSeq(text).sum()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user