/** One curated, redistributable font (R8 hard gate — every entry is OFL; see `docs/FONT-CATALOG.md`).
* `family` is the CSS/registration name; `label` is the Korean UI label; `file` is the basename the
* app serves from its font dir (the lab's `public/fonts/`); `source` is the official download origin. */
export interface FontCatalogEntry {
family: string;
label: string;
license: "OFL";
file: string;
source: string;
/** True for the repo-bundled default (NanumGothic) — always available offline; others need fetch. */
bundled?: boolean;
/** Basename of the BOLD variant (served alongside `file`), if any → binds a weight-700 `@font-face` so
* font-weight="700" headers render TRUE bold instead of unreliable CJK synthetic bold. */
boldFile?: string;
}
/** The v1 curated catalog — **all OFL, redistribution-legal** (issue §카탈로그 v1 / R8). Download URLs
* are the app's concern (it serves these `file`s from its own font dir); `docs/FONT-CATALOG.md` carries
* the license table + original-source links. A host maps each entry to a URL via `catalogUrl`. */
export declare const FONT_CATALOG: readonly FontCatalogEntry[];
/** Map a catalog entry to the URL the app serves it from (default: `/`, base = `/fonts`). */
export declare function catalogUrl(entry: FontCatalogEntry, base?: string): string;
/** The OFL serif substitute family — MUST equal `font_class::SERIF_SUBSTITUTE` on the Rust side, since
* the own-render SVG emits this exact string as the `` `font-family` for 명조 runs. */
export declare const SERIF_SUBSTITUTE = "Nanum Myeongjo";
/** A document face's typographic category (mirror of `font_class::FontCategory`). */
export type FontCategory = "serif" | "gothic" | "other";
/** Classify a document font NAME by Korean/Latin naming convention (mirror of `font_class::classify`).
* Conservative: an unrecognized name is `"other"` (→ the default gothic), never a wrong serif. */
export declare function classifyFont(name: string): FontCategory;
/** Resolve a document face name to the OFL substitute family the renderer should draw with, or `null`
* for 고딕/기타 (→ the default gothic; mirror of `font_class::substitute_family`). */
export declare function substituteFamily(name: string): string | null;
/** True iff `bytes` begins with the TTC ("ttcf") magic — a collection krilla/our shaper reject (§함정). */
export declare function isTtc(bytes: Uint8Array): boolean;
/** Build the screen `@font-face` + alias CSS for the selected font (issue 022 §3). `url` is a blob/URL
* for the SAME bytes fed to `registerFont` (metrics + PDF), so screen == PDF. The alias rule targets
* `` inside `.hw-sheet` (where HwpPageView draws the SVG) so every document font name renders in
* the selected face; the `NanumGothic` re-definition covers the SVG's universal fallback name too. */
export declare function buildFontFaceCss(family: string, url: string, opts?: {
serifUrl?: string;
boldUrl?: string;
serifBoldUrl?: string;
}): string;
/** Extract the distinct primary document font-family names the own-render SVG emits (the part before
* the first comma of each `font-family="…"`). Diagnostics / the "실측" of issue §3 — the alias in
* [`buildFontFaceCss`] handles them uniformly, but this lets a host inspect what the doc requested. */
export declare function svgFontFamilies(svg: string): string[];
//# sourceMappingURL=fonts.d.ts.map