ashes999 Posted October 8, 2014 Report Share Posted October 8, 2014 Following the usual nine-part Phaser tutorial on making a platformer, I see code like:scoreText = game.add.text(16, 16, 'score: 0', { fontSize: '32px', fill: '#000' });Changing the fontSize property doesn't do anything. I tried multiple values (8px, 72px, etc.) as well as different types ('72px', '72pt', '72', 72, etc.) -- all to no avail. Am I doing something wrong? Quote Link to comment Share on other sites More sharing options...
space_elevators Posted October 9, 2014 Report Share Posted October 9, 2014 I bookmarked the Phaser docs on text styles and refer to them frequently - take a look here: http://docs.phaser.io/Phaser.Text.html#setStyle What you're looking for is the font property - so your code should look like:scoreText = game.add.text(16, 16, 'score: 0', { font: '32pt Arial', fill: '#000' });(assuming you want to use Arial ) Quote Link to comment Share on other sites More sharing options...
ashes999 Posted October 9, 2014 Author Report Share Posted October 9, 2014 You are awesome. Thanks very much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.