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

Khaled Hosny khaledhosny at eglug.org
Fri Aug 30 09:41:49 PDT 2013


 vcl/generic/glyphs/gcach_ftyp.cxx |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

New commits:
commit 00a81233d9c2ae6b3996b744982715137fd6a626
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Fri Aug 30 18:36:18 2013 +0200

    Remove hacks for ancient FreeType
    
    We don't support FreeType <= 2.0.9, since configure already checks for
    >= 2.1.5 (which is pretty ancient and was put there arbitrarily as the
    first FreeType version to ship a .pc file, but that is a different
    story).
    
    Change-Id: Iae7c950ff7b48eae22fbe98bdda726318e9dea9a

diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 979be11..3dbb5cd 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -496,14 +496,6 @@ FreetypeManager::FreetypeManager()
 #else
 #ifdef RTLD_DEFAULT // true if a good dlfcn.h header was included
     // Get version of freetype library to enable workarounds.
-    // Freetype <= 2.0.9 does not have FT_Library_Version().
-    // Using dl_sym() instead of osl_getSymbol() because latter
-    // isn't designed to work with oslModule=NULL
-    void (*pFTLibraryVersion)(FT_Library library,
-        FT_Int *amajor, FT_Int *aminor, FT_Int *apatch);
-    pFTLibraryVersion = (void (*)(FT_Library library,
-        FT_Int *amajor, FT_Int *aminor, FT_Int *apatch))(sal_IntPtr)dlsym( RTLD_DEFAULT, "FT_Library_Version" );
-
     pFTNewSize      = (FT_Error(*)(FT_Face,FT_Size*))(sal_IntPtr)dlsym( RTLD_DEFAULT, "FT_New_Size" );
     pFTActivateSize = (FT_Error(*)(FT_Size))(sal_IntPtr)dlsym( RTLD_DEFAULT, "FT_Activate_Size" );
     pFTDoneSize     = (FT_Error(*)(FT_Size))(sal_IntPtr)dlsym( RTLD_DEFAULT, "FT_Done_Size" );
@@ -513,8 +505,7 @@ FreetypeManager::FreetypeManager()
     bEnableSizeFT = (pFTNewSize!=NULL) && (pFTActivateSize!=NULL) && (pFTDoneSize!=NULL);
 
     FT_Int nMajor = 0, nMinor = 0, nPatch = 0;
-    if( pFTLibraryVersion )
-        pFTLibraryVersion( aLibFT, &nMajor, &nMinor, &nPatch );
+    FT_Library_Version(aLibFT, &nMajor, &nMinor, &nPatch);
     nFTVERSION = nMajor * 1000 + nMinor * 100 + nPatch;
 
     // disable artificial emboldening with the Freetype API for older versions


More information about the Libreoffice-commits mailing list