# Font Definition The game's fonts: one advance width per character code, and a sprite per glyph. - - - ## FontDefinition.Create ```pascal function TFontDefinition.Create(hashName: Integer; const fontData, spriteData: TByteArray): TFontDefinition; static; ``` Builds a font out of the two archives that make one up: the metrics, and the sprite sheet whose frames are the glyphs. `fontData` is exactly 257 bytes - one advance width per character code, then the ascent - and anything else raises. - - - ## FontDefinition.GetGlyphImage ```pascal function TFontDefinition.GetGlyphImage(charCode: Integer): TImage; ``` The glyph drawn for `charCode` as an image. A code the font has no glyph for raises. Every glyph comes back on a canvas as wide as its advance and as tall as the font's `MaxHeight`, placed at its `OffsetX`, `OffsetY`, so glyphs laid side by side are spaced like the game draws them and share a baseline. - - - ## FontDefinition.GetGlyphShadowImage ```pascal function TFontDefinition.GetGlyphShadowImage(charCode: Integer): TImage; ``` Like {ref}`TFontDefinition.GetGlyphImage` but with the game's drop shadow drawn one pixel down and to the right of the glyph. The canvas is one pixel taller so the shadow is never clipped at the bottom, but keeps the glyph's advance as its width. - - - ## FontDefinition.GetGlyphImages ```pascal function TFontDefinition.GetGlyphImages(): TImageArray; function TFontDefinition.GetGlyphShadowImages(): TImageArray; ``` The printable glyphs indexed by character code, from {ref}`TFontDefinition.GetGlyphImage` or {ref}`TFontDefinition.GetGlyphShadowImage`. Space is a blank image as wide as its advance. Codes `0..31` and `96` are left empty.