Difference between revisions of "Font File Format (Unencrypted)"
From Staredit Network Wiki
m (1 revision imported: Restoring SC1 backup) |
(Added File Formats category) |
||
Line 24: | Line 24: | ||
[[Category:Reference]] | [[Category:Reference]] | ||
[[Category:Modding]] | [[Category:Modding]] | ||
+ | [[Category:File Formats]] |
Latest revision as of 14:23, 1 June 2023
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)