Jump to content

Some wordwrapped text renders incorrectly in firefox


Aguacero
 Share

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

Link to comment
Share on other sites

  • Aguacero changed the title to Some wordwrapped text renders incorrectly in firefox
  • 3 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...