From aff98b305ce7e33e5a5de2a666a8d0a1ff50e3d1 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sat, 9 Dec 2006 07:07:00 +0000 Subject: [PATCH] Fix returned width for small caps (these values are not cached, though) * src/frontends/qt4/GuiFontMetrics.C (GuiFontMetrics::width): return correct width for small caps. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16214 a592a061-630c-0410-9148-cb99ea01b6c8 --- Status.15x | 6 ++++-- src/frontends/qt4/GuiFontMetrics.C | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Status.15x b/Status.15x index 5a43837dd9..c84ff2b384 100644 --- a/Status.15x +++ b/Status.15x @@ -191,8 +191,6 @@ LAYOUT PAINTING & PERFORMANCE -* Open de_Intro.lyx => The footnote text in the title section exceeds the footnote frame - * Open de_UserGuide.lyx; go to the end of the document; click into the footnote (with the mouse - this is important for the test case); add a character into the note => the complete footnote is expanded but only the current line is repainted @@ -495,3 +493,7 @@ CREDITS: * It is ridiculous that you have to call configure with --with-frontend=qt4. The existance of config/qt.m4 does not make much sense either. The first one is FIXED, the second WONTFIX (JMarc 07-12-2006) + +* Open de_Intro.lyx => The footnote text in the title section exceeds the + footnote frame + FIXED (Enrico 2006-12-09). This was due to wrong metrics for small caps. diff --git a/src/frontends/qt4/GuiFontMetrics.C b/src/frontends/qt4/GuiFontMetrics.C index 744ccca803..b905356901 100644 --- a/src/frontends/qt4/GuiFontMetrics.C +++ b/src/frontends/qt4/GuiFontMetrics.C @@ -181,6 +181,9 @@ void GuiFontMetrics::fillMetricsCache(char_type c) const int GuiFontMetrics::width(char_type c) const { + if (smallcaps_shape_) + return smallcapsWidth(ucs4_to_qchar(c)); + if (!width_cache_.contains(c)) { width_cache_.insert(c, metrics_.width(ucs4_to_qchar(c))); } -- 2.39.5