Skip to content

Commit

Permalink
prevent leading spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
RacoonDog authored and Wide-Cat committed Nov 29, 2023
1 parent 5c6aceb commit 4796623
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ private void writeBook(PrimitiveIterator.OfInt chars) {
lineIndex++;
// Wrap to next line, unless wrapping to next page
if (lineIndex != 14) page.appendCodePoint(c);
} else if (lineWidth == 0f && c == ' ') {
continue; // Prevent leading space from text wrapping
} else {
lineWidth += charWidth;
page.appendCodePoint(c);
Expand Down

0 comments on commit 4796623

Please sign in to comment.