Font File Format (Unencrypted)

From Staredit Network Wiki
Revision as of 13:23, 1 June 2023 by FaRTy1billion (Talk | contribs) (Added File Formats category)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Specs based on Stormcoast Fortress specs.

  • Word = 2 bytes
  • Long = 4 bytes

File Header

  • Long - File type: always "FONT" (0x544E4F46)
  • Byte - Low Index: First character in the file
  • Byte - High Index: Last character
  • Byte - Width: Maximum width of each letter
  • Byte - Height: Maximum height of each letter
  • n Longs - Offsets to each letter structure (starting with "Low Index", ending with "High Index". An offset of 0 means there is no image.)

Letter Header

  • byte - Width
  • byte - Height
  • byte - Initial X position
  • byte - Y offset of the image
  • n bytes - Compressed image data:
  • bits 0-2 - Pixel Color (x And 7)
  • bits 3-7 - Number of pixels to skip before writing the pixel ((x And 248)/8)