Properly scale elements with font-family specified. Resolves issue #1594.
This commit is contained in:
parent
4a9bee1f2f
commit
fc47ec0171
|
@ -34,8 +34,8 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
|
||||||
if (!stretch) {
|
if (!stretch) {
|
||||||
node = this.CHTMLcreateNode(node);
|
node = this.CHTMLcreateNode(node);
|
||||||
this.CHTMLhandleStyle(node);
|
this.CHTMLhandleStyle(node);
|
||||||
this.CHTMLhandleScale(node);
|
|
||||||
this.CHTMLgetVariant();
|
this.CHTMLgetVariant();
|
||||||
|
this.CHTMLhandleScale(node);
|
||||||
}
|
}
|
||||||
CHTML.BBOX.empty(this.CHTML);
|
CHTML.BBOX.empty(this.CHTML);
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,8 @@ MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
|
||||||
//
|
//
|
||||||
node = this.CHTMLcreateNode(node);
|
node = this.CHTMLcreateNode(node);
|
||||||
this.CHTMLhandleStyle(node);
|
this.CHTMLhandleStyle(node);
|
||||||
this.CHTMLhandleScale(node);
|
|
||||||
this.CHTMLgetVariant();
|
this.CHTMLgetVariant();
|
||||||
|
this.CHTMLhandleScale(node);
|
||||||
CHTML.BBOX.empty(this.CHTML);
|
CHTML.BBOX.empty(this.CHTML);
|
||||||
//
|
//
|
||||||
// Get the quotes to use
|
// Get the quotes to use
|
||||||
|
|
|
@ -1386,8 +1386,8 @@
|
||||||
if (!options) options = {};
|
if (!options) options = {};
|
||||||
node = this.CHTMLcreateNode(node); this.CHTML = CHTML.BBOX.empty();
|
node = this.CHTMLcreateNode(node); this.CHTML = CHTML.BBOX.empty();
|
||||||
this.CHTMLhandleStyle(node);
|
this.CHTMLhandleStyle(node);
|
||||||
this.CHTMLhandleScale(node);
|
|
||||||
if (this.isToken) this.CHTMLgetVariant();
|
if (this.isToken) this.CHTMLgetVariant();
|
||||||
|
this.CHTMLhandleScale(node);
|
||||||
var m = Math.max((options.minChildren||0),this.data.length);
|
var m = Math.max((options.minChildren||0),this.data.length);
|
||||||
for (var i = 0; i < m; i++) this.CHTMLaddChild(node,i,options);
|
for (var i = 0; i < m; i++) this.CHTMLaddChild(node,i,options);
|
||||||
if (!options.noBBox) this.CHTML.clean();
|
if (!options.noBBox) this.CHTML.clean();
|
||||||
|
@ -1543,6 +1543,8 @@
|
||||||
values.fontsize = this.removedStyles.fontSize;
|
values.fontsize = this.removedStyles.fontSize;
|
||||||
if (values.fontsize && !this.mathsize) values.mathsize = values.fontsize;
|
if (values.fontsize && !this.mathsize) values.mathsize = values.fontsize;
|
||||||
if (values.mathsize !== 1) scale *= CHTML.length2em(values.mathsize,1,1);
|
if (values.mathsize !== 1) scale *= CHTML.length2em(values.mathsize,1,1);
|
||||||
|
var variant = this.CHTMLvariant;
|
||||||
|
if (variant && variant.style && variant.style["font-family"]) scale /= CHTML.scale;
|
||||||
this.CHTML.scale = scale; pscale = this.CHTML.rscale = scale/pscale;
|
this.CHTML.scale = scale; pscale = this.CHTML.rscale = scale/pscale;
|
||||||
if (Math.abs(pscale-1) < .001) pscale = 1;
|
if (Math.abs(pscale-1) < .001) pscale = 1;
|
||||||
if (node && pscale !== 1) node.style.fontSize = CHTML.Percent(pscale);
|
if (node && pscale !== 1) node.style.fontSize = CHTML.Percent(pscale);
|
||||||
|
@ -1817,8 +1819,8 @@
|
||||||
toCommonHTML: function (node) {
|
toCommonHTML: function (node) {
|
||||||
node = this.CHTMLcreateNode(node);
|
node = this.CHTMLcreateNode(node);
|
||||||
this.CHTMLhandleStyle(node);
|
this.CHTMLhandleStyle(node);
|
||||||
this.CHTMLhandleScale(node);
|
|
||||||
this.CHTMLgetVariant();
|
this.CHTMLgetVariant();
|
||||||
|
this.CHTMLhandleScale(node);
|
||||||
CHTML.BBOX.empty(this.CHTML);
|
CHTML.BBOX.empty(this.CHTML);
|
||||||
|
|
||||||
var values = this.getValues("displaystyle","largeop");
|
var values = this.getValues("displaystyle","largeop");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user