Set maxFontSize on rules. (#744)

This is needed in vlists, as in #646, to make fontsize-ensurer
nodes big enough.
This commit is contained in:
Eddie Kohler
2017-07-08 20:22:29 -04:00
committed by Kevin Barabash
parent f43b00b50f
commit 782484eb75
6 changed files with 5 additions and 0 deletions

View File

@@ -1330,6 +1330,10 @@ groupTypes.rule = function(group, options) {
rule.width = width;
rule.height = height + shift;
rule.depth = -shift;
// Font size is the number large enough that the browser will
// reserve at least `absHeight` space above the baseline.
// The 1.125 factor was empirically determined
rule.maxFontSize = height * 1.125 * options.sizeMultiplier;
return rule;
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -102,6 +102,7 @@ Kern:
tex: \frac{a\kern{1em}b}{c}a\kern{1em}b\kern{1ex}c\kern{-0.25em}d
nolatex: LaTeX fails to typeset this, “Missing number, treated as zero.”
Lap: ab\llap{f}cd\rlap{g}h
LargeRuleNumerator: \frac{\textcolor{blue}{\rule{1em}{2em}}}{x}
LeftRight: \left( x^2 \right) \left\{ x^{x^{x^{x^x}}} \right.
LeftRightListStyling: a+\left(x+y\right)-x
LeftRightMiddle: \left( x^2 \middle/ \right) \left\{ x^{x^{x^{x^x}}} \middle/ y \right.\left(x\middle|y\,\middle|\,z\right)