import { DecodedPNG } from "./png.js"; import { RuntimePaths } from "./types.js"; export declare const GLYPH_STYLES: readonly [{ readonly key: "r22"; readonly px: 22; readonly weight: "regular"; }, { readonly key: "r24"; readonly px: 24; readonly weight: "regular"; }, { readonly key: "s22"; readonly px: 22; readonly weight: "semibold"; }, { readonly key: "s28"; readonly px: 28; readonly weight: "semibold"; }, { readonly key: "b20"; readonly px: 20; readonly weight: "bold"; }, { readonly key: "b24"; readonly px: 24; readonly weight: "bold"; }, { readonly key: "b26"; readonly px: 26; readonly weight: "bold"; }, { readonly key: "b38"; readonly px: 38; readonly weight: "bold"; }]; export type GlyphStyleKey = (typeof GLYPH_STYLES)[number]["key"]; export declare function glyphCharset(): string[]; export interface GlyphCell { x: number; w: number; adv: number; } export interface GlyphStyleMetrics { px: number; weight: string; ascent: number; descent: number; pad: number; cellH: number; glyphs: Record; } export interface GlyphMetricsFile { version: number; styles: Record; } export interface LoadedGlyphStyle { metrics: GlyphStyleMetrics; atlas: DecodedPNG; } export type GlyphSet = Record; export declare function glyphMetricsPath(paths: RuntimePaths): string; export declare function glyphAtlasPath(paths: RuntimePaths, styleKey: string): string; export declare function bakeGlyphAtlases(paths: RuntimePaths, options?: { dryRun?: boolean; }): string[]; export declare function loadGlyphSet(paths: RuntimePaths): GlyphSet | null; export declare function measureText(style: LoadedGlyphStyle, text: string): number; export declare function ellipsize(style: LoadedGlyphStyle, text: string, maxWidth: number): string;