- Joined
- 15 Aug 2009
- Messages
- 3,511
- Age
- 33
Does anybody have any documentation on how the font sprite files work? I want to change some of the sprites, like the "Units Granted" or "Mixed-Tech" font sprites, to icons since the mod I'm working on doesn't need those particular ones and I would like to have some new icons to use in tooltips. If I I just edit the texture file, then there will be the icon, followed by a long blank. I basically just need to know how to make the sprite narrower, but the font SPR files are very different from the others.
EDIT: After staring at it for a while, I figured it out. The large set of number pairs is an array of x and y coordinates for characters, the large column of single numbers is their width, and the sprite entry at the very bottom contains the font's character height. I assume that the order is hardcoded so that the first entry is always the sprite drawn for a space and so forth. I am now commenting the font files to make it easy to find characters and will post the final commented files when I'm done.
EDIT: After staring at it for a while, I figured it out. The large set of number pairs is an array of x and y coordinates for characters, the large column of single numbers is their width, and the sprite entry at the very bottom contains the font's character height. I assume that the order is hardcoded so that the first entry is always the sprite drawn for a space and so forth. I am now commenting the font files to make it easy to find characters and will post the final commented files when I'm done.
Last edited: