跳转到内容

MeasureTextOptions

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

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

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.

optional bold?: boolean

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


optional fontFamily?: string

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

Default: Arial.


fontSize: number

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

Display px.


optional italic?: boolean

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


optional letterSpacing?: number

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

Extra px between glyphs (mirrors the renderer’s letterSpacing).


optional lineHeight?: number

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

Line height in display px. Default: fontSize * 1.2 (the Text default ratio).


optional maxWidth?: number

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

Word-wrap width in display px. 0 / undefined ⇒ a single line (no wrap).