From fdc34e3d8847cceddaf0c9d157b6f515c379cb94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Fri, 18 Oct 2013 11:32:28 +0200 Subject: [PATCH] SVG output: Consider dir=rtl for elements that are rendered with an SVG element. #474, #/610, #627 --- unpacked/jax/output/SVG/jax.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index 4c39a7bef..ff5d47efc 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -51,7 +51,6 @@ "word-wrap": "normal", "white-space": "nowrap", "float": "none", - "direction": "ltr", border: 0, padding: 0, margin: 0 }, @@ -1465,7 +1464,7 @@ if (this.Parent().type === "merror") { // *** FIXME: Make color, style, scale configurable svg = this.SVG(); this.SVGhandleSpace(svg); - text = BBOX.G(); text.Add(BBOX.TEXT(.9*scale,this.data.join(""),{fill:"#C00"})); + text = BBOX.G(); text.Add(BBOX.TEXT(.9*scale,this.data.join(""),{fill:"#C00",direction:this.Get("dir")})); svg.Add(BBOX.RECT(text.h+100,text.d+100,text.w+200,{fill:"#FF8",stroke:"#C00","stroke-width":50}),0,0); svg.Add(text,150,0); svg.H += 150; svg.D += 50; svg.Clean(); @@ -1473,7 +1472,7 @@ return svg; } else if (SVG.config.mtextFontInherit) { svg = this.SVG(); this.SVGhandleSpace(svg); - var variant = this.SVGgetVariant(), def = {}; + var variant = this.SVGgetVariant(), def = {direction:this.Get("dir")}; if (variant.bold) {def["font-weight"] = "bold"} if (variant.italic) {def["font-style"] = "italic"} svg.Add(BBOX.TEXT(scale,this.data.join(""),def)); svg.Clean();