import type { GlyphId, int16, uint16 } from "../../types.ts"; import type { Reader } from "../binary/reader.ts"; /** * Standard Bitmap Graphics table (sbix) * Apple's bitmap/PNG glyph table for color emoji and bitmap fonts */ export interface SbixTable { version: uint16; flags: uint16; strikes: SbixStrike[]; } /** * Strike (bitmap size) in sbix */ export interface SbixStrike { ppem: uint16; ppi: uint16; glyphData: Map; } /** * Glyph data in sbix */ export interface SbixGlyph { originOffsetX: int16; originOffsetY: int16; graphicType: string; data: Uint8Array; } /** * Common graphic types in sbix */ export declare const SbixGraphicType: { readonly PNG: "png "; readonly JPG: "jpg "; readonly TIFF: "tiff"; readonly PDF: "pdf "; readonly MASK: "mask"; readonly DUPE: "dupe"; }; /** * Parse sbix table */ export declare function parseSbix(reader: Reader, numGlyphs: number): SbixTable; /** * Get glyph bitmap for a specific ppem * Returns the best matching strike */ export declare function getGlyphBitmap(sbix: SbixTable, glyphId: GlyphId, ppem: number): SbixGlyph | null; /** * Get exact ppem strike */ export declare function getStrikeForPpem(sbix: SbixTable, ppem: number): SbixStrike | null; /** * Get all available ppem sizes */ export declare function getAvailablePpemSizes(sbix: SbixTable): number[]; /** * Check if glyph has bitmap data */ export declare function hasGlyphBitmap(sbix: SbixTable, glyphId: GlyphId, ppem?: number): boolean; /** * Resolve dupe graphic type * Returns the actual glyph data for duplicates */ export declare function resolveDupeGlyph(sbix: SbixTable, strike: SbixStrike, glyph: SbixGlyph): SbixGlyph | null;