summaryrefslogtreecommitdiff
path: root/pango/pangocairo-fontmap.c
diff options
context:
space:
mode:
authorKristian Rietveld <kris@gtk.org>2010-03-05 21:46:38 +0100
committerKristian Rietveld <kris@gtk.org>2011-04-14 12:30:03 +0200
commit87882adf1ccacfb49e8c119b1fcb6d13a0e4731f (patch)
treee2a7f92ba363d739d75a9a3d36914b8c9948909d /pango/pangocairo-fontmap.c
parent08fd5cf33d875c161dd5280b92d1633469943620 (diff)
downloadpango-87882adf1ccacfb49e8c119b1fcb6d13a0e4731f.tar.gz
Start implementation of CoreText backend
On Mac OS X systems where CoreText is available (that is, 10.5 or higher), we will build the CoreText backend instead of the ATSUI backend. In this case, the ATSUI backend will not be built and installed. This change is necessary because since Mac OS 10.5 ATSUI has been marked as deprecated. For older systems, we will have to continue to use the ATSUI backend.
Diffstat (limited to 'pango/pangocairo-fontmap.c')
-rw-r--r--pango/pangocairo-fontmap.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c
index ae917d06..94042642 100644
--- a/pango/pangocairo-fontmap.c
+++ b/pango/pangocairo-fontmap.c
@@ -26,7 +26,11 @@
#include "pango-impl-utils.h"
#if defined (HAVE_CAIRO_ATSUI)
-# include "pangocairo-atsui.h"
+# if defined (HAVE_CORE_TEXT)
+# include "pangocairo-coretext.h"
+# else
+# include "pangocairo-atsui.h"
+# endif
#endif
#if defined (HAVE_CAIRO_WIN32)
# include "pangocairo-win32.h"
@@ -92,7 +96,11 @@ pango_cairo_font_map_new (void)
g_type_init ();
#if defined(HAVE_CAIRO_ATSUI)
+#if defined(HAVE_CORE_TEXT)
+ return g_object_new (PANGO_TYPE_CAIRO_CORE_TEXT_FONT_MAP, NULL);
+#else
return g_object_new (PANGO_TYPE_CAIRO_ATSUI_FONT_MAP, NULL);
+#endif
#elif defined(HAVE_CAIRO_WIN32)
return g_object_new (PANGO_TYPE_CAIRO_WIN32_FONT_MAP, NULL);
#elif defined(HAVE_CAIRO_FREETYPE)
@@ -131,8 +139,12 @@ pango_cairo_font_map_new_for_font_type (cairo_font_type_t fonttype)
{
#if defined(HAVE_CAIRO_ATSUI)
case CAIRO_FONT_TYPE_QUARTZ:
+#if defined(HAVE_CORE_TEXT)
+ return g_object_new (PANGO_TYPE_CAIRO_CORE_TEXT_FONT_MAP, NULL);
+#else
return g_object_new (PANGO_TYPE_CAIRO_ATSUI_FONT_MAP, NULL);
#endif
+#endif
#if defined(HAVE_CAIRO_WIN32)
case CAIRO_FONT_TYPE_WIN32:
return g_object_new (PANGO_TYPE_CAIRO_WIN32_FONT_MAP, NULL);