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:
@@ -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);
|
||||
Reference in New Issue
Block a user