Take out Deepspace font - how to?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Take out Deepspace font - how to?

Post by Zireael »

Hi folks,
I'd like to use the excellent font that is included in the Deepspace Ships OXP without using the ships themselves.

What do I need to copy in order to get the font? Is this font widely available or was it made by the author of the OXP? (because if it is widely available, I guess I could make a standalone font OXP without violating the rule that says we're not allowed to distribute OXPs lacking clear licenses)

Heeelp!

(and yes, I know I have way too many ideas)
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Take out Deepspace font - how to?

Post by cim »

Zireael wrote:
Is this font widely available or was it made by the author of the OXP? (because if it is widely available, I guess I could make a standalone font OXP without violating the rule that says we're not allowed to distribute OXPs lacking clear licenses)
Identifont suggests that it's OCR A Extended, though there are so many OCR A variants that it could easily be one of the others.

There is an open source OCR A implementation which you could reimplement it from.
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Take out Deepspace font - how to?

Post by Zireael »

Great, now how do I implement a new font in Oolite (aka. what files do I need to take a look at in Deepspace)?
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Take out Deepspace font - how to?

Post by cim »

You need to override oolite-font.plist (start from the one with the core game, since there have been a few changes since the last Deepspace release).

You need to change the texture key to point to a file in Textures, and then update the widths array with the correct character widths for that texture.

The texture file is a 16x16 grid of square font characters, aligned to the left of the square. The top two rows are used for special Oolite symbols and control characters. The remainder are normal characters roughly equivalent - with a couple of exceptions - to a standard Latin-1 set. The 'widths' array is then a list (left to right, then top to bottom) of the widths of each character (a character taking the full width of its box would have the value 8 here)
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Take out Deepspace font - how to?

Post by Zireael »

Ok, here is the link to the standalone font OXP.

Please read the readme before jumping to conclusions, it contains license info.

https://www.dropbox.com/s/9sffqy7kxgton ... ont1.0.zip
Post Reply