import { ParagraphOutput } from '../../controllers/Story'; export type EffectiveTextStyle = { fontFamily: string; fontSize: number; fontWeight: number; fontStyle: string; /** Raw IDML FontStyle name (e.g. "Bold"), used to resolve the exact font binary. */ styleName?: string; letterSpacing: number; lineHeight: number; color: string; /** IDML `Capitalization="AllCaps"` -> renders uppercase (serial `uppercase` prop). */ uppercase: boolean; /** IDML character `Underline`. A thick, offset underline is InDesign's idiom for a * per-line highlight bar ("Bauchbinde") — see buildTextElements' line-background emit. */ underline: boolean; /** Underline stroke thickness in px (pt at 72dpi). */ underlineWeight?: number; /** Underline position relative to the baseline in px (negative = above the baseline). */ underlineOffset?: number; /** Underline stroke color as hex (own swatch — e.g. Paper -> white). */ underlineColor?: string; /** IDML character stroke (outlined text): stroke color as hex + weight in px. Core paints * ``; we don't emit it today, so outlined text is invisible. */ strokeColor?: string; strokeWeight?: number; /** IDML character `StrikeThru` — renders as `text-decoration: line-through`. */ strikeThrough?: boolean; /** IDML paragraph shading (`ParagraphShadingOn`) — a fill drawn behind the WHOLE * paragraph. Paragraph-level, resolved from the applied/local paragraph style and * carried on every run's style; emitted as a line-bound background block behind the * text element (see buildTextElements' paragraph-shading emit). Offsets in px (pt@72). */ paragraphShading?: { color: string; topOffset: number; bottomOffset: number; leftOffset: number; rightOffset: number; }; /** IDML paragraph `Hyphenation="true"` — enable automatic hyphenation. Emitted as the * serial `hyphenation` flag + `linebreakingAlgorithm: 'knuth-plass'` (hyphenation only * works under knuth-plass). Only set when a hyphenator for the language is available. */ hyphenate?: boolean; /** BCP-47 tag for hyphenation, mapped from IDML `AppliedLanguage` (e.g. 'de', 'en-us'). */ hyphenationLanguage?: string; /** IDML paragraph `RuleAbove`/`RuleBelow` — a colored rule line above the first line / * below the last line of the paragraph, spanning the column width. Emitted as a * line-bound rectangle (see buildTextElements' paragraph-rule emit). Weight/offset in px. */ paragraphRuleAbove?: { color: string; weight: number; offset: number; }; paragraphRuleBelow?: { color: string; weight: number; offset: number; }; /** IDML `HorizontalScale` as a ratio (99% → 0.99). Scales glyph advances/ink * horizontally — designers use ±1–2% to fit a line exactly, so it decides WRAP, not just * looks. Carried into measurement (probe features `scale`) and the serial (element * `fontStretch` / richtext `format.scale`); core scales measurement + rendered glyphs. */ horizontalScale: number; }; export declare function mapIndesignLanguageToBCP47(applied: string | undefined): string | undefined; export declare const ALIGN_TO_FRACTION: Record; export declare const JUSTIFY_ALIGNS: Set; export declare function weightFromFontStyle(fontStyle?: string): number; export declare function italicFromFontStyle(fontStyle?: string): string; export declare function effectiveTextStyle(paragraph: ParagraphOutput, feature: ParagraphOutput['features'][number], defaultFont: string, rootDefaults?: { hyphenation?: boolean; language?: string; }): EffectiveTextStyle; export declare const LETTER_SPACING_TOLERANCE = 0.03; export declare const sameLetterSpacing: (a: number, b: number) => boolean; export declare const sameHorizontalScale: (a: number, b: number) => boolean; export declare const sameTextStyle: (a: EffectiveTextStyle, b: EffectiveTextStyle) => boolean; export declare const LEADING_TOLERANCE = 0.5; export declare const sameLeading: (a: EffectiveTextStyle, b: EffectiveTextStyle) => boolean; //# sourceMappingURL=style.d.ts.map