MCPcopy Create free account
hub / github.com/benfry/processing4 / textSize

Method textSize

core/src/processing/core/PGraphics.java:4522–4536  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 /**

Callers

nothing calls this directly

Calls 3

defaultFontOrDeathMethod · 0.95
textSizeImplMethod · 0.95
printlnMethod · 0.45

Tested by

no test coverage detected