From d99aada2977ca6765032fe018a4622aacd56d0ed Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Fri, 28 Aug 2015 14:56:36 -0400 Subject: [PATCH] Draw text with empty lines correctly Fixes #3736 --- core/src/processing/core/PGraphics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 9532783f2..971f255e5 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -4708,7 +4708,7 @@ public class PGraphics extends PImage implements PConstants { // boundary of a word or end of this sentence if ((buffer[index] == ' ') || (index == stop)) { // System.out.println((index == stop) + " " + wordStart + " " + index); - if (wordStart == index) { // end of line, nothing is fitting + if (start != stop && wordStart == index) { // end of line, nothing is fitting return false; } float wordWidth = textWidthImpl(buffer, wordStart, index);