diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index ab5137a86..6741a0535 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -4131,6 +4131,12 @@ public class PGraphics extends PImage implements PConstants { * @see PGraphics#textFont(PFont) */ public void textSize(float size) { + // https://github.com/processing/processing/issues/3110 + if (size <= 0) { + System.err.println("textSize(" + size + ") ignored: " + + "the text size must be larger than zero"); + return; + } if (textFont == null) { defaultFontOrDeath("textSize", size); } diff --git a/core/todo.txt b/core/todo.txt index 7b224bd90..91b227aaa 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -8,6 +8,8 @@ X mostly getting away from this X bezierSegment() function to do equal-length segments X https://github.com/processing/processing/issues/2919 X handled instead as an example +X add warning message when a negative textSize() is used +X https://github.com/processing/processing/issues/3110 _ dragging sketch window hides it _ https://github.com/processing/processing/issues/3092