From 50310529956d6b2cfed7abd13cb1f458b8494a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=A9la=20Palkovics?= Date: Sat, 13 Sep 2014 19:47:33 +0200 Subject: [PATCH] textBaseline experiment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luca Béla Palkovics --- canvas2svg.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/canvas2svg.js b/canvas2svg.js index 382fa90..3b3c2fb 100644 --- a/canvas2svg.js +++ b/canvas2svg.js @@ -747,7 +747,8 @@ "text-decoration" : font.decoration, "x" : x, "y" : y, - "text-anchor": this.textAlign.replace("left", "start").replace("right", "end").replace("center", "middle") + "text-anchor": this.textAlign.replace("left", "start").replace("right", "end").replace("center", "middle"), + "dominant-baseline": this.textBaseline.replace("top", "text-after-edge").replace("top", "text-before-edge") //not 100% right + wont work in IE }, true); textElement.appendChild(document.createTextNode(text));