text appears 3 pixels higher

  • 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

  • Please see how to report bugs. Can you post a .capx demonstrating the issue? Is the issue consistent across all browsers?

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

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

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

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

  • Try Construct 3

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

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

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

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

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

  • i guess you're right :(

    ok, can be closed and sorry for the mixup.

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