]> git.lyx.org Git - features.git/commitdiff
Fix returned width for small caps (these values are not cached, though)
authorEnrico Forestieri <forenr@lyx.org>
Sat, 9 Dec 2006 07:07:00 +0000 (07:07 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 9 Dec 2006 07:07:00 +0000 (07:07 +0000)
* 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
src/frontends/qt4/GuiFontMetrics.C

index 5a43837dd93e7fe19b9c973d9c8ca84c002170fc..c84ff2b384e9bf24bcc74b59e9e4c12339f845b1 100644 (file)
@@ -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.
index 744ccca803a411443f4473b86572708962a1ad51..b90535690170ff640e129d2ea619ded6ee4153f2 100644 (file)
@@ -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)));
        }