multi-line text not spacing correctly

Bugs will be moved here once resolved.

Post » Mon Jun 30, 2014 10:01 pm

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 ... 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:
But once I run it in a browser, it looks like this: ... 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)
Posts: 38
Reputation: 683

Post » Mon Jul 07, 2014 2:24 pm

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.
Scirra Founder
Posts: 25,082
Reputation: 199,732

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests