Text not lining up properly

Get help using Construct 2

Post » Mon Jun 30, 2014 7:12 pm

I'm having a peculiar issue. When I run my project in a browser, things aren't positioned the same way they were in my project. Specifically text. Here's an example of what it looks like in Construct2:
Image
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. But once I run it in a browser, I see this:
Image
One of the highlights seems to be okay, but the other one is completely off. It's as if the position changes once I start running it in browser.

This isn't a resizing issue because I've turned off fullscreen mode (meaning it stays the same size no matter how I resize the browser). Any idea why this is happening? Is this the intended behavior, or possibly a bug?

You can download the capx here if you'd like to take a closer look:
https://dl.dropboxusercontent.com/u/326 ... ement.capx
B
6
S
1
Posts: 38
Reputation: 683

Post » Mon Jun 30, 2014 7:16 pm

If I move the highlights a bit up and left they are perfectly positioned to quickly fix your problem.
I'm not sure what might cause it to not look the same as in the preview(editor).
B
6
S
1
Posts: 73
Reputation: 571

Post » Mon Jun 30, 2014 8:50 pm

That's true, but the problem is that it isn't the same between them. I end up having to nudge each one a bit at a time until they're all lining up, which is kind of a pain. Why aren't the positions the same in the browser as they are in the editor?
B
6
S
1
Posts: 38
Reputation: 683

Post » Mon Jun 30, 2014 9:53 pm

Ah, I realized what's going on, though not how to fix it. The multi-line paragraph isn't spaced the same in editor as it is in browser. I added a grid behind it so you can more easily tell. So the highlighted words are in the right place, but since the paragraph isn't spaced as much as it should be, they end up not being in the right locations to cover up the words.
B
6
S
1
Posts: 38
Reputation: 683

Post » Tue Jul 01, 2014 3:13 pm

I created a bug for this issue, because I highly doubt it's the intended behavior.
multi-line-text-not-spacing-correctly_t109278
B
6
S
1
Posts: 38
Reputation: 683

Post » Wed Jul 09, 2014 2:56 pm

@Ashley gave a reply to the bug I wrote to any who are interested. Long story short, it won't be fixed because it's a cross-browser issue. The solution is to use a sprite font, which will render the same across all browsers.
multi-line-text-not-spacing-correctly_p801380?#p801380
B
6
S
1
Posts: 38
Reputation: 683


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests