Page 1 of 3

Font size and style

Posted: Sun Feb 22, 2009 7:20 pm
by pagroove
It would be cool if you could change the font size. and maybe some different font styles. But is a low priority request. But it would be nice.

Re: Font size and style

Posted: Sun Feb 22, 2009 7:53 pm
by ClymAngus
pagroove wrote:
It would be cool if you could change the font size. and maybe some different font styles. But is a low priority request. But it would be nice.
I noticed when I re-foldered oolite (I needed to get at the models of the anaconda to show an ooliter the error of their ways) there was a font file? Maybe hacking that could fix it?

Re: Font size and style

Posted: Sun Feb 22, 2009 8:33 pm
by pagroove
ClymAngus wrote:
pagroove wrote:
It would be cool if you could change the font size. and maybe some different font styles. But is a low priority request. But it would be nice.
I noticed when I re-foldered oolite (I needed to get at the models of the anaconda to show an ooliter the error of their ways) there was a font file? Maybe hacking that could fix it?
Mm I did'nt know there was such a file. Maybe. I don't know the limitations of Oolite.

Posted: Sun Feb 22, 2009 8:46 pm
by Kaks
Yep, it's Textures/font.png. The font size is 'a bit' fixed, there's quite a lot of things that depend on it in the code, but there's nothing to stop you from redoing it with a different font, and releaseing it as an oxp! :)

Posted: Sun Feb 22, 2009 9:01 pm
by pagroove
Thanks Kaks,

Its the Oolite-Font.png. Looks like a LOT of work to change :D

Posted: Mon Feb 23, 2009 7:14 am
by another_commander
I think you also need to mess with oolite-font.plist in the Config folder, or you may find that your text is not getting spaced properly.

Posted: Mon Feb 23, 2009 3:02 pm
by Kaks
Right you are, both of you! :)

oolite-font.plist contains the kerning for each character, and it does look 'a bit' daunting... I've just had a go with a relatively simple typewriter font, and I'm not too displeased with the result: here's tty.oxp. Do let me know what you think!

Cheers,

Kaks

Posted: Mon Feb 23, 2009 8:50 pm
by Kaks
Oops! There was a smudge on v.01 of the replacement font.
I've cleaned it all up, & version .02 now gives a spotless typewritten look to the whole of Oolite! :) The link for the new version is still tty.oxp!

Cheers,

Kaks

Posted: Mon Feb 23, 2009 11:03 pm
by pagroove
I will test it tommorow. That was quick :D

Just a dumb question.

Posted: Mon Feb 23, 2009 11:37 pm
by KZ9999
I know this is a dumb question, but why does the game use a bitmap font anyway?

I've notice that the font some times blurs on certain screen resolutions or overwrite their available space causing colour and character corruptions. Would it possible to use a vector based font in the game to display information, that way it could dynamicily scale the font to fit the space if the amount of text gets too big.

If it's a case of copyright on the fonts themselves, that shouldn't be a problem. There are plenty of GPL and CC fonts out there that Oolite could use without a problem. Heck Open Office comes with a bunch of them. I've found the DejaVu family a particularly pleasant font to work with and it comes in a wide range of serif and sanserif forms.

Ultimately you could even get the game to allow the user to chose any they have installed on their computer . They could chose the one which is most readable to them improving the experience. I know this last paragraph is a bit pie-in-the-sky, but it's nice to dream :)

Posted: Tue Feb 24, 2009 12:02 am
by Screet
Kaks wrote:
Oops! There was a smudge on v.01 of the replacement font.
I've cleaned it all up, & version .02 now gives a spotless typewritten look to the whole of Oolite! :)
I've seen it on my other test machine working perfectly during a little test. Now I need to get back attempting to play with the main machine, as I haven't played with it since the installation.

Thanks for the quick oxp-answer to the font question!

Screet

...

Posted: Tue Feb 24, 2009 12:22 am
by Lestradae
Would it become possible with this to create a font with smaller lettering for Oolite, so as to get more text on a window?

Posted: Tue Feb 24, 2009 6:32 am
by Kaks
Wow. Many, many comments!

pagroove: well, it was an easy to align monospace font! Other types of font will be a bit more difficult to slot in the right place! :)

KZ9999: bitmaps are for speed - drawing fonts does use processing power, especially avoiding blurriness! Normally it's not that big a deal, but you don't really want to slow the game down just to display a couple of lines... Having them pre-drawn allows the game to run at exactly the same speed, independent of the font used. If there's a semi-moderate demand for this, we could always come up with a bundle of prepackaged fonts.

Screet: NP! :)

Lestradae: Sure. The line height is hard coded, but as long as there's a readable font, you can make each letter as thin as you want... :)

Posted: Tue Feb 24, 2009 7:11 am
by Screet
Hmmm. Now I found a little issue with that new font. It's using much more space for the same text - and thus a very long message during random hits did not show properly.

It was after fullfilling the contract, when I docked and received the bounty.

Screet

Posted: Tue Feb 24, 2009 8:33 am
by Kaks
Screet wrote:
Hmmm. Now I found a little issue with that new font. It's using much more space for the same text - and thus a very long message during random hits did not show properly.

It was after fullfilling the contract, when I docked and received the bounty.

Screet
Ouch! I'll probably have to find a much smaller font. Back to the drawing board!