Page 1 of 1

Generating it's own font

Posted: Wed Jun 10, 2015 8:07 pm
by Chimrod
Hello,

I'm trying to change the oolite default font with a personal one. I've found the Dangerous: Square which provide an alternative, but does not explain how to build it's own theme.

Each character seems loaded from the oolite-font.png resource, and it is quite easy to build it's it's own with a simple script (require python and pygame), but then what ? I've found that the png must be converted in greyscale for the transparency But I did not found any informations about the with units in the oolite-font.plist.

Is there a guide somewhere for that ?

Thanks !

Re: Generating it's own font

Posted: Wed Jun 10, 2015 8:52 pm
by cim
There's the fonttexgen tool, but as currently set up it'll only compile on a Mac as it has no GNUStep build script (and may have other cross-platform issues). Still, you may be able to reverse-engineer its width calculations out of it, at least - line 178 appears to be the key one.

I think the number is the printable width of the symbol in units of "8 pixels" (assuming a 1024x1024 texture), but you might want to check that.