Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: xenogia on Fri 22/01/2010 23:18:07

Title: Ugly Text Appearance on a GUI
Post by: xenogia on Fri 22/01/2010 23:18:07
I have created a GUI that is a notebook that appears on the screen at certain points.  In that GUI I have label element where I can put text.  But I have noticed that the font always looks ugly no matter which one I choose.  It doesn't anti-alias or anything, have a look. Am I doing something wrong?

(http://pic.leech.it/i/53d83/9311f4a7uglytext.jpg)
Title: Re: Ugly Text Appearance on a GUI
Post by: Crimson Wizard on Fri 22/01/2010 23:39:33
I believe it may be caused by Outlining.
Try to disable Outline for the font you are using there.

....unless I am mistaken  ::)
Title: Re: Ugly Text Appearance on a GUI
Post by: monkey0506 on Fri 22/01/2010 23:46:25
If you look in some places that font is only 1px thick, so I highly doubt it's automatic outlining causing the problem.

What type of font are you importing? I presume it's TTF?

What point-size is it?

Is the setting "Anti-alias TTF fonts" set to "True" or "False"? I believe it is false by default.

...and...I'm not 100% sure but it's possible that labels don't support anti-aliased fonts. I know that LA-style speech doesn't. If that's the case then DrawingSurfaces do so you could use one of those if needed (noting that you would have to draw onto a copy of whatever background would be showing behind the text or else you would get a pink outline).

And I'm guessing that your game resolution is 640x400 scaled up 2x (based on the image given)?
Title: Re: Ugly Text Appearance on a GUI
Post by: xenogia on Fri 22/01/2010 23:47:29
I eventually figured it out, if the image is has an alpha channel it screws up the font.  The whole image had a transparency over the top when I loaded it up in GIMP.  Not sure how that happened.  But I resolved the issue.  Thanks anyway :)
Title: Re: Ugly Text Appearance on a GUI
Post by: Ryan Timothy B on Sat 23/01/2010 03:34:32
So, do Anti-alias TTF fonts actually work in a textbox?
Title: Re: Ugly Text Appearance on a GUI
Post by: Calin Leafshade on Sat 23/01/2010 03:55:31
They do, but only if the gui has a block colour background. It doesnt work over images.. at least not images with alpha channels.. i havent tried it with flat images.