[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/generic

Khaled Hosny khaledhosny at eglug.org
Thu Jun 20 03:41:11 PDT 2013


 vcl/generic/glyphs/gcach_ftyp.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa1122a42dad9d89ab608bdc0e0c4b064e431797
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Thu Jun 20 01:27:21 2013 +0200

    Fix calculation of internal leading
    
    Stupid me, I totally messed this up! God only knows how many non-bugs
    people had to fix because of this typo.
    
    Has the side effect of fixing fdo#64972 (among many others of course,
    but this is the only one still open).
    
    Change-Id: I9d8fdb6d37d4af9b0ac973902e469e0bd3a2408a
    (cherry picked from commit 22d23d52b0f65636df3a1cb8fada9bf7de77eb78)
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index e34b38d..e3d65d9 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -993,7 +993,7 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
         }
     }
 
-    rTo.mnIntLeading = (rTo.mnAscent + rTo.mnDescent) - ((maFaceFT->units_per_EM + 32) >> 6);
+    rTo.mnIntLeading = rTo.mnAscent + rTo.mnDescent - (maFaceFT->units_per_EM * fScale + 0.5);
 
     if( pOS2 && (pOS2->version != 0xFFFF) )
     {


More information about the Libreoffice-commits mailing list