code: function drawText(text, dx, dy, ctx) {
    var dx0 = dx;
    for (var i = 0; i < text.length; i++) {
      var n = text.charCodeAt(i);
      var sx = (n&63)*8;
      var sy = (n>>6)*10 + 56;
      var width = _fontwidths[n];
      ctx.drawImage(fontimg, sx, sy, width, 10, dx, dy, width, 10);
      dx += width + 1;
    }
    return dx - dx0;
  }
docs: draw FT2 proportional font text to a drawing context returns width rendered