import type { InlineSpan } from '../parse/types.js'; import type { VDTLine } from '../vdt.js'; import type { DesignTextRun } from './richText.js'; /** The fonts a CJK design text is set in: the element's, and the ones its * inline marks pick (bold, italic). */ export interface CjkDesignFonts { normal: string; bold: string; italic: string; boldItalic: string; } /** A line of CJK design text: its text, width (a hung mark left out), * runs (absent when the line is one run in the element's font at the * glyphs' own advances) and where it starts in its room. */ export interface CjkDesignLine { text: string; width: number; runs?: DesignTextRun[]; xOffset: number; } /** Whether a design text (one paragraph or line of it) is set by the CJK * composer: the document composes design text (`cjk.composeDesignText`, * on unless a configuration stored before #637 pins it off) and the text * composes as CJK, as a body paragraph would. */ export declare function composesDesignAsCjk(text: string): boolean; /** * Compose one paragraph of design text (no newline in it) with the CJK * composer: `spans` in `fonts`, lines `maxWidth` wide less `indents[i]` * (the last repeating; the line starts that far in), or one line when * `maxWidth` is undefined. `measureIn` measures a run's text as the * renderers paint it (tracking included), so a run whose box is its * glyphs' advance carries no `inkOffset`. `seams` are where the rule of * 二、三日 stops reading (#724). */ export declare function composeCjkDesignParagraph(spans: InlineSpan[], fonts: CjkDesignFonts, maxWidth: number | undefined, lineHeightPx: number, letterSpacingPx: number, measureIn: (text: string, font: string) => number, indents?: readonly number[], /** Where a number the layout wrote meets a text mirrored from the * document, as offsets into the paragraph (#724, * `MeasureBlockOptions.numberSeams`). */ seams?: readonly number[]): CjkDesignLine[]; /** A composed line as design runs (see the module comment). */ export declare function designLineOf(line: VDTLine, fonts: CjkDesignFonts, measureIn: (text: string, font: string) => number): CjkDesignLine; //# sourceMappingURL=cjkText.d.ts.map