Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / moz / patches / respect_disable_pango.patch
blob07a83e9dd40a939e5f7007b0b466ed34b572f0ac
1 --- misc/mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp 2006-02-28 15:55:35.000000000 +0100
2 +++ misc/build/mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp 2009-11-13 15:12:24.000000000 +0100
3 @@ -66,10 +66,12 @@
4 #endif /* MOZ_WIDGET_GTK */
6 #ifdef MOZ_WIDGET_GTK2
7 +#ifdef MOZ_ENABLE_PANGO
8 #include <pango/pango.h>
9 #include <pango/pangox.h>
10 #include <pango/pango-fontmap.h>
11 #endif
12 +#endif
14 #ifdef MOZ_ENABLE_XFT
15 #include "nsFontMetricsUtils.h"
16 @@ -963,9 +965,11 @@
17 #ifdef MOZ_WIDGET_GTK2
19 #ifdef MOZ_ENABLE_COREXFONTS
20 +#ifdef MOZ_ENABLE_PANGO
21 static void xlfd_from_pango_font_description(GtkWidget *aWidget,
22 const PangoFontDescription *aFontDesc,
23 nsString& aFontName);
24 +#endif
25 #endif /* MOZ_ENABLE_COREXFONTS */
27 nsresult
28 @@ -997,10 +1001,12 @@
29 #endif /* MOZ_ENABLE_XFT */
31 #ifdef MOZ_ENABLE_COREXFONTS
32 +#ifdef MOZ_ENABLE_PANGO
33 // if name already set by Xft, do nothing
34 if (!aFont->name.Length()) {
35 xlfd_from_pango_font_description(aWidget, desc, aFont->name);
37 +#endif /* MOZ_ENABLE_PANGO */
38 #endif /* MOZ_ENABLE_COREXFONTS */
39 aFont->weight = pango_font_description_get_weight(desc);
41 @@ -1104,6 +1110,7 @@
42 #endif /* MOZ_ENABLE_XFT */
44 #if defined(MOZ_WIDGET_GTK2) && defined(MOZ_ENABLE_COREXFONTS)
45 +#ifdef MOZ_ENABLE_PANGO
46 // xlfd_from_pango_font_description copied from vte, which was
47 // written by nalin@redhat.com, and added some codes.
48 static void
49 @@ -1226,4 +1233,5 @@
50 g_free(spec);
51 g_object_unref(font);
53 +#endif
54 #endif /* MOZ_WIDGET_GTK2 && MOZ_ENABLE_COREXFONTS */