textWidth()

Typography / Attributes

Description

Calculates and returns the width of any character or text string in the current font.

Syntax

float textWidth(std::string s)

Parameters

NameTypeDescription
sstd::stringthe string to measure

Returns

float

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...