Skip to content

MeasureTextOptions

Defined in: renderer/src/assets.ts:807

Inputs for measureWrappedText.

readonly optional bitmap?: boolean

Defined in: renderer/src/assets.ts:821

Measure via the bitmap-font path (BitmapFontManager): fontFamily names a baked atlas. Wrap-aware like the canvas path, and returns px (the atlas’s base-unit metrics are scaled to fontSize).


readonly optional fontFamily?: string

Defined in: renderer/src/assets.ts:809

Canvas font family (or a baked bitmap-font name when bitmap).


readonly fontSize: number

Defined in: renderer/src/assets.ts:811

Font size in px.


readonly optional lineHeight?: number

Defined in: renderer/src/assets.ts:813

Vertical advance per line in px (defaults to the font’s natural height).


readonly optional wordWrapWidth?: number

Defined in: renderer/src/assets.ts:815

Wrap width in px. Omit or <= 0 to measure a single unwrapped line.

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/renderer.md.