case Inset::AlignCenter:
align = LYX_ALIGN_CENTER;
break;
- // other types unchanged (use align)
- }
+ case Inset::Inline:
+ case Inset::AlignRight:
+ // unchanged (use align)
+ break;
+ }
}
switch (align) {
Font::FONT_SIZE maxsize =
par.highestFontInRange(row.pos(), pos_end, size);
if (maxsize > font.size()) {
- font.setSize(maxsize);
- maxasc = max(maxasc, fontmetrics.maxAscent());
- maxdesc = max(maxdesc, fontmetrics.maxDescent());
+ // use standard paragraph font with the maximal size
+ Font maxfont = font;
+ maxfont.setSize(maxsize);
+ FontMetrics const & maxfontmetrics = theFontMetrics(maxfont);
+ maxasc = max(maxasc, maxfontmetrics.maxAscent());
+ maxdesc = max(maxdesc, maxfontmetrics.maxDescent());
}
// This is nicer with box insets: