diff options
author | xtraeme <xtraeme> | 2004-04-30 01:42:11 +0000 |
---|---|---|
committer | xtraeme <xtraeme> | 2004-04-30 01:42:11 +0000 |
commit | a7bbeee1a7a388a1aba3fc54b6070b31a9888e3c (patch) | |
tree | 8597da2d0d72fe0e8b410472b4f05b0007815bac /x11/kdebase3/patches/patch-ai | |
parent | a3ed1c7ebc70a4982849d8092a8a68696f381119 (diff) | |
download | pkgsrc-a7bbeee1a7a388a1aba3fc54b6070b31a9888e3c.tar.gz |
Apply patches from KDE CVS to fix building with freetype2 2.1.8.
Diffstat (limited to 'x11/kdebase3/patches/patch-ai')
-rw-r--r-- | x11/kdebase3/patches/patch-ai | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/x11/kdebase3/patches/patch-ai b/x11/kdebase3/patches/patch-ai new file mode 100644 index 00000000000..1ec57a29b03 --- /dev/null +++ b/x11/kdebase3/patches/patch-ai @@ -0,0 +1,89 @@ +$NetBSD: patch-ai,v 1.10 2004/04/30 01:42:11 xtraeme Exp $ + +Fixes build with Freetype-2.1.8, see: +http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdebase/kcontrol/kfontinst/lib/FontEngine.h + +--- kcontrol/kfontinst/lib/FontEngine.h 2003/11/29 01:41:14 1.5 ++++ kcontrol/kfontinst/lib/FontEngine.h 2004/04/27 20:30:25 1.5.2.1 +@@ -7,7 +7,7 @@ + // Author : Craig Drummond + // Project : K Font Installer + // Creation Date : 29/04/2001 +-// Version : $Revision: 1.10 $ $Date: 2004/04/30 01:42:11 $ ++// Version : $Revision: 1.10 $ $Date: 2004/04/30 01:42:11 $ + // + //////////////////////////////////////////////////////////////////////////////// + // +@@ -34,6 +34,7 @@ + #endif + + #include "Encodings.h" ++#include <kdeversion.h> + #include <ft2build.h> + #include FT_FREETYPE_H + #include <qstring.h> +@@ -50,6 +51,10 @@ + #include <qpaintdevice.h> + #endif + ++// OK - some macros to make determining the FreeType version easier... ++#define KFI_FREETYPE_VERSION KDE_MAKE_VERSION(FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH) ++#define KFI_FT_IS_GE(a,b,c) (KFI_FREETYPE_VERSION >= KDE_MAKE_VERSION(a,b,c)) ++ + class CFontEngine + { + public: +@@ -178,8 +183,15 @@ class CFontEngine + bool open; + #ifdef HAVE_FT_CACHE + FTC_Manager cacheManager; ++ ++#if KFI_FT_IS_GE(2, 1, 8) ++ FTC_ImageCache imageCache; ++ FTC_SBitCache sBitCache; ++#else + FTC_Image_Cache imageCache; + FTC_SBit_Cache sBitCache; ++#endif ++ + QPtrList<TId> ids; + unsigned char *buffer; + int bufferSize; +@@ -191,7 +203,8 @@ class CFontEngine + int width, + height, + greys, +- mod; ++ pitch; ++ bool mono; + unsigned char *buffer; + }; + +@@ -348,11 +361,25 @@ class CFontEngine + private: + + FTC_FaceID getId(const QString &f, int faceNo); ++ ++#if KFI_FT_IS_GE(2, 1, 8) ++ bool getGlyphBitmap(FTC_ImageTypeRec &font, FT_ULong index, Bitmap &target, int &left, int &top, ++ int &xAdvance, FT_Pointer *ptr); ++#else + bool getGlyphBitmap(FTC_Image_Desc &font, FT_ULong index, Bitmap &target, int &left, int &top, + int &xAdvance, FT_Pointer *ptr); ++#endif ++ + void align32(Bitmap &bmp); +- bool drawGlyph(QPixmap &pix, FTC_Image_Desc &font, FT_Size &size, int glyphNum, FT_F26Dot6 &x, FT_F26Dot6 &y, ++ ++#if KFI_FT_IS_GE(2, 1, 8) ++ bool drawGlyph(QPixmap &pix, FTC_ImageTypeRec &font, int glyphNum, FT_F26Dot6 &x, FT_F26Dot6 &y, + FT_F26Dot6 width, FT_F26Dot6 height, FT_F26Dot6 startX, FT_F26Dot6 stepY, int space=0); ++#else ++ bool drawGlyph(QPixmap &pix, FTC_Image_Desc &font, int glyphNum, FT_F26Dot6 &x, FT_F26Dot6 &y, ++ FT_F26Dot6 width, FT_F26Dot6 height, FT_F26Dot6 startX, FT_F26Dot6 stepY, int space=0); ++#endif ++ + #endif + + private: + |