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

bitmapText not working on Canvas #5501

Closed
DPMakerQB opened this issue Jan 14, 2021 · 2 comments
Closed

bitmapText not working on Canvas #5501

DPMakerQB opened this issue Jan 14, 2021 · 2 comments

Comments

@DPMakerQB
Copy link

Version

  • Phaser Version: 3.51.0
  • Operating system: Windows
  • Browser: Chrome

Description

bitmapText stopped working after upgrading from 3.24.1 to 3.51 on CANVAS only.
The issue is as simple as it sounds. I have a bitmap font that I've been using for a year now, I upgrade to 3.50+ and it stops working. There are no errors, the font just doesn't appear on the screen unless I switch over to WebGL instead of Canvas.

I've attached a repository below that loads the font and displays some text.

Example Test Code

https://github.com/DPMakerQB/phaser-problem-bitmapText

function preload() {
    this.load.bitmapFont('lato', 'assets/lato_0.png', 'assets/lato.xml');
}

function create() {
    this.add.bitmapText(0, 0, 'lato', 'Testing').setOrigin(0);
}

Additional Information

@photonstorm
Copy link
Collaborator

Hmm, this is font specific, as it's rendering all of the fonts in the examples site in Canvas just fine. Will download your font and have a look at it, something in the XML is freaking it out.

photonstorm added a commit that referenced this issue Jan 14, 2021
… in which the texture offset was calculated. It now uses the `__BASE` frame to get the texture offset, rather than the first frame in the set. Fix #5462 #5501
@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

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

No branches or pull requests

3 participants