www

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

commit 58c20a9a4cf75c47886ade95aa713c3c64bec387
parent ca3d539ca29c827a2a024eb99f315d013fe69cbe
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Thu, 21 Aug 2014 16:27:15 -0400

Merge branch 'issue826' into develop.  Issue #826.

Diffstat:
Munpacked/jax/output/HTML-CSS/jax.js | 3++-
Munpacked/jax/output/SVG/jax.js | 6+++---
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js @@ -1485,7 +1485,8 @@ handleFont: function (span,font,force) { span.style.fontFamily = font.family; - if (!font.directory) {span.style.fontSize = Math.floor(100/HTMLCSS.scale+.5) + "%"} + if (!font.directory) + {span.style.fontSize = Math.floor(HTMLCSS.config.scale/HTMLCSS.scale+.5) + "%"} if (!(HTMLCSS.FontFaceBug && font.isWebFont)) { var style = font.style || "normal", weight = font.weight || "normal"; if (style !== "normal" || force) {span.style.fontStyle = style} diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js @@ -618,7 +618,7 @@ c = String.fromCharCode((N>>10)+0xD800) + String.fromCharCode((N&0x3FF)+0xDC00); } - var box = BBOX.TEXT(scale,c,{ + var box = BBOX.TEXT(scale*100/SVG.config.scale,c,{ "font-family":variant.defaultFamily||SVG.config.undefinedFamily, "font-style":(variant.italic?"italic":""), "font-weight":(variant.bold?"bold":"") @@ -1012,7 +1012,7 @@ var bbox = this.element.getBBox(); SVG.textSVG.removeChild(this.element); scale *= 1000/SVG.em; - this.element.setAttribute("transform","scale("+scale+") matrix(1 0 0 -1 0 0)"); + this.element.setAttribute("transform","scale("+SVG.Fixed(scale)+") matrix(1 0 0 -1 0 0)"); this.w = this.r = bbox.width*scale; this.l = 0; this.h = this.H = -bbox.y*scale; this.d = this.D = (bbox.height + bbox.y)*scale; @@ -1543,7 +1543,7 @@ this.SVGgetStyles(); var svg = this.SVG(), scale = SVG.length2em(this.styles.fontSize||1)/1000; this.SVGhandleSpace(svg); - var def = (scale !== 1 ? {transform:"scale("+scale+")"} : {}); + var def = (scale !== 1 ? {transform:"scale("+SVG.Fixed(scale)+")"} : {}); var bbox = BBOX(def); bbox.Add(this.SVGchildSVG(0)); bbox.Clean(); if (scale !== 1) {