mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 02:45:36 +01:00
avoid another "Zero length string passed to TextLayout constructor" error, other notes
This commit is contained in:
@@ -1942,6 +1942,10 @@ public class PGraphicsJava2D extends PGraphics {
|
||||
if (textFont == null) {
|
||||
defaultFontOrDeath("textWidth");
|
||||
}
|
||||
// Avoid "Zero length string passed to TextLayout constructor" error
|
||||
if (start == stop) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Font font = (Font) textFont.getNative();
|
||||
// System.out.println(font);
|
||||
|
||||
Reference in New Issue
Block a user