Jump to content

how to update bitmapFont


Le Twitch
 Share

Recommended Posts

You can force an update with the following:

bitmapText.updateText();

Though it's often a lot easier to use white text and set a tint the entire bitmapText instance to change the colour.

 

I've already been doing that. I found out what the problem was. Is there a setFont for bitmapText or anything similar? That would pretty much fix my issue

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...

Ok, so I dug a bit deeper in the Pixi code and found a quick workaround where you don't set the font but the fontName attribute:

myBitmapText.fontName = "myNewFontKey"; // where "myNewFontKey" refers to a font previously loaded into the cache

You won't find fontName in either documentation since it's only being used as a private field. Essentially, Phaser would also need to set the fontName attribute in the font attributes setter and the problem should be fixed.

 

Update: Filed this issue on GitHub: https://github.com/photonstorm/phaser/issues/1602

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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