API reference

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

I

interfaceGlyphProvider

@codexo/exojs / rendering / stable

Provider of per-character glyph metrics, consumed by layoutText. GlyphAtlas implements this for runtime-rasterized text. `BmFontAdapter` implements it for pre-built BMFont atlases.

0
props
4
methods
0
events
Import
import { GlyphProvider } from '@codexo/exojs'

Provider of per-character glyph metrics, consumed by layoutText.

GlyphAtlas implements this for runtime-rasterized text. `BmFontAdapter` implements it for pre-built BMFont atlases.

Methods4
Vertical metrics of this source's font at fontSize. Optional - a caller without it falls back to fractions of the font size, which places a decoration plausibly but not typographically.
Return metrics for the given character at the given font size.
getKerning?(prev: string, next: string, fontSize: number): number
Return the kerning adjustment (in pixels) between two adjacent characters. Positive values add space; negative values pull glyphs together. Optional - callers treat a missing method as zero kerning.
A solid texel decoration quads sample, or null when this source has none. A source that answers null renders no underline and no strikethrough: there is nowhere in its texture that is reliably opaque, and an offline atlas cannot be given one after the fact.
Source