www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit fdc34e3d8847cceddaf0c9d157b6f515c379cb94
parent aa8d543a4544a7aa43dd9da9dc304d21fea1d31f
Author: Frédéric Wang <fred.wang@free.fr>
Date:   Fri, 18 Oct 2013 11:32:28 +0200

SVG output: Consider dir=rtl for <mtext> elements that are rendered with an SVG <text> element. #474, #/610, #627

Diffstat:
Munpacked/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 @@ -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();