跳转到内容

TextMetrics

此内容尚不支持你的语言。

Defined in: ui/text/measure-text.ts:36

core-ui.ts

The stable UI surface promoted into the top-level esengine namespace (text, UINode box visuals, interaction, layout, theme).

This is the curated public UI API. The complete UI module surface — which also includes low-level text/atlas internals and engine-internal composition glue (e.g. EntityStateMap, ensureComponent) — lives in ./ui and is imported module-directly by the SDK code that needs it. Those internals are intentionally NOT re-exported here, so the public esengine namespace stays a stable, intentional surface.

Re-exported wholesale by core.ts.

height: number

Defined in: ui/text/measure-text.ts:42

lineCount * lineHeight, display px — the height to size a box to.


lineCount: number

Defined in: ui/text/measure-text.ts:40

Number of lines after wrapping + explicit \n.


width: number

Defined in: ui/text/measure-text.ts:38

Width of the widest line, display px.