mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Fix alignment issue with wrapped text
This commit is contained in:
@@ -273,7 +273,7 @@ public class TextRenderer {
|
|||||||
else {
|
else {
|
||||||
String currentLineText = text.substring(0, lastSpaceIdx);
|
String currentLineText = text.substring(0, lastSpaceIdx);
|
||||||
if (!currentLineText.isEmpty()) {
|
if (!currentLineText.isEmpty()) {
|
||||||
pieceWidth = font.getBounds(text).width;
|
pieceWidth = font.getBounds(currentLineText).width;
|
||||||
addPiece(new TextPiece(currentLineText, inReminderTextCount > 0 || atReminderTextEnd), lineNum, x, y, pieceWidth, lineHeight);
|
addPiece(new TextPiece(currentLineText, inReminderTextCount > 0 || atReminderTextEnd), lineNum, x, y, pieceWidth, lineHeight);
|
||||||
consecutiveSymbols = 0;
|
consecutiveSymbols = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user