0 Favourites

multi-line text not spacing correctly

  • Problem Description

    When I create a multi-line text object in Construct2, the space between the different lines is different in editor than in browser.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/326 ... ement.capx

    Description of Capx

    I've got three text objects here. The paragraph of black text, and two highlights, one blue and one green. I've placed the highlighted words so that they cover up corresponding words in the paragraph (or as closely as possible). The font size, family, and style are all the same, it's just the color that's different. And as you can see, it's pretty close. Here's a screenshot of what it looks like in the editor:

    https://dl.dropboxusercontent.com/u/32626868/Construct2/textPlacementIssue/constructCap.PNG

    But once I run it in a browser, it looks like this:

    https://dl.dropboxusercontent.com/u/326 ... serCap.PNG

    The blue highlight is okay, but the green one is no longer lined up. There's a grid behind the text, and when you compare the two screenshots, you can tell that the second line of black text is higher in browser than it is in editor, causing it to no longer line up correctly with the green text.

    Steps to Reproduce Bug

    • Create a new project and create a text object that spans multiple lines. Place a grid background if you wish.
    • Create another text object that has the exact same font size, style, and family, but a different color. Choose just a word or two from the bottom line of the original text object, and position it so that it exactly covers up those same words in the original.
    • Run in any browser.

    Observed Result

    The colored text will not line up with the original text.

    Expected Result

    They should line up in the browser since they do in the editor.

    Affected Browsers

    • Chrome: Yes
    • FireFox: Yes
    • Internet Explorer: Yes
    • Opera: Yes
    • Safari: Yes

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    Release 173 (64-bit)

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Closing as won't fix - there is nothing we can do, each browser has its own text rendering engine (which can also vary across OSs), and the C2 editor has its own different one as well. They all vary; even if the editor lined up with Chrome for example, it may still be misaligned on Firefox or IE. This is one of the browser-to-browser differences and is noted in the manual. Workaround: use sprite fonts which always render identically.

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