Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: edmundito on Thu 21/04/2005 01:36:03

Title: Hidden Font Characters
Post by: edmundito on Thu 21/04/2005 01:36:03
Puma, or someone:

I was wondering what the hidden characters for the AGS fonts are. For example, I screwed up on commenting the wrong script line and I ended up with the following message on the screen:  :P

That's right, I got a little face that looked like  :P, so I'd like to use that kind of stuff! I think it should be documented too. ;D
Title: Re: Hidden Font Characters
Post by: Gilbert on Thu 21/04/2005 02:41:43
Just open up the font file with say, Radiant's fontedit and you can check out all 128 characters in the SCI font (works also for AGS wfn fonts).
Title: Re: Hidden Font Characters
Post by: Rui 'Trovatore' Pires on Thu 21/04/2005 11:42:15
But we can't export the font files that come with AGS... and they are not external (i.e., there ain't no file containing them)...
Title: Re: Hidden Font Characters
Post by: Ashen on Thu 21/04/2005 16:30:30
For the built-in AGS fonts, you can use StrSetChatAt () to see what characters acsii codes generate.
I.e.:

int charpos;
string disp;
while (charpos < 31) {
  StrFormat (disp, " ");
  StrSetCharAt (disp, 0, charpos);
  string pos;
  StrFormat (pos, " %d", charpos);
  StrCat (disp, pos);
  Display (disp);
  charpos ++;
}

31-128 are just the standard characters shown on the 'Fonts' window, so it's 1 - 30 that're the 'hidden' chars. Over 128 seems to be 'special' characters and keypresses that can't be displayed without crashing.
Title: Re: Hidden Font Characters
Post by: Gilbert on Fri 22/04/2005 03:10:38
You can't display characters with ASCII values > 127 directly.
You can only display them if you're using a translation and using a TTF. (SCI fonts don't support more than 128 characters)