Jump to content

multiple font-family in text


Recommended Posts


I have that kind of code :

this.add.text(0, 0, 'text', { font: '36px Arial', fill: '#FFFFFF' });

I would like to know how to have fonts fallbacks like in css:

font-family: Arial, Helvetica, sans-serif;

It seems to be possible with the font property :


font : string

Change the font family that the text will be rendered in, such as 'Arial'.

Multiple CSS font families and generic fallbacks can be specified as long as CSS font-family rules are followed.

But I haven't seen an example of multiple CSS font families.

If anyone know how to do, could you show me an example of code ?

Link to comment
Share on other sites


  • Recently Browsing   0 members

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