File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ graphicEntityModule.createText("Hello World")
1414 .setFontSize(50 )
1515 .setFillColor(0x000000 ); // Setting the text color to black
1616```
17+ ![ Example] ( resources/text-1.png )
18+
1719The only font family values that will work are:
1820"Lato" and those that are available by default on all browsers.
1921If the browser does not recognise the font family, it will be displayed in a fallback font chosen by the browser.
@@ -25,11 +27,12 @@ This class is used to display text using a bitmap font in your assets folder.
2527``` java
2628graphicEntityModule. createBitmapText()
2729 .setText(" Hello World" )
28- .setFontFamily (" myCustomFont" )
30+ .setFont (" myCustomFont" )
2931 // Assuming that you have a working 'myCustomFont.fnt' and 'myCustomFont.png' in your assets folder
3032 .setFontSize(50 )
3133 .setTint(0xff0000 ); // Tinting it in red
3234```
35+ ![ Example] ( resources/text-2.png )
3336
3437Extra tips :
3538- A little help to turn fonts into bitmap fonts : http://kvazars.com/littera/
You can’t perform that action at this time.
0 commit comments