From: Stefan Schimanski Date: Sun, 10 Jun 2007 15:34:00 +0000 (+0000) Subject: * Font are lightweight, so better do not change the other font, but a copy X-Git-Tag: 1.6.10~9425 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a8c4376ae3723dcd94ac59f0c904a1b597586078;p=features.git * 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 --- 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()); }