/** * A width model for authored runs, used only to answer "does this text fit". * * A single characters-per-point factor cannot do this job. Measured against the * shipped display headings (`pdftotext -bbox`), the implied factor ran 0.435 * for mixed-case words and 0.694 for all-caps — a 39% spread that no single * constant survives, because caps and lowercase are simply different widths. * * These are the standard Helvetica advance widths in 1/1000 em. The grotesque * sans faces the stock templates use (DM Sans, Inter, Geist, Archivo) track * them closely enough that summing real characters lands within about 8% of the * rendered width, and it under-estimates more often than it over-estimates — * the safe direction for a rule that only speaks up on overflow. * * Validated against rendered geometry at authoring time: * * "Vision," 80pt model 179.2pt actual 182.7pt −1.9% * "Financial" 80pt model 241.8pt actual 246.8pt −2.0% * "Global" 107pt model 251.6pt actual 264.4pt −4.8% * "Performance" 80pt model 362.2pt actual 383.0pt −5.4% * "OUR" 76pt model 168.9pt actual 158.2pt +6.8% */ /** * Width of `text` in points at `fontSizePt`, with `trackingPt` of signed * letter-spacing applied per character (negative when the run is condensed). */ export declare function estimateTextWidthPt(text: string, fontSizePt: number, trackingPt?: number): number; /** * Lines `text` needs when wrapped at `widthPt`, breaking on spaces. A word * wider than the line gets its own line here; the renderer would break it * mid-word, which `docx/text-fit` reports separately. */ export declare function estimateWrappedLines(text: string, widthPt: number, fontSizePt: number, trackingPt?: number): number; //# sourceMappingURL=text-metrics.d.ts.map