mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Fix crash issue in TextRenderer
This commit is contained in:
@@ -437,6 +437,7 @@ public class TextRenderer {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lastPieceIdx >= 0) {
|
||||
Piece lastPiece = pieces.get(lastPieceIdx);
|
||||
lineWidths.add(lastPiece.x + lastPiece.w);
|
||||
x = 0;
|
||||
@@ -458,6 +459,14 @@ public class TextRenderer {
|
||||
}
|
||||
needClip = true;
|
||||
}
|
||||
} else {
|
||||
if (font.canShrink()) {
|
||||
//try next font size down if out of space
|
||||
updatePieces(font.shrink());
|
||||
return;
|
||||
}
|
||||
needClip = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (font.canShrink()) {
|
||||
|
||||
Reference in New Issue
Block a user