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.
Properties
Section titled “Properties”
optionalbold?:boolean
Defined in: ui/text/measure-text.ts:26
fontFamily?
Section titled “fontFamily?”
optionalfontFamily?:string
Defined in: ui/text/measure-text.ts:23
Default: Arial.
fontSize
Section titled “fontSize”fontSize:
number
Defined in: ui/text/measure-text.ts:25
Display px.
italic?
Section titled “italic?”
optionalitalic?:boolean
Defined in: ui/text/measure-text.ts:27
letterSpacing?
Section titled “letterSpacing?”
optionalletterSpacing?:number
Defined in: ui/text/measure-text.ts:29
Extra px between glyphs (mirrors the renderer’s letterSpacing).
lineHeight?
Section titled “lineHeight?”
optionallineHeight?:number
Defined in: ui/text/measure-text.ts:33
Line height in display px. Default: fontSize * 1.2 (the Text default ratio).
maxWidth?
Section titled “maxWidth?”
optionalmaxWidth?:number
Defined in: ui/text/measure-text.ts:31
Word-wrap width in display px. 0 / undefined ⇒ a single line (no wrap).