From a8c4376ae3723dcd94ac59f0c904a1b597586078 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Sun, 10 Jun 2007 15:34:00 +0000 Subject: [PATCH] * Font are lightweight, so better do not change the other font, but a copy git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18733 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/TextMetrics.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index d3d7bae61c..8467e45a18 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -664,8 +664,9 @@ void TextMetrics::setHeightOfRow(pit_type const pit, par.highestFontInRange(row.pos(), pos_end, size); if (maxsize > font.size()) { // use standard paragraph font with the maximal size - font.setSize(maxsize); - FontMetrics const & maxfontmetrics = theFontMetrics(font); + Font maxfont = font; + maxfont.setSize(maxsize); + FontMetrics const & maxfontmetrics = theFontMetrics(maxfont); maxasc = max(maxasc, maxfontmetrics.maxAscent()); maxdesc = max(maxdesc, maxfontmetrics.maxDescent()); } -- 2.39.2