When using labels or the think command it does something weird.

Started by xenogia, Fri 29/01/2010 03:47:15

Previous topic - Next topic

xenogia

Whenever I use say the text command from a gui, or the think command it removes the first character of the sentence that I type.  So for example:

Code: ags

gLabel.Text = "Hello There!";


or

Code: ags

cEgo.Think ("Hello There!");


it actually outputs as

ello there!


So I have to keep putting a space at the start of the sentence to get the text to display correctly.  Is this a bug in AGS?

Gilbert

Hmmm odd.

Can you upload some small files to demonstrate your problems? (No need to use your real game materials.)

xenogia

I think maybe it might be the font, cause I just tested it using a default template.  I'll get onto it when I get home from work making a template that does it.

EDIT: Actually on a quick note it only happens if I have text box GUI attached to it.  I did this by testing at my pc via remote access.

Gilbert

Is that a True Type Font? I'm not sure, but maybe the font contains some hinting information which somehow makes the text misaligned to the left.

You may try to change the font and see if that changes anything.

xenogia

Correct it is, I'll try changing and it see how it goes.

xenogia

Gilbot I figured it out, it only happens when you anti-alias a true type font, if its not anti-aliased it is fine.  This must be a bug in the new ags beta.

Gilbert

Did it happen with all TTF fonts?

I've tested some beta version (as I won't go into the troubles to install the RC releases on this office computer, so I'm not sure if this was introduced in a more recent version) of V3.2 and I just imported the Arial font shipped with XP and so far I don't see any problems when displaying the text in a label or the message box.

Edit:
Hmmm. From the change log, in RC2:
Quote
* Fixed GUI label text not being anti-aliased if there was a background image but the BGColor was set to 0
Don't know whether this change caused your problem, but one thing I don't understand is, if the change was written like this, it should have been checked.

xenogia

For me yes, tried a few different ones.. I'll upload the template for you to have a look at, and you can try it.

http://xenogiagames.com/bug.zip

SMF spam blocked by CleanTalk