Optionalruntime: EngineRuntimeProtectedconfigProtectedfallbackProtectedfontProtectedfontProtectedruntimeProtectedcalculateCalculates the effective line height for a single line, accounting for baseline alignment spread in mixed-script lines.
ProtectedcalculateCalculates the total height of a set of wrapped lines. Uses a UNIFORM line height across all lines in the element (the max effective height of any single line) so that mixed-script paragraphs have consistent vertical spacing throughout.
ProtectedcloneProtectedfontProtectedgetProtectedgetCalculates the available content width for a style definition.
Optionalstyle: anyProtectedgetProtectedgetProtectedgetProtectedgetReturns the optical scaling factor for a given script class. These factors adjust the rendered font size so secondary scripts appear visually harmonious with the primary (Latin) text.
ProtectedgetProtectedgetRecursively collects text segments from an element's children, preserving styles.
ProtectedgetClassifies the dominant script of a text string based on its first non-space character's Unicode code point.
ProtectedgetProtectedinitializeProtectedisProtectedisProtectedlogOptionalerror: unknownProtectedlogOptionalerror: unknownProtectedmaterializeOptionalcontext: FlowMaterializationContextProtectedmeasureCalculates the total width of a RichLine by summing its segments.
ProtectedmeasureReturns the width in points of a given string using fontkit's layout. Optionally populates the glyph positions if a segment object is provided.
Optionalfont: anyOptionalfontSize: numberOptionalpopulateSegment: TextSegmentOptionalidentitySeed: FlowIdentitySeedProtectedpositionProtectedrebuildProtectedresolveOptionalcontext: FlowMaterializationContextProtectedresolveProtectedsegmentSegments text into chunks based on which enabled font supports the characters.
OptionalpreferredFamily: stringOptionalpreferredLocale: stringOptionalfallbackFamiliesOverride: string[]OptionalsharedFontCache: Map<string, any>ProtectedshapeOptionalidentitySeed: FlowIdentitySeedProtectedsliceProtectedsplitProtectedsplitProtectedwrapSpecialized word-wrapper for rich text segments.
OptionallineLayoutResolver: (lineIndex: number) => { width: number; xOffset: number; yOffset?: number }OptionallineLayoutOut: { offsets: number[]; widths: number[]; yOffsets: number[] }
LayoutEngine shapes elements into flow boxes, paginates them, and returns positioned page boxes for rendering.