Page 1 of 1

[WIP] A new font for Oolite

Posted: Sun May 04, 2014 8:27 am
by Diziet Sma
For a variety of reasons, I've decided to embark on that most perilous of quests, producing a new font for Oolite. (and yes, I've been reading about all the potential problems that can cause for OXPs in Oolite!)

By way of getting to grips with the project, I've decided to begin by re-creating, from scratch, the font used in the Deepspace Ships OXP. This is a nice enough font, but due to the lack of a licence in the OXP, and the fact that John Blythe seems to be MIA, it cannot be freely extracted and turned into a standalone OXP.

Cim has mentioned that the font in question is a variant of OCR-A, and he also provided a link to an opensource implementation of the font. I've decided to use that as the foundation for the new font. The only problem I've found is that both it and the PostScript version of OCR-A already available for Linux are missing most of the extended character set required for internationalisation.

For comparison, here is the standard Oolite font file:

Image


And here is the OCR-A version I've generated using Bitmap Font Builder (which works fine on Linux using Wine, btw), before tweaking one or two of the characters and adding the various unique Oolite symbols to it:

Image


What I'd like to ask the devs is, should I handbuild the missing characters, or can I leave it as-is, with the possible caveat that it would probably not work correctly for anyone using any of the language localisation packs?

Re: [WIP] A new font for Oolite

Posted: Sun May 04, 2014 9:15 am
by cim
I would say you should provide the full font - having letters mysteriously missing sounds like the sort of bug which could be difficult for players to track down later. I'm pretty sure some of the high-half characters OCR-A is currently missing are used by a Ships Library book.

Re: [WIP] A new font for Oolite

Posted: Sun May 04, 2014 9:50 am
by Diziet Sma
cim wrote:
having letters mysteriously missing sounds like the sort of bug which could be difficult for players to track down later.
Good point, even aside from the Ships Library thing.

Ok. full font it is, then.

Re: [WIP] A new font for Oolite

Posted: Mon May 05, 2014 2:36 pm
by Diziet Sma
I located a free version of OCR-A Extended, with all the additional characters already included, and have been able to compile and use fonttexgen on my MacBook to generate a texture, but instead of being 1024x1024, the resulting texture is a squashed-looking 1024x712. The same thing happens with the default Helvetica font. Looking through the code, I'm unclear on why this is happening, or how to fix it.

Any suggestions?

Re: [WIP] A new font for Oolite

Posted: Mon May 05, 2014 7:42 pm
by JensAyton
fonttexgen sort of assumes your screen is tall enough for the window (i.e. about 1200 px tall). For some reason I can’t fathom, the window is resizable. In OS X 10.8 and later, size changes will be remembered across launches by default; you can fix this by selecting the window in MainMenu.nib and deselecting Restorable in the Attributes Inspector.

Re: [WIP] A new font for Oolite

Posted: Mon May 05, 2014 8:11 pm
by Diziet Sma
Hmm.. My MacBook is one of the old 2,1 (2007) models. In other words, 10.7 is the highest version of OS X it can run. The resolution is 1280x800 max. Xcode version is 4.6.3
JensAyton wrote:
In OS X 10.8 and later, size changes will be remembered across launches by default; you can fix this by selecting the window in MainMenu.nib and deselecting Restorable in the Attributes Inspector.
I see where to do this, but don't see much point, since I'm stuck with 10.7 anyway.

I see what you mean about resizing the window, (I just now managed to produce a 739x712 texture) but I can't resize it bigger than the screen. So 1024x712 seems to be it. Somewhat irritating.

Can you think of some way of forcing it to use the necessary size?

Re: [WIP] A new font for Oolite

Posted: Mon May 05, 2014 8:24 pm
by JensAyton
Try setting the minimum size of the window equal to the default size (Size Inspector). I don’t really know why I made it resizable to start with.

Re: [WIP] A new font for Oolite

Posted: Tue May 06, 2014 7:02 am
by Diziet Sma
JensAyton wrote:
Try setting the minimum size of the window equal to the default size (Size Inspector).
No joy. Even with minimum size set, the window still resizes to fit the display. :cry: :x

Re: [WIP] A new font for Oolite

Posted: Thu May 08, 2014 12:48 pm
by Zireael
I am using OCR-A (which I think put into a mini-OXP some time back) on Windows with no problems. Granted, I'm playing English...

Re: [WIP] A new font for Oolite

Posted: Fri May 09, 2014 1:17 am
by Diziet Sma
Yes, I came across that in my research, but the download link is broken.. I guessed that perhaps you were using the one extracted from the Deepspace pack, and that you'd pulled it for licensing reasons.. that was what first motivated me to try to build it myself.

So you're using OCR-A, and not OCR-A-Extended?

Re: [WIP] A new font for Oolite

Posted: Fri May 09, 2014 1:52 pm
by Zireael
I'll try to fix the link then, I didn't know it was broken.