Difference between revisions of "Font File Format (Unencrypted)"

From Staredit Network Wiki
Jump to: navigation, search
(Created page with '''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 i…')
 
m (1 revision imported: Restoring SC1 backup)
(No difference)

Revision as of 00:32, 21 March 2015

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)