Jump to content

Font trouble in Cocoon Canvas+


toggthedog
 Share

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?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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