commit 6478163a397bf784b141cb397d42bf5ecce26c56 parent 0020f2a8220386b4636daaa638cabaf3e16a438e Author: Davide P. Cervone <dpvc@union.edu> Date: Tue, 17 Mar 2015 07:09:06 -0400 Make mn handle italic correction and skew like mn does. Diffstat:
| M | unpacked/jax/output/CommonHTML/jax.js | | | 17 | ++++++++++++++++- |
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js @@ -1356,7 +1356,22 @@ node = this.CHTMLdefaultNode(node); var bbox = this.CHTML, text = this.data.join(""); if (bbox.skew != null && text.length !== 1) delete bbox.skew; - if (bbox.r > bbox.w && text.length === 1 /*&& !variant.noIC*/) { // ### FIXME: handle variants + if (bbox.r > bbox.w && text.length === 1 && !this.CHTMLvariant.noIC) { + bbox.ic = bbox.r - bbox.w; bbox.w = bbox.r; + node.lastChild.style.paddingRight = CHTML.Em(bbox.ic); + } + return node; + } + }); + + /********************************************************/ + + MML.mn.Augment({ + toCommonHTML: function (node) { + node = this.CHTMLdefaultNode(node); + var bbox = this.CHTML, text = this.data.join(""); + if (bbox.skew != null && text.length !== 1) delete bbox.skew; + if (bbox.r > bbox.w && text.length === 1 && !this.CHTMLvariant.noIC) { bbox.ic = bbox.r - bbox.w; bbox.w = bbox.r; node.lastChild.style.paddingRight = CHTML.Em(bbox.ic); }