Generating it's own font

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
Chimrod
Average
Average
Posts: 10
Joined: Wed May 27, 2015 7:31 am

Generating it's own font

Post 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 !
Last edited by Chimrod on Wed Jun 10, 2015 9:18 pm, edited 1 time in total.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Generating it's own font

Post 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.
Post Reply