Jump to content

Defining Text();


B3nac
 Share

Recommended Posts

Using Phaser 2.2 "Maybe the example is outdated."

 


 

I've noticed that if you define Text this way and try to increase or decrease the font size it doesn't work.



scoreText = game.add.text(16, 16, 'score: 0', { fontSize: '40px', fill: '#000' });


 

If you define scoreText this way though:



scoreText = game.add.text(16, 16, 'score: 0', { font: '40px Arial', fill: '#000' });


 

You can increase and decrease the text size.

 

If I use fontSize it stays at 32px unmodifiable. With font you can modify it with a font type included. With fontSize and defined font it doesn't work either.

 

Isn't Windows default font set to Arial anyway though? I figured you wouldn't have to define the type of text you would be able to increase the default system font. 

 

If this is just an outdated example and not just on my pc, I can update the example myself. Or maybe this is a bug?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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