From d43c859cd46e7ea586f1959ba2c2b9cd4f7ae5b4 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Sun, 10 Jun 2007 14:54:45 +0000 Subject: [PATCH] * 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 --- src/TextMetrics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 405c6ca88a..d3d7bae61c 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -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: