.FNT in IGI 2 -- Multi-Lingual Font Atlases

1. Architectural Role & Engine Purpose

The FNT (Covert Strike Localized Font) format provides internationalized typography, subpixel kerning tables, and anti-aliased font atlases in I.G.I. 2: Covert Strike.

Unlike IGI 1's basic 256-character ASCII bitmaps, IGI 2 expanded the font architecture to support Unicode multi-language localization, enabling native rendering of English, Russian, Polish, and Chinese text for global retail distributions.

2. Binary File Layout & Memory Map Diagram

An IGI 2 FNT file contains Unicode character range headers, kerning pairs, and a multi-channel alpha atlas:

IGI 2 FNT — UNICODE GLYPH METRICS & KERNING LAYOUT 0x00: Header (24 Bytes) UNICODE FNT Magic "FNT2" | Version | Font Height, Baseline | Unicode Glyph Count | Kerning Count | Atlas Dimensions magic[4], version, font_height, baseline, glyph_count, kerning_count, atlas_w, atlas_h Unicode Glyph Index Table (24 Bytes per Glyph) UTF-32 INDEX Unicode Codepoint (uint32) | Width, Height | Advance | Bearing X/Y | Subpixel Atlas UV Rect (float[4]) Supports multilingual localization: English, Russian, Polish, Chinese Kerning Pair Table & Multi-Channel Anti-Aliased Atlas ANTI-ALIASED LeftChar, RightChar, KerningOffset • Anti-aliased 8-bit alpha or DXT3 font texture sheet Crisp, perfectly kerned tactical subtitles and hacking prompts

3. Localized Subtitle Rendering Pipeline Diagram

During mission dialogue playback, the localization system converts UTF-8 strings into batched Direct3D 8 quads:

IGI 2 FNT — MULTILINGUAL TEXT RASTERIZATION PIPELINE 1. DIALOGUE EVENT • Subtitle: "Jones, run!" • UTF-8 String Stream • Loop Character Bytes 2. UTF-32 DECODE • Extract Codepoints • Binary Search Glyph Table • Read UV Coordinates 3. KERNING ADJUST • Lookup (CharA, CharB) • CursorX += KerningDelta • Emit Subpixel Quads 4. D3D8 TEXT DRAW • Bind Atlas Texture • Direct3D Alpha Blit • Crisp Typography

4. C++ Struct Definitions

#pragma pack(push, 1)
struct FntHeaderIgi2 {
    char     magic[4];       // "FNT2"
    uint16_t version;        // 2
    uint16_t font_height;    // Pixel height
    uint16_t baseline;       // Baseline offset
    uint16_t reserved;
    uint32_t glyph_count;    // Total Unicode glyphs
    uint32_t kerning_count;  // Total kerning pairs
    uint16_t atlas_width;    // Atlas width
    uint16_t atlas_height;   // Atlas height
};

struct FntGlyphIgi2 {
    uint32_t codepoint;      // UTF-32 character code
    uint16_t width;          // Glyph width
    uint16_t height;         // Glyph height
    int16_t  advance;        // Horizontal step
    int16_t  bearing_x;      // Left bearing
    int16_t  bearing_y;      // Top bearing
    uint16_t reserved;
    float    u0, v0, u1, v1; // Floating-point atlas UV coordinates
};
static_assert(sizeof(FntHeaderIgi2) == 24, "FntHeaderIgi2 must be 24 bytes");
#pragma pack(pop)