Skip to main content

Interface: FontAtlasFileData

Defined in: text/font-atlas/font-atlas-file-data.ts:15

The on-disk, JSON-serializable shape of a committed font atlas asset (<name>.json, sitting alongside <name>.png). This is the same data as FontAtlasData, except glyphs/kerning use JSON-safe arrays/records instead of Maps. toFontAtlasData converts one into the other.

Properties​

atlasImage​

atlasImage: string

Defined in: text/font-atlas/font-atlas-file-data.ts:23

Atlas texture path, relative to this JSON file.


atlasSize​

atlasSize: AtlasSize

Defined in: text/font-atlas/font-atlas-file-data.ts:26

Atlas texture pixel dimensions.


distanceRange​

distanceRange: number

Defined in: text/font-atlas/font-atlas-file-data.ts:29

The distance field's encoded range, in pixels, at the atlas's authored size.


formatVersion​

formatVersion: 2

Defined in: text/font-atlas/font-atlas-file-data.ts:17

Schema version this file was written as.


glyphs​

glyphs: GlyphMetrics[]

Defined in: text/font-atlas/font-atlas-file-data.ts:35

One entry per glyph in the atlas.


kerning​

kerning: Record<string, number>

Defined in: text/font-atlas/font-atlas-file-data.ts:38

Keyed by getKerningPairKey(leftCodePoint, rightCodePoint).


metrics​

metrics: FontAtlasMetrics

Defined in: text/font-atlas/font-atlas-file-data.ts:32

Font metrics shared by every glyph.


type​

type: "msdf"

Defined in: text/font-atlas/font-atlas-file-data.ts:20

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