Draw text with empty lines correctly

Fixes #3736
This commit is contained in:
Jakub Valtar
2015-08-28 14:56:36 -04:00
parent d94ff549aa
commit d99aada297
+1 -1
View File
@@ -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);