HTML5 canvas ctx.fillText won't do line breaks?
I can't seem to be able to add text to a canvas if the text includes "\n". I mean, the line breaks do not show/work. ctxPaint.fillText("s ome \n \\n <br/> thing", x, y); The above code will draw "s ome \n <br/> thing" , on one line. Is this a limitation of fillText or am I doing it wrong? the "\n"s are there, and aren't printed, but they don't work either. Simon Sarris I'm afraid it is a limitation of Canvas' fillText . There is no multi-line support. Whats worse, there's no built-in way to measure line height, only width, making doing it yourself even harder! A lot of people have written