Text Aligment Bug on Linux

Hi !

We are doing some tests with Phaser 3 with a friend and we ran into some sort of bug with text display.

The first screenshot is on my computer using Firefox 86.0.1 on Windows 10
The second one is on my firend computer also using Firefox 86.0.1 but on Linux Manjaro.

There is nothing tricky in the code. Here it is :

this.description = scene.add.text(x, y - 300, description)
.setOrigin(0.5, 0.5)
.setFontSize(23)
.setVisible(true)
.setDepth(1)

this.apCost = scene.add.text(x + 175, y - 538, apCost.toString())
.setOrigin(0.5, 0.5)
.setFontSize(23)
.setVisible(true)
.setDepth(1)

this.mpCost = scene.add.text(x + 175, y - 438, mpCost.toString())
.setOrigin(0.5, 0.5)
.setFontSize(23)
.setVisible(true)
.setDepth(1)

Does anyone have a clue about why the text is not displaying well on my friend computer ?

Thank you !

Do you have an url to share? i am working on linux as well - maybe create a jsfiddle?

Yes, you can access it here : https://coli.prushka.fr/

We also tested it on numerous navigators.

It also works on :
Edge on Windows
Firefox and Chrome on Android
Safari and Chrome on MacOS
Safari on IOS

It does not work on :
Tro Browser on every plateform
Brave on Android

looks good on ubuntu-20 firefox 86

grafik

Thanks~

It’s really weird. It appears that all texts are downshifted on my friend computer :l

yepp that’s weird - here’s somethings that you could check if you haven’t already:

anything of interest in the console output? what about chrome on linux? is the problem present there as well? did you try in private mode to avoid bogus issues from the cache?

good luck

1 Like

Works fine for me with Chrome on Linux.

This is a shot in the dark, but it might be worth investigating. I’ve seen browsers, often Brave, but maybe also Firefox (with privacy.resistFingerprinting enabled?) that intentionally break font rendering due to privacy concerns. If this guess is correct, I don’t think there’s anything you can do about it short of changing the browser settings.

You could try passing text metrics.

I’m getting the same issue on Pop!_OS and Firefox 86.0.1

It was fine on Firefox 86.0.0 and works fine on Chromium.
I can only assume it’s a new Firefox bug in the last patch release.

In case anyone having this issue on Brave (Mac, not linux though), I have posted an issue at the Brave browser Github repo.

I confirm that the workaround @samme suggested appears to resolve the issue on Brave.