vyaz-monorepo / core/src / AutofitConfig
Interface: AutofitConfig
Defined in: core/src/types/Document.ts:217
Configuration for automatic font-size reduction (autofit).
When enabled is true, the layout engine will scale down the font size of all runs proportionally so the text fits inside the frame's width × height. The scaling stops at minFontSize.
Example
{ enabled: true, minFontSize: 10, maxFontSize: 24, baseFontSize: 18 }See
Properties
baseFontSize?
optionalbaseFontSize?:number
Defined in: core/src/types/Document.ts:237
Base font size used as a reference when TextRun.fontSize is interpreted as a relative scale factor.
Todo
Currently TextRun.fontSize is absolute px. In future it may be a ratio relative to this base.
enabled
enabled:
boolean
Defined in: core/src/types/Document.ts:219
Whether autofit is active.
maxFontSize?
optionalmaxFontSize?:number
Defined in: core/src/types/Document.ts:229
Maximum font size in px. The engine will never grow text above this threshold.
minFontSize?
optionalminFontSize?:number
Defined in: core/src/types/Document.ts:224
Minimum font size in px. The engine will never shrink text below this threshold.
