Skip to content

@shbernal/ts-pptx


@shbernal/ts-pptx / index / MeasureTextOptions

Interface: MeasureTextOptions

Defined in: src/types/text.ts:549

Options for layout-time text measurement (TsPptx.measureText). Inches for width, points for type/spacing — the consumer-facing units. The measured face must have metrics registered via TsPptx.registerFontMetrics (a named face without exact metrics uses a conservative heuristic; an unnamed theme-default face is unmeasurable).

Extended by

Properties

bold?

optional bold?: boolean

Defined in: src/types/text.ts:556


charSpacing?

optional charSpacing?: number

Defined in: src/types/text.ts:559

Character spacing in points.


fontFace?

optional fontFace?: string

Defined in: src/types/text.ts:555

Font family name, as used in fontFace. Required for an exact measure; an unnamed face is unmeasurable.


fontSize

fontSize: number

Defined in: src/types/text.ts:553

Font size in points.


insetIn?

optional insetIn?: number

Defined in: src/types/text.ts:569

L/R text inset in inches; when set, subtracted from wIn on both sides (pass a raw box width).


italic?

optional italic?: boolean

Defined in: src/types/text.ts:557


lineSpacing?

optional lineSpacing?: number

Defined in: src/types/text.ts:561

Exact line spacing in points (overrides lineSpacingMultiple).


lineSpacingMultiple?

optional lineSpacingMultiple?: number

Defined in: src/types/text.ts:563

Line spacing as a multiple of single (e.g. 1.5).


paraSpaceAfter?

optional paraSpaceAfter?: number

Defined in: src/types/text.ts:567

Space after each paragraph, in points.


paraSpaceBefore?

optional paraSpaceBefore?: number

Defined in: src/types/text.ts:565

Space before each paragraph, in points.


wIn

wIn: number

Defined in: src/types/text.ts:551

Available text width in inches (the box width minus L/R inset, unless insetIn is given).