Support \\n

This commit is contained in:
oc committed 2018-02-15 19:01:43 +08:00
1 parent b5d8cf5e3f
commit e56b92d78e
1 file changed
+4
+4
View File
@@ -3931,6 +3931,10 @@ core.prototype.splitLines = function(canvas, text, maxLength, font) {
contents.push(text.substring(last, i));
last=i+1;
}
else if (text.charAt(i)=='\\' && text.charAt(i+1)=='n') {
contents.push(text.substring(last, i));
last=i+2;
}
else {
var toAdd = text.substring(last, i+1);
var width = core.canvas[canvas].measureText(toAdd).width;