API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classGlyphAtlas
A per-font-variant glyph atlas with automatic multi-page growth. In `'sdf'` mode (default) each atlas page is a single-channel R8 `DataTexture` populated by GlyphSdf. One `GlyphSdf` instance is kept per font size so the atlas can mix sizes efficiently. In `'color'` mode pages are RGBA canvas textures that preserve full glyph colour data for emoji and colour fonts.
import { GlyphAtlas } from '@codexo/exojs' A per-font-variant glyph atlas with automatic multi-page growth.
In `'sdf'` mode (default) each atlas page is a single-channel R8 `DataTexture` populated by GlyphSdf. One `GlyphSdf` instance is kept per font size so the atlas can mix sizes efficiently.
In `'color'` mode pages are RGBA canvas textures that preserve full glyph colour data for emoji and colour fonts.
new(family: string, fontStyle: "normal" | "italic", fontWeight: string, pageSize: number, mode: AtlasMode, sdfRadius: number): GlyphAtlas clear(): void getGlyph(char: string, size: number): GlyphInfo getKerning(prev: string, next: string, fontSize: number): number mode: AtlasMode pages: readonly AtlasPage[] onPageAdded: Signal<[pageIndex]>