textSize()

Typography / Attributes

Description

Sets the current font size. This size will be used in all subsequent calls to text().

Syntax

void textSize(float size)

Parameters

NameTypeDescription
sizefloatthe size of the letters in pixels

Returns

void

Related

Under the Hood

From Processing.h:

void textSize(float size); inline void PGraphics::textSize(float size) { if(PApplet::g_papplet) PApplet::g_papplet->textSize(size); }

Under the Hood

From Processing.cpp:

void PApplet::textSize(float size) { g_textSize = size; #if PROCESSING_HAS_STB_TRUETYPE if (g_ttf.loaded) bakeAtlas(size); #endif }