textmode.js / fonts / TextmodeFont
Class: TextmodeFont
Vector font glyph source for textmode rendering.
Fonts are loaded from TrueType/OpenType/WOFF data, converted into a normalized glyph atlas, and used by layering.TextmodeLayer during the ASCII resolve pass.
Example
Extends
Disposable
Accessors
sourceData
Get Signature
ts
get sourceData(): TextmodeFontSourceData;Immutable decoded font source, shared across layer-safe copies.
Returns
Example
ts
const font = await t.loadFont('font.ttf');
const bytes = font.sourceData.copyBytes();
console.log(bytes.byteLength);Methods
| Method | Description |
|---|---|
| dispose | Dispose of all resources used by this font manager. |