Aguacero

Some wordwrapped text renders incorrectly in firefox

Recommended Posts

I have encountered very strange firefox way of multi-line text rendering.
Some of the text appears like it has minimal line-height, while other text sprites render normally (see attachment)
And if user reloads page - everything start working just fine, but still works wrong if user restarts firefox and then loads page.

I can't see any significant difference between right and wrong rendered texts in the way I create text sprites.

Had anyone experienced something like this? Any ideas how to fix it?

Code for the badly rendered sprite: 

this.dialogPhrase = this.game.add.text(90, this.game.height - 110, dialog.text, {
font: '18px Russo One',
fill: '#222222',
wordWrap: true,
wordWrapWidth: 820
});

Code for the well rendered sprite:

const nextMenuItem = this.game.add.text(682, nextY, item.text, {
font: '16px Russo One',
fill: '#222222',
wordWrap: true,
wordWrapWidth: 280
});

2018-04-10_10h43_33.png

Share this post


Link to post
Share on other sites

I see same bug in Firefox 55

Кстати, тоже с кириллицей! )

Anybody knows what is problem?  Phaser 2.10.1

I try to work around with splitting into standalone lines

2018-07-24_163737.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.