Jump to content

Font Styles such as fontSize


oakler
 Share

Recommended Posts

Hi,

 

Changes to the fontSize style don't seem to work:

scoreText = game.add.text(16, 16, 'Score: 0', { fontSize: '22px', fill: '#fff' });

The fill-color changes work fine, and I've tried drastically different fontSizes to make sure.

 

I've also tried different browsers: Chrome and Safari for OS X.

 

Anyone else have this issue?

 

Also, I've read through the docs and can't find what styles are (or aren't) supported.

 

Thank you

Link to comment
Share on other sites

The Phaser.Text object doesn't directly use the style, it gets passed on to the PIXI.Text constructor.

So, look here and you will see all you need to know:

http://www.goodboydigital.com/pixijs/docs/classes/Text.html

 

The text styles dont have fontSize as a supported property, it is passed in as part of the font property, like "22px Arial".

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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