Firefox text positioning problem

Get help using Construct 2

Post » Thu Sep 03, 2015 7:29 am

Hey,

I've been developing a game, and it's only been tested using Chrome in preview. I've looked at it in Firefox, and I noticed that the Text objects, and only the Text objects appear a bit higher up, as if their Y coordinates were changed, but I checked in the debugger and that wasn't the case. I've tried playing with the Anchor options, but nothing made them look the same.

I use the latest version of both browsers, and of C2 as well. I'm talking about desktop browsers.

Any ideas?

Thanks
B
10
S
3
Posts: 28
Reputation: 756

Post » Thu Sep 03, 2015 7:47 am

I am sure text obejct might not be rendered pixel perfectly on different browsers. Can't you use spritefonts?
B
10
S
2
G
1
Posts: 51
Reputation: 761

Post » Thu Sep 03, 2015 7:53 am

Thanks for the reply Borgi.

I've heard that too, but I don't think it would be this severe.

Interesting thing is that I used a Google web font, and after disabling it and using default Arial they are now positioned correctly, aside from the minor rendering differences you mentioned. But I don't really want to use Arial.

Spritefonts aren't really an option for my game though.
B
10
S
3
Posts: 28
Reputation: 756

Post » Thu Sep 03, 2015 8:20 am

IN CASE NOTHING ELSE WORKS:
Or an awful solution could be if you use the "name" property of the browser object and -> if firefox -> reposition texts.

It even hurt writing this all down :D
B
10
S
2
G
1
Posts: 51
Reputation: 761

Post » Thu Sep 03, 2015 10:27 am

Borgi wrote:IN CASE NOTHING ELSE WORKS:
Or an awful solution could be if you use the "name" property of the browser object and -> if firefox -> reposition texts.

It even hurt writing this all down :D


Haha, that would be madness.

Uninstalled both browsers using Revo uninstaller, reinstalled them, still nothing. Tried Rex's Tag Text plugin, same issue. With that, I have yet another problem: it only positions correctly horizontally if I use left alignment, or if I use Firefox, where it works fine. There's something funny going on on my computer...
B
10
S
3
Posts: 28
Reputation: 756

Post » Fri Sep 04, 2015 1:06 pm

So, I as I said, SpriteFont is not an option.

What about using TextBox and styling it using "Set CSS Style" action to make it look like simple Text? Because TextBox positions correctly.

Is there any reason (performance, compatibility, something like that, not because it's a funny workaround) not to do it?
B
10
S
3
Posts: 28
Reputation: 756


Return to How do I....?

Who is online

Users browsing this forum: datiel12, tarek2 and 10 guests