API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classGlyphAtlasPool

@codexo/exojs / rendering / stable

Manages one GlyphAtlas per font variant + mode combination. The pool key is `"${family}:${fontStyle}:${fontWeight}:${mode}"`. All text nodes sharing the same font variant and mode draw from the same atlas pages, so identical glyphs are rasterized only once regardless of which node first requests them. Use getDefaultGlyphAtlasPool to obtain the shared process-wide instance. Tests can mock that function to inject a fake pool.

0
props
2
methods
0
events
Import
import { GlyphAtlasPool } from '@codexo/exojs'

Manages one GlyphAtlas per font variant + mode combination.

The pool key is `"${family}:${fontStyle}:${fontWeight}:${mode}"`. All text nodes sharing the same font variant and mode draw from the same atlas pages, so identical glyphs are rasterized only once regardless of which node first requests them.

Use getDefaultGlyphAtlasPool to obtain the shared process-wide instance. Tests can mock that function to inject a fake pool.

Constructors 1
new(pageSize: number): GlyphAtlasPool
Methods 2
clearAll(): void
getAtlas(family: string, fontStyle: "normal" | "italic", fontWeight: string, mode: AtlasMode, sdfRadius: number): GlyphAtlas
Source