/** * Texture atlas generator for GPU font rendering * * Packs multiple glyph bitmaps into a single texture atlas * using shelf/skyline bin packing algorithm. */ import type { Font } from "../font/font.ts"; import { type AtlasOptions, type GlyphAtlas } from "./types.ts"; /** * Build a texture atlas from a set of glyphs */ export declare function buildAtlas(font: Font, glyphIds: number[], options: AtlasOptions): GlyphAtlas; /** * Build atlas for ASCII printable characters (32-126) */ export declare function buildAsciiAtlas(font: Font, options: AtlasOptions): GlyphAtlas; /** * Build atlas for a specific string (including all unique glyphs) */ export declare function buildStringAtlas(font: Font, text: string, options: AtlasOptions): GlyphAtlas; /** * Export atlas to formats suitable for GPU upload */ export declare function atlasToRGBA(atlas: GlyphAtlas): Uint8Array; /** * Export atlas as single-channel alpha texture */ export declare function atlasToAlpha(atlas: GlyphAtlas): Uint8Array; /** * Get UV coordinates for a glyph in the atlas */ export declare function getGlyphUV(atlas: GlyphAtlas, glyphId: number): { u0: number; v0: number; u1: number; v1: number; } | null;