From b8272cb0a4e4b54bcb60169751acba22d00c4c48 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 1 May 2011 13:55:47 +1000 Subject: Disable all use of GdkFont with DISABLE_GDK_FONT since the identifier is missing in GTK+ 3. --- gtk/PlatGTK.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 4e2247355..23b12886e 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -116,10 +116,17 @@ class FontHandle { encodingType et; public: int ascent; +#ifndef DISABLE_GDK_FONT GdkFont *pfont; +#endif PangoFontDescription *pfd; int characterSet; - FontHandle(GdkFont *pfont_) { +#ifdef DISABLE_GDK_FONT + FontHandle() : et(singleByte), ascent(0), pfd(0), characterSet(-1) { + ResetWidths(et); + } +#else + FontHandle(GdkFont *pfont_=0) { et = singleByte; ascent = 0; pfont = pfont_; @@ -127,10 +134,13 @@ public: characterSet = -1; ResetWidths(et); } +#endif FontHandle(PangoFontDescription *pfd_, int characterSet_) { et = singleByte; ascent = 0; +#ifndef DISABLE_GDK_FONT pfont = 0; +#endif pfd = pfd_; characterSet = characterSet_; ResetWidths(et); @@ -139,8 +149,8 @@ public: #ifndef DISABLE_GDK_FONT if (pfont) gdk_font_unref(pfont); -#endif pfont = 0; +#endif if (pfd) pango_font_description_free(pfd); pfd = 0; @@ -671,7 +681,7 @@ FontID FontCached::CreateNewFont(const char *fontName, int characterSet, } return new FontHandle(newid); #else - return new FontHandle(0); + return new FontHandle(); #endif } -- cgit v1.2.3