--- misc/mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp 2006-02-28 15:55:35.000000000 +0100 +++ misc/build/mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp 2009-11-13 15:12:24.000000000 +0100 @@ -66,10 +66,12 @@ #endif /* MOZ_WIDGET_GTK */ #ifdef MOZ_WIDGET_GTK2 +#ifdef MOZ_ENABLE_PANGO #include #include #include #endif +#endif #ifdef MOZ_ENABLE_XFT #include "nsFontMetricsUtils.h" @@ -963,9 +965,11 @@ #ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_ENABLE_COREXFONTS +#ifdef MOZ_ENABLE_PANGO static void xlfd_from_pango_font_description(GtkWidget *aWidget, const PangoFontDescription *aFontDesc, nsString& aFontName); +#endif #endif /* MOZ_ENABLE_COREXFONTS */ nsresult @@ -997,10 +1001,12 @@ #endif /* MOZ_ENABLE_XFT */ #ifdef MOZ_ENABLE_COREXFONTS +#ifdef MOZ_ENABLE_PANGO // if name already set by Xft, do nothing if (!aFont->name.Length()) { xlfd_from_pango_font_description(aWidget, desc, aFont->name); } +#endif /* MOZ_ENABLE_PANGO */ #endif /* MOZ_ENABLE_COREXFONTS */ aFont->weight = pango_font_description_get_weight(desc); @@ -1104,6 +1110,7 @@ #endif /* MOZ_ENABLE_XFT */ #if defined(MOZ_WIDGET_GTK2) && defined(MOZ_ENABLE_COREXFONTS) +#ifdef MOZ_ENABLE_PANGO // xlfd_from_pango_font_description copied from vte, which was // written by nalin@redhat.com, and added some codes. static void @@ -1226,4 +1233,5 @@ g_free(spec); g_object_unref(font); } +#endif #endif /* MOZ_WIDGET_GTK2 && MOZ_ENABLE_COREXFONTS */