Why does text look different when I test the game?

Get help using Construct 2

Post » Wed Dec 28, 2011 11:22 am

Sorry if this is a silly question, I just started using Construct. I put some text on my layout and thought it looked fine. I then tested it and found that the font looked much less smooth than it did on the layout. Does anyone know why this might be?
B
1
G
1
Posts: 7
Reputation: 439

Post » Wed Dec 28, 2011 4:47 pm

Text rendering is actually a pretty complicated subject - most browsers do it differently, and Construct 2 also does it differently to browsers, so the appearance of text is never exactly consistent. Which browser are you using and have you tried any other browsers?

Since browsers aren't consistent amongst themselves (and this is true of many things, not just text rendering) you should test across several browsers and check everything is working OK.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Dec 28, 2011 11:42 pm

Thanks for the response. I use Firefox and it's the only browser I've tested on. How can I do things differently to make the text look as intended? Would it work better if I just wrote text in paint and then made that a sprite?
B
1
G
1
Posts: 7
Reputation: 439

Post » Thu Dec 29, 2011 12:16 am

What;s wrong with the text in Firefox? Can you show with some screenshots?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Dec 29, 2011 1:07 am

Sure. Here's the way text looks in the layout:

http://tinypic.com/view.php?pic=10xh4cj&s=5

And here's the way it looks when I test it:

http://tinypic.com/view.php?pic=23ljcpk&s=5

You need to click on the images to clearly see that the second one is quite a bit less smooth than the first.
B
1
G
1
Posts: 7
Reputation: 439

Post » Thu Dec 29, 2011 2:05 am

That's the same kind of difference you should expect to see between browsers. I wouldn't use images for text, hopefully it's either not too big an issue or you could also look in to the SpriteFont plugin.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Dec 29, 2011 4:17 am

That's unfortunate, when using large text it really is noticeable and just looks wrong. Are there some fonts that display correctly for all browsers? Or are there only some browsers that will display all fonts correctly?
B
1
G
1
Posts: 7
Reputation: 439

Post » Thu Dec 29, 2011 3:45 pm

No, as I was saying earlier, even a common font like Arial will probably look different between different browsers (and C2 itself) because they all render text differently. There's no "correct" text rendering system - they all look different but they're not all wrong apart from one - it's just different ways to draw text. So I would argue it just looks different to what you're used to, not "wrong". All fonts will display differently between browsers since they use different text rendering, so I'm afraid this is just something you have to live with.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Dec 29, 2011 10:25 pm

That's so strange to me. I mean, as a firefox user, I never encounter fonts that look as jaggy as how it looks here. Maybe it truly is just my perception of what it "should" look like, but to me the way the text is coming out really seems like some kind of error.
B
1
G
1
Posts: 7
Reputation: 439

Post » Thu Dec 29, 2011 10:38 pm

Only way that i can see to end this problem is rendering text as image, that is sprite fonts. Native text rendering of all browsers currently it's awful. I had no option but make all text of my games as static images. If you want nice smooth gradiented fancy text that's the only way right now. I'm pretty picky with text looks :D
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Next

Return to How do I....?

Who is online

Users browsing this forum: Vallar and 17 guests