import type { VDTLine, VDTLineSegment } from '../vdt.js'; import { type SetLine } from '../wordPieces.js'; /** * The segments to paint `line` from, and the order to advance through * them in when the line carries one (`VDTLine.order`: a line with * right-to-left text, any line of a mirrored page; the pieces of a * left-to-right word are joined there too, and the order written for the * segments that result). `composed`: a line of the CJK composer, painted * as it is. A line set word by word down a vertical page is asked as any * other, each text at the advance the vertical painter gives it: a Latin * word runs sideways down the column, shaped as on a horizontal line, and * a piece of it is as wide as the word grew by it. Chrome 154, Noto Sans * JP at 14.58 px under `ja`: the layout holds `BY-` 21.01 and `SA` 17.23 * px, `BY-SA` being 38.24 px, where `SA` alone is 17.55 px; painted piece * by piece `SA` ran 0.32 px into the space after it. `tracking` is the * context's `letterSpacing` on entry, px, and on return; `fontOf` gives the font * string a segment is painted in. The context's font is left at any * value: the painter sets its own before each text. */ export declare function paintedSegments(ctx: CanvasRenderingContext2D, line: VDTLine, composed: boolean, tracking: number, fontOf: (seg: VDTLineSegment) => string): SetLine; /** * Whether a line's text, painted with one `fillText` in the context's * font (the line's `font`, set by the caller), is as wide as the layout * measured its segments together. `tracking` is the context's * `letterSpacing` on entry, px, and on return. A line with no two pieces * that touch and no word the browser shapes otherwise inside a longer * string is, with nothing asked: its words and its spaces were measured * whole. So is any line where the context does not measure. */ export declare function paintsAsOneText(ctx: CanvasRenderingContext2D, line: VDTLine, tracking: number, font: string): boolean; //# sourceMappingURL=wordPieces.d.ts.map