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;
};