[Libreoffice-commits] core.git: vcl/generic

Khaled Hosny khaledhosny at eglug.org
Wed Jun 19 16:34:58 PDT 2013


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

New commits:
commit 22d23d52b0f65636df3a1cb8fada9bf7de77eb78
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

diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index cdcfe4c..d75c7d2 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -989,7 +989,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