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
This commit is contained in:
Enrico Forestieri 2006-12-09 07:07:00 +00:00
parent 21c5579134
commit aff98b305c
2 changed files with 7 additions and 2 deletions

View 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.

View 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)));
}