Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text objects are offset on the Y axis (Linux; Firefox, Brave) #5710

Closed
theblacknight opened this issue May 21, 2021 · 3 comments
Closed

Text objects are offset on the Y axis (Linux; Firefox, Brave) #5710

theblacknight opened this issue May 21, 2021 · 3 comments

Comments

@theblacknight
Copy link

Version

  • Phaser Version: 3.54.0
  • Operating system: Linux, Fedora 32
  • Browser: Firefox, Brave

Description

Text objects are not being rendered in the correct position.

The link below shows this happening in the Phaser 3 examples page.

A text object is added to the scene added at Y = 100, but the text is rendered at closer to Y = 500.

I first had this issue several months ago on Firefox. I didn't want to get side tracked so I tried Brave, and everything worked as expected. However Brave is now displaying this behavior too.

I have tried on OSX with Firefox and Chrome and it works fine there, so looks like a linux/browser issue. Interested to know if anyone else can repro.

Any help would be greatly appreciated.

Example Test Code

This issue is impacting Phaser examples: https://www.phaser.io/examples/v3/view/components/data/store-scene-data

Additional Information

@theblacknight
Copy link
Author

A little more information on this.

It looks like the issue is in calculating some sort of padding above the text. The size of that padding also scales with the font size.

It also affects each line of multi-text.

When looking at the data, the bounds of the object are way too large.

Again, I've only confirmed in Brave and Firefox on Fedora (Linux) 32 & 33.

Anyway, I decided to use bitmapText objects as a work around. Less flexibility, but they're working fine and are enough for my needs.

Cheers,

  • Kev

@telinc1
Copy link

telinc1 commented May 22, 2021

It's caused by an extension. See #5625.

@theblacknight
Copy link
Author

Thanks! Looks like this is the issue. Will close this one.

(I'll stick with using bitmap fonts as I don't want to assume anything on the part of the user, and this will be game breaking for them.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants