1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
--- 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 <pango/pango.h>
#include <pango/pangox.h>
#include <pango/pango-fontmap.h>
#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 */
|