* Changing the font does not change the fontmetrics variable,

hence we have to set it manually. 
  (bug #3787: Huge fonts do not set the row height)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18731 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2007-06-10 14:54:45 +00:00
parent 8865ede57d
commit d43c859cd4

View File

@ -663,9 +663,11 @@ void TextMetrics::setHeightOfRow(pit_type const pit,
Font::FONT_SIZE maxsize =
par.highestFontInRange(row.pos(), pos_end, size);
if (maxsize > font.size()) {
// use standard paragraph font with the maximal size
font.setSize(maxsize);
maxasc = max(maxasc, fontmetrics.maxAscent());
maxdesc = max(maxdesc, fontmetrics.maxDescent());
FontMetrics const & maxfontmetrics = theFontMetrics(font);
maxasc = max(maxasc, maxfontmetrics.maxAscent());
maxdesc = max(maxdesc, maxfontmetrics.maxDescent());
}
// This is nicer with box insets: