+ // Set a minimal ascent/descent for the cell
+ if (tight)
+ // FIXME: this is the minimal ascent seen empirically, check
+ // what the TeXbook says.
+ dim.asc = max(dim.asc, fm.xHeight());
+ else {
+ dim.asc = max(dim.asc, fm.maxAscent());
+ dim.des = max(dim.des, fm.maxDescent());
+ }
+
+ // This is one of the the few points where the drawing font is known,
+ // so that we can set the caret vertical dimensions.
+ mrow.caret_ascent = min(dim.asc, fm.maxAscent());
+ mrow.caret_descent = min(dim.des, fm.maxDescent());
+ /// do the same for math cells linearized in the row
+ MathRow caret_row = MathRow(mrow.caret_ascent, mrow.caret_descent);
+ for (auto const & e : mrow)
+ if (e.type == MathRow::BEGIN && e.ar)
+ bv->setMathRow(e.ar, caret_row);
+
+ // Cache row and dimension.
+ bv->setMathRow(this, mrow);
+ bv->coordCache().arrays().add(this, dim);