API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classBmFontAdapter
@codexo/exojs / rendering / stable
Adapts BmFontData to the GlyphProvider interface consumed by layoutText. - `getGlyph()` maps BMFont metrics to GlyphInfo using bearings that place each glyph correctly relative to its line's Y origin. - `getKerning()` looks up the BMFont kerning table.
0
props
2
methods
0
events
Import
import { BmFontAdapter } from '@codexo/exojs'Adapts BmFontData to the GlyphProvider interface consumed by layoutText.
- `getGlyph()` maps BMFont metrics to GlyphInfo using bearings that place each glyph correctly relative to its line's Y origin. - `getKerning()` looks up the BMFont kerning table.
Constructors1
new(fontData: BmFontDataParsed representation of a BMFont (.fnt) descriptor., textures: readonly TextureA static GPU texture sourced from an image, canvas, or video element. Holds the pixel source, its sampling state (ScaleModes, WrapModes) and its upload state (…[], scale: number): BmFontAdapterMethods2
getGlyph(char: string, _fontSize: number): GlyphInfoCached glyph data stored in an atlas page after rasterization.Return metrics for the given character at the given font size.
getKerning(prev: string, next: string, _fontSize: number): numberReturn 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.
Source