import type { jsPDF as JsPdf } from 'jspdf'; import type { WorkPdfPageBounds, WorkPdfPagePoints, WorkPdfTextRun } from './work-pdf-text-layer'; export type WorkPdfTextFontStyle = 'normal' | 'bold' | 'italic' | 'bolditalic'; /** Bounded PDF underline stroke kinds (CSS/Office styles collapse here). */ export type WorkPdfUnderlineKind = 'single' | 'double' | 'thick'; export interface WorkPdfRunUnderline { color: string; kind: WorkPdfUnderlineKind; } /** Opaque fill color for a Writer/CSS highlight background strip. */ export interface WorkPdfRunHighlight { color: string; } export interface WorkPdfStyledTextRun extends WorkPdfTextRun { color: string; fontStyle: WorkPdfTextFontStyle; /** When set, PDF export paints a vector highlight fill under the text run. */ highlight?: WorkPdfRunHighlight; /** When set, PDF export paints a vector underline after clearing raster text. */ underline?: WorkPdfRunUnderline; } /** * Clears raster glyphs under measured Latin runs so the vector text layer can * paint sharp, searchable text without inventing a second layout model. */ export declare function clearWorkPdfTextRunsOnCanvas(canvas: HTMLCanvasElement, runs: readonly WorkPdfTextRun[], pageCss: Pick, fillStyle: string): void; /** * Paints Latin/Latin-1 text as native PDF text operators using Helvetica, and * CJK runs with a host-registered TrueType face when available. Non-encodable * runs are skipped. Geometry matches the searchable text collector. */ export declare function appendWorkPdfVectorTextLayer(pdf: JsPdf, runs: readonly WorkPdfStyledTextRun[], pageCss: Pick, pagePoints: WorkPdfPagePoints): void; export declare function workPdfFontStyleFromCss(style: Pick): WorkPdfTextFontStyle; export declare function workPdfTextColorFromCss(color: string): string;