Skip to content

Commit

Permalink
UIWrappedText: Fix incorrect font used for centering
Browse files Browse the repository at this point in the history
GitHub: #132
  • Loading branch information
Johni0702 authored Jan 25, 2024
1 parent 67ca997 commit f4fa7f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ open class UIWrappedText @JvmOverloads constructor(

lines.forEachIndexed { i, line ->
val xOffset = if (centered) {
(width - line.width(textScale)) / 2f
(width - line.width(textScale, getFontProvider())) / 2f
} else 0f

getFontProvider().drawString(
Expand Down

0 comments on commit f4fa7f9

Please sign in to comment.