Text#font

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.

To change the entire font string use cssFont instead: eg. text.cssFont = 'bold 20pt Arial'.

Source code: gameobjects/Text.js (Line 1708)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.