Adventure Game Studio

Community => Adventure Related Talk & Chat => Topic started by: Monsieur OUXX on Mon 26/04/2010 10:42:26

Title: Constant-width font?
Post by: Monsieur OUXX on Mon 26/04/2010 10:42:26
Hi all,
It's AGS related but it's not technical --> Here we go :)

Does anyone know where I could find a font suitable for 320*200 but that has a constant width?
Something similar to Courrier New.
The goal is to display things on screen with regular spaces, and it's annoying to have the display ruined when there is a narrower character, such as an 'i'.

Any ideas?
Title: Re: Constant-width font?
Post by: Gilbert on Mon 26/04/2010 11:04:16
Personally, for displaying fixed width fonts under low res. modes I'd recommend using an SCI pixel font set rather than TTF.

For example, this set (http://files.myopera.com/gilbot/AGSStuff/gilsnakefont.zip) I use contains almost only characters 8-pixel wide (with the exception of the space character, which is 4-pixel wide, but it could be easily changed with say Radiant's font editor).

I don't think it looks like Courier though. It's actually not hard even if you paint your own SCI font (just open an existing one and paint on it).

The only disadvantage in using SCI font compared to TTF in this case is that SCI font sets support only 128 characters, so the text strings in your game must contain only ASCII codes 0-127 (whereas if you use a TTF you can display ASCII 0-255).

*Edit: AGI --> SCI: My ignorance  :-[
Title: Re: Constant-width font?
Post by: FSi++ on Mon 26/04/2010 11:30:31
For TTF, try Liberation (https://www.redhat.com/promo/fonts/).
Title: Re: Constant-width font?
Post by: GarageGothic on Mon 26/04/2010 13:58:13
Though not a serif font like Courier New, I'd suggest taking a look at Droid Sans Mono. It's designed for use on mobile devices, so should render well even in lo-res.

(http://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/DroidSansMonoSpecimen.svg/220px-DroidSansMonoSpecimen.svg.png)

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=data/fonts;hb=HEAD
Title: Re: Constant-width font?
Post by: Monsieur OUXX on Tue 27/04/2010 00:15:07
Droid sans mono is good and Liberation are good, but they're TTF; I'm looking for some good old pixels. I'll continue searching.
Title: Re: Constant-width font?
Post by: Monsieur OUXX on Tue 27/04/2010 00:25:05
The font proposed by Gilbet is much better than what I actually have!
The width is still not constant though.
I don't understand how it works. Damn!
Title: Re: Constant-width font?
Post by: Monsieur OUXX on Tue 27/04/2010 00:33:15
Quote from: Gilbet V7000a on Mon 26/04/2010 11:04:16
with the exception of the space character, which is 4-pixel wide

Oh, I didn't see that.
Well, perfect!
Thanks a lot.

EDIT: the links to the fonts editor are broken  :(
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23521.0
Title: Re: Constant-width font?
Post by: Calin Leafshade on Tue 27/04/2010 00:35:02
For low res you can always make your own font.

pixel fonts are pretty easy to do yourself.
Title: Re: Constant-width font?
Post by: Gilbert on Tue 27/04/2010 03:58:32
Quote from: Monsieur OUXX on Tue 27/04/2010 00:33:15
Oh, I didn't see that.
Well, perfect!
Thanks a lot.
You're welcome. :) Actually when I painted that font I originally planned it to be fixed width for all the characters, but at the end I decided to make the spaces half as wide so I can "steal" some space when needed. Full character space can still be done by typing 2 spaces.

Quote
EDIT: the links to the fonts editor are broken  :(

Seems that this link (http://www.tdrdesign.net/downloads/fontedit.exe) works (found from here (http://www.americangirlscouts.org/agswiki/AGS_Editor_&_User_Interface)).

Title: Re: Constant-width font?
Post by: Monsieur OUXX on Tue 27/04/2010 09:57:31
Quote from: Calin Leafshade on Tue 27/04/2010 00:35:02
For low res you can always make your own font.
pixel fonts are pretty easy to do yourself.

Yep, I know, but I'm a techie, and I've already enough to do with scripting! There's plenty of resources out there and my moto is : DON'T RE-INVENT THE WHEEL! (Except if it's to solve a puzzle and if it involves a hamster, of course)  ;)

Good tip with the "double space", Gilbet!
Title: Re: Constant-width font?
Post by: Monsieur OUXX on Tue 27/04/2010 14:37:53
Yey! Gilbet saved my day!
But don't worry guys, I'll keep the other fonts for the high-res GUI, so thanks to you too!



(http://fc01.deviantart.net/fs71/i/2010/117/1/1/A_good_font_makes_the_trick_by_monsieurouxx.png)