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

wrappedText

Fill word-wrapped text

.wrappedText(text, x, y, maxWidth, lineHeight);
var layer = cq(800, 300).appendTo(document.body);

layer.clear("#000");
layer.font("32px Arial");
layer.textAlign("left");
layer.fillStyle("#fff").wrappedText("Wrapping text and splitting very long words like PSEUDOPSEUDOHYPOPARATHYROIDISM", 32, 32, 200)

lineHeight is fontHeight by default



Have any questions? Don't hesitate to ask:

Post issues on github, support my work on gratipay author rezoner