Skip to content

Interface: TextTransform ​

Experimental

How text and size change for a font's textcase and variant (see resolveTextTransform).

Properties ​

PropertyTypeDescription
identitybooleanExperimental Whether transform is the identity and sizeScale is 1.
sizeScalenumberExperimental Multiplies the font size.

Methods ​

transform() ​

ts
transform(text): string;

Experimental

Maps the source text to the drawn text. Idempotent: applying it twice changes nothing.

Parameters ​

ParameterType
textstring

Returns ​

string

Released under the MIT License.