text appears 3 pixels higher

Bugs will be moved here once resolved.

Post » Sat Jul 14, 2012 11:13 am

The text plugin displays 3 pixels higher after export, than in preview/editor.

In other word, when editing my game I have to take it into account and every text object I have I place it 3 pixels lower than I want it to appear after export :)

hope that helps
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sat Jul 14, 2012 3:55 pm

Please see how to report bugs. Can you post a .capx demonstrating the issue? Is the issue consistent across all browsers?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Sat Jul 14, 2012 4:31 pm

you won't see anything in capx / preview so there's no sense posting it, plus you can make it yourself in 3 seconds, empty layout with one text objects with some text in it. in preview and editor it's fine, after exporting, posting to server / arcade - text appears 3 pixels higher. that's it :) appears in firefox and chrome, but not tested anywhere else.

hope that helps.
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Mon Jul 16, 2012 3:45 pm

I followed your steps and cannot reproduce any problem at all. Can you share a .capx, a server export, your system specs, and screenshots of what you see? This is why we ask for this all the time regardless.Ashley2012-07-16 15:45:35
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Mon Jul 16, 2012 4:57 pm

http://dl.dropbox.com/u/59009902/TextBaseline.zip
there's capx, export, and three screenshots that should give you an idea on what's going on.

win 7, up to date drivers on nvidia geforce 9600 gt.

hope that helps.
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Mon Jul 16, 2012 7:26 pm

Still can't reproduce. Looks fine here:
http://www.scirra.com/labs/textalign/
Are you sure you're not editing the CSS/HTML of the exported project which is misaligning it? With WebGL enabled there are two canvases overlayed on top of each other, so it's possible to position one canvas but not the other, causing text to become misaligned.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Mon Jul 16, 2012 7:39 pm

on my end text is 3 pixels above the baseline under your link. the export I gave you is straight from the c2, nothing edited. strange thing is, under chrome it's ok, the problem is under firefox only now.
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Mon Jul 16, 2012 10:03 pm

Firefox does show a little above the baseline, but it is the same in both preview and export. Are you sure you haven't got confused between the two?

This can't really be fixed because different browsers use different text renderers, so small differences like this will always exist. It's described more in the Text manual entry.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Tue Jul 17, 2012 10:06 am

true, got it mixed up, mainly because of testing in chrome and viewing in ff, sorry.

but isn't there a way to make a 3 pixel correction automatically if FF / if Chrome is rendering the canvas? I can do it with events (if browser name = "chrome" -> every Text object set Y to Y-3) why don't do it automatically in the export then?ranma2012-07-17 10:12:02
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Tue Jul 17, 2012 2:54 pm

Because text rendering depends completely on the system. It might look how you want on a Mac or on Linux, but not on a PC, so if you fudge the display co-ordinates it will break it on other platforms that otherwise looked OK. It's also the kind of thing that can change with OS updates, user settings, or browser updates. It is better to not rely on text being pixel perfect, or if you do need it, make the text an image in a sprite object.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest