Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Web font not shown correctly


allaboutgame
 Share

Recommended Posts

I added text into a sprite as child. My text could not show font correctly. Anybody could help me?

My code is as follows:

this.style = { font: "30px Arial", fill: "#000", boundsAlignH: "center", boundsAlignV: "top" };

...

this.textContent = this.add.text( -30, -60, "test content", this.style);

...

 

However, what I got on test webpage was not Arial font, but as shown in attached image. Why is that?

wrong font.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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