Skip to main content

Interface: FontAtlasData

Defined in: text/font-atlas/font-atlas-data.ts:86

The runtime, Forge-owned representation of a generated MSDF font atlas's metrics, decoupled from whichever offline tool generated it. Produced by toFontAtlasData from the on-disk FontAtlasFileData a FontAtlasCache loads.

Properties​

atlasImage​

atlasImage: string

Defined in: text/font-atlas/font-atlas-data.ts:94

Atlas texture path, relative to this atlas's JSON file.


atlasSize​

atlasSize: AtlasSize

Defined in: text/font-atlas/font-atlas-data.ts:97

Atlas texture pixel dimensions.


distanceRange​

distanceRange: number

Defined in: text/font-atlas/font-atlas-data.ts:103

The distance field's encoded range, in pixels, at the atlas's authored size. Required to compute the shader's screenPxRange at render time.


formatVersion​

formatVersion: 2

Defined in: text/font-atlas/font-atlas-data.ts:88

Schema version this data was produced from.


glyphs​

glyphs: Map<number, GlyphMetrics>

Defined in: text/font-atlas/font-atlas-data.ts:109

Keyed by Unicode code point.


kerning​

kerning: Map<string, number>

Defined in: text/font-atlas/font-atlas-data.ts:115

Keyed by getKerningPairKey(leftCodePoint, rightCodePoint). Absent pairs kern by 0.


metrics​

metrics: FontAtlasMetrics

Defined in: text/font-atlas/font-atlas-data.ts:106

Font metrics shared by every glyph.


type​

type: "msdf"

Defined in: text/font-atlas/font-atlas-data.ts:91

'msdf' for v1; reserved for 'mtsdf' later.