www

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

commit 5e14383a591be420a98ab22b1666f7cadf7cf480
parent 4a4d88c26f47e0e682fb6e0e1cfbc13986748956
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Wed,  3 Sep 2014 14:47:57 -0400

For glyphs with empty paths (e.g., space characters), just move the x position by the width of the character.  Resolves mathjax/MathJax-node#3.

Diffstat:
Munpacked/jax/output/SVG/jax.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js @@ -605,7 +605,7 @@ } font = this.lookupChar(variant,n); c = font[n]; if (c) { - if (c[5] && c[5].space) {svg.w += c[2]} else { + if ((c[5] && c[5].space) || (c[5] === "" && c[0]+c[1] === 0)) {svg.w += c[2]} else { c = [scale,font.id+"-"+n.toString(16).toUpperCase()].concat(c); svg.Add(BBOX.GLYPH.apply(BBOX,c),svg.w,0); } @@ -1038,7 +1038,7 @@ if (!cache || !GLYPH.glyphs[id]) { def = {"stroke-width":t}; if (cache) {def.id = id} else if (transform) {def.transform = transform} - if (p !== "") {def.d = "M"+p+"Z"} + def.d = (p ? "M"+p+"Z" : ""); this.SUPER(arguments).Init.call(this,def); if (cache) {GLYPH.defs.appendChild(this.element); GLYPH.glyphs[id] = true;} }