shapesFromText

fun shapesFromText(face: Face, text: String, size: Double, position: Vector2 = Vector2.ZERO, scaler: (Face) -> Double = ::fontHeightScaler): List<Shape>(source)

Generates a list of shapes representing the given text with the specified font face, size, and position.

Return

A list of shapes representing the rendered text.

Parameters

face

The font face used to render the text.

text

The text content to be converted into shapes.

size

The font size to be applied to the shapes.

position

The starting position for rendering the text, defaulting to the origin vector.

scaler

A function that scales the font face. By default, it uses fontHeightScaler.