Page 1 of 1

Server script error

Posted: 04 Oct 2009 21:18
by petert
My question/problem is, I include spaces in the script, why don't they show up in-game? I need the spaces so that the stars are all even.

Re: Server script error

Posted: 04 Oct 2009 21:28
by Rubidium
Variable width fonts don't have fixed width characters, i.e. not all characters have the same width. As such you can't align with spaces.

Re: Server script error

Posted: 04 Oct 2009 21:33
by petert
Thanks for the quick reply, I understand. Is there any way to align them?

Re: Server script error

Posted: 04 Oct 2009 21:59
by Zuu
Not perfectly, but you can do some trial and error to get them better aligned by inserting the amount of spaces requried to make the stars align as good as possible in-game. If it is possible to use color codes, you can insert black characters to get space-looking characters that have a width other than the regular space width.

Re: Server script error

Posted: 05 Oct 2009 07:03
by planetmaker
Trying to align manually is of not much use in OpenTTD with fonts. The font and size is chosen by the player and such things may look completely differently on the screen of another person.