Font size?

I am wanting to change the size of font I am using. I can not work out a way that this is done. I have tried fontSize that I seen in the documentation here Phaser 3 API Documentation - Namespace: Text

This does not change my text though. My code is

this.add.text (config.width / 2, config.height / 2 , 'score : 0', { fontFamily: 'CustomFont', fill: '#00ff00'});

Is it able to change the size of font in this code?

{ fontSize: 12 } or { font: '12px CustomFont' }.

2 Likes

Thank you my friend

1 Like