diff --git a/canvas2svg.js b/canvas2svg.js index 898a3f8..382fa90 100644 --- a/canvas2svg.js +++ b/canvas2svg.js @@ -746,7 +746,8 @@ "font-weight" : font.weight, "text-decoration" : font.decoration, "x" : x, - "y" : y + "y" : y, + "text-anchor": this.textAlign.replace("left", "start").replace("right", "end").replace("center", "middle") }, true); textElement.appendChild(document.createTextNode(text));