( begin auto-generated from textSize.xml ) 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. ( end auto-generated ) @webref typography:attributes @param size the size of the letters in units of pixel
(float size)
| 4444 | * @see PGraphics#textFont(PFont) |
| 4445 | */ |
| 4446 | public void textSize(float size) { |
| 4447 | // https://github.com/processing/processing/issues/3110 |
| 4448 | if (size <= 0) { |
| 4449 | // Using System.err instead of showWarning to avoid running out of |
| 4450 | // memory with a bunch of textSize() variants (cause of this bug is |
| 4451 | // usually something done with map() or in a loop). |
| 4452 | System.err.println("textSize(" + size + ") ignored: " + |
| 4453 | "the text size must be larger than zero"); |
| 4454 | return; |
| 4455 | } |
| 4456 | if (textFont == null) { |
| 4457 | defaultFontOrDeath("textSize", size); |
| 4458 | } |
| 4459 | textSizeImpl(size); |
| 4460 | } |
| 4461 | |
| 4462 | |
| 4463 | /** |
nothing calls this directly
no test coverage detected