/** * Highlight marks (`:mark[text]{style="…"}`, #888): the coloured band * behind a phrase, as a textbook highlights its key words. The parser keeps * the phrase as ordinary text (its range rides on `InlineSpan.links`, so * the layout is the one without the mark) and the measurer stamps it on * the segments of its words (`VDTLineSegment.mark`). Once the document is * laid out, each line gets the bands of the marks on it * (`VDTLine.highlights`), placed where the renderers paint the segments * ({@link segmentPositions}: alignment, justified word spaces and the * line's paint order included), which every renderer paints under the * line's text. * * A band covers the marked words of a line and the spaces between them, * from 0.8 em above the baseline to 0.25 em below it, grown by the style's * vertical padding. At the phrase's true start and end it reaches * `paddingX` past the letters and its corners are rounded; where the phrase * breaks onto the next line the band stops square at the last letter, and * the next line's band starts square at the first. A style with * `decorationBreak: 'clone'` gives every line piece the padding and the * corners of both ends instead (CSS `box-decoration-break: clone`); the * band is painted, not measured, so the layout is the same. */ import type { ResolvedMarkStyleConfig } from './types.js'; import type { VDTDocument, VDTLine, VDTLineHighlight } from './vdt.js'; import { segmentPositions } from './cjkMarks.js'; type BlockLike = Parameters[1]; /** The highlight bands of a line, relative to it; empty when it holds no * mark. */ export declare function lineHighlights(line: VDTLine, block: BlockLike, styles: readonly ResolvedMarkStyleConfig[], dpi: number): VDTLineHighlight[]; /** Set `VDTLine.highlights` on every line of the document that holds a * highlight mark (see the module comment): paragraphs, headings, list * items, notes and the texts of resource blocks. A style that sets the * text's `color` gives it to the marked words. */ export declare function highlightDocument(doc: VDTDocument): void; export {}; //# sourceMappingURL=highlightMarks.d.ts.map