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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.