Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / MeasureTextOptions

Interface: MeasureTextOptions

Defined in: core-interfaces.ts:2016

Options for layout-time text measurement (PptxGenJS.measureText). Inches for width, points for type/spacing — the consumer-facing units. The measured face must have metrics registered via PptxGenJS.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: core-interfaces.ts:2023


charSpacing?

optional charSpacing?: number

Defined in: core-interfaces.ts:2026

Character spacing in points.


fontFace?

optional fontFace?: string

Defined in: core-interfaces.ts:2022

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


fontSize

fontSize: number

Defined in: core-interfaces.ts:2020

Font size in points.


insetIn?

optional insetIn?: number

Defined in: core-interfaces.ts:2036

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: core-interfaces.ts:2024


lineSpacing?

optional lineSpacing?: number

Defined in: core-interfaces.ts:2028

Exact line spacing in points (overrides lineSpacingMultiple).


lineSpacingMultiple?

optional lineSpacingMultiple?: number

Defined in: core-interfaces.ts:2030

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


paraSpaceAfter?

optional paraSpaceAfter?: number

Defined in: core-interfaces.ts:2034

Space after each paragraph, in points.


paraSpaceBefore?

optional paraSpaceBefore?: number

Defined in: core-interfaces.ts:2032

Space before each paragraph, in points.


wIn

wIn: number

Defined in: core-interfaces.ts:2018

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