toggthedog

Font trouble in Cocoon Canvas+

Recommended Posts

I'm trying to build a native app with cocoon and canvas+ and have some trouble with the fonts. Everything works fine when running the game in a normal browser or in cocoon webview+. But in canvas+ mode, all text renders really small and pixelated. The code for the text: 

this.scoreText = this.game.add.text(pos.x, pos.y, "0", {
    font: "18px Arial",
    fontWeight: 'bold',
    fill: "#FFFFFF"
});
this.scoreText.anchor.setTo(0.5, 0);

I don't reference a .ttf or anything. Do I explicitly need to include an Arial font for it to work in canvas+ mode?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.