This page is work-in-progress. You can reach me on twitter or mail to rezoner1337@gmail.com

Playground - Fonts

this.loadFont("myfont");

Default format is .ttf but it can be overriden

this.loadFont("myfont.woff");

There is no multiple formats support yet

playground({

  create: function() {

    this.loadFont("silkscreen");

  },

  render: function() {

    this.layer.clear("#000");

    this.layer.fillStyle("#0af");

    for(var i = 1; i < 6; i++) {

      var fontSize = 8 * i;

      this.layer.font(fontSize + "px silkscreen");
      this.layer.fillText("I am a pixel font", 32, i * (32 + i * 4));

    }

  },

  container: exampleContainer
});

How to draw fonts without antialiasing?

Despite many promiscuous experimental features - disabling font antialising is still not possible.

Nevertheless if you really want to get that crispy pixel-perfect sensation - here are some of my thoughts that may help:

General headaches with external fonts

Ask question:

Fork me on GitHub