Add bundled TTF fonts, page geometry, column allocator and render model

Static TTF fonts (IBM Plex Sans/Mono, Noto Devanagari/Kannada) with a
fontkit-generated manifest, a verifier and OFL licences. Every family
registers a normal and italic source so fallback stacks cannot throw.
Adds A4/Letter geometry with margin presets, an exact column allocator,
deterministic Indian-grouping money and date formatting, text sanitising
and a pure buildRenderModel.
This commit is contained in:
2026-10-04 04:38:03 +05:30
parent 12d80efcb8
commit bf4b85563b
40 changed files with 2162 additions and 49 deletions
+35
View File
@@ -0,0 +1,35 @@
import manifestJson from "../../../public/fonts/manifest.json";
export interface FontFileEntry {
file: string;
weight: number;
style: "normal" | "italic";
sha256: string;
fsType: number;
upm: number;
ascent: number;
descent: number;
lineGap: number;
capHeight: number;
xHeight: number;
hasRupee: boolean;
hasTabularNums: boolean;
}
export interface FontFamilyEntry {
family: string;
folder: string;
license: string;
licenseFile: string;
fonts: FontFileEntry[];
}
export interface FontManifest {
version: 1;
families: FontFamilyEntry[];
}
// Generated by scripts/fonts/build-manifest.mjs.
export const FONT_MANIFEST = manifestJson as FontManifest;
export const FONT_FAMILIES: readonly string[] = FONT_MANIFEST.families.map((f) => f.family);