Sets the current font size. This size will be used in all subsequent calls to the text() function. Font size is measured in units of pixels. @webref typography:attributes @webBrief Sets the current font size @param size the size of the letters in units of pixels @see PApplet#loadFont(String)
(float size)
| 4520 | * @see PGraphics#textFont(PFont) |
| 4521 | */ |
| 4522 | public void textSize(float size) { |
| 4523 | // https://github.com/processing/processing/issues/3110 |
| 4524 | if (size <= 0) { |
| 4525 | // Using System.err instead of showWarning to avoid running out of |
| 4526 | // memory with a bunch of textSize() variants (cause of this bug is |
| 4527 | // usually something done with map() or in a loop). |
| 4528 | System.err.println("textSize(" + size + ") ignored: " + |
| 4529 | "the text size must be larger than zero"); |
| 4530 | return; |
| 4531 | } |
| 4532 | if (textFont == null) { |
| 4533 | defaultFontOrDeath("textSize", size); |
| 4534 | } |
| 4535 | textSizeImpl(size); |
| 4536 | } |
| 4537 | |
| 4538 | |
| 4539 | /** |
nothing calls this directly
no test coverage detected