Firefox text positioning problem

0 favourites
  • 10 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • 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

  • I am sure text obejct might not be rendered pixel perfectly on different browsers. Can't you use spritefonts?

  • 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.

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

    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...

  • 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?

  • 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!

  • for anyone still struggling, this has the answer:

    blackhornet you're the man!

  • Unfortunately, this problem exists in all browsers, not just Firefox.

    For me the only solution was to use spritefonts.

  • A response from Ashley on browser text rendering: https://www.scirra.com/forum/span-class-posthilit-text-span-appears-differently-in-editor-versus_p1092721?#p1092721 might clarify slightly.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)