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

Post » Mon Oct 09, 2017 5:17 pm

wow, no one else ever had this problem?

the Text vertical alignment has a really noticeable difference, i am shocked why there isn't enough posts or solutions for it yet!
B
37
S
6
G
1
Posts: 64
Reputation: 2,642

Post » Mon Oct 09, 2017 5:28 pm

for anyone still struggling, this has the answer: detect-browser_t148438

@blackhornet you're the man!
B
37
S
6
G
1
Posts: 64
Reputation: 2,642

Post » Mon Oct 09, 2017 11:59 pm

Unfortunately, this problem exists in all browsers, not just Firefox.
For me the only solution was to use spritefonts.
Check out my awesome game Doptrix
B
17
S
9
G
50
Posts: 831
Reputation: 27,971

Post » Tue Oct 10, 2017 6:36 am

If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,488
Reputation: 59,762


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 18 guests