Make sure that <mo> with minsize or maxsize set are stretched.

This commit is contained in:
Davide P. Cervone 2014-04-25 17:31:11 -04:00
parent 7f509db1b5
commit 462be1eaeb
2 changed files with 6 additions and 3 deletions

View File

@ -1687,7 +1687,7 @@
var h = span.bbox.h, d = span.bbox.d, stretched = false;
for (i = 0, m = stretchy.length; i < m; i++) {
var bbox = stretchy[i].HTMLspanElement().bbox;
if (bbox.h !== h || bbox.d !== d)
if (stretchy[i].forceStretch || bbox.h !== h || bbox.d !== d)
{stretchy[i].HTMLstretchV(span,h,d); stretched = true}
}
if (stretched) {this.HTMLcomputeBBox(span,true)}
@ -2204,7 +2204,9 @@
else if (under && this === under.CoreMO() && parent.Get("accentunder")) {c = HTMLCSS.FONTDATA.REMAPACCENTUNDER[c]||c}
}
c = HTMLCSS.FONTDATA.DELIMITERS[c.charCodeAt(0)];
return (c && c.dir == direction.substr(0,1));
var stretch = (c && c.dir === direction.substr(0,1));
this.forceStretch = (stretch && (this.Get("minsize",true) || this.Get("maxsize",true)));
return stretch;
},
HTMLstretchV: function (box,h,d) {
this.HTMLremoveColor();

View File

@ -904,7 +904,7 @@
{
var svg = this.svg[i], mml = svg.mml;
if (mml) {
if (mml.SVGdata.h !== this.sh || mml.SVGdata.d !== this.sd) {
if (mml.forceStretch || mml.SVGdata.h !== this.sh || mml.SVGdata.d !== this.sd) {
svg = mml.SVGstretchV(this.sh,this.sd);
}
mml.SVGdata.HW = this.sh; mml.SVGdata.D = this.sd;
@ -1466,6 +1466,7 @@
c = SVG.FONTDATA.DELIMITERS[c.charCodeAt(0)];
var can = (c && c.dir == direction.substr(0,1));
if (!can) {delete this.svg}
this.forceStretch = can && (this.Get("minsize",true) || this.Get("maxsize",true));
return can;
},
SVGstretchV: function (h,d) {