diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2014-07-28 18:20:42 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2014-07-28 18:40:28 -0400 |
commit | caa226bc36d4d449b89a6eab6c0d24a5bba2658c (patch) | |
tree | d8be1919b15887d5a8001ec0e924e18a3cfa7cdd /pango | |
parent | cda5d4ffb5ad9e48da235a7a97ae3fe8b782e6aa (diff) | |
download | pango-caa226bc36d4d449b89a6eab6c0d24a5bba2658c.tar.gz |
[pangocairo] Fix backend selection through $PANGOCAIRO_BACKEND
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pangocairo-fontmap.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c index 4d06dfe0..004b0dec 100644 --- a/pango/pangocairo-fontmap.c +++ b/pango/pangocairo-fontmap.c @@ -81,18 +81,29 @@ pango_cairo_font_map_new (void) g_type_init (); #endif #if defined(HAVE_CORE_TEXT) && defined (HAVE_CAIRO_QUARTZ) - if (!backend || 0 == strcmp (backend, "quartz")) + if (!backend || 0 == strcmp (backend, "coretext")) return g_object_new (PANGO_TYPE_CAIRO_CORE_TEXT_FONT_MAP, NULL); -#elif defined(HAVE_CAIRO_WIN32) +#endif +#if defined(HAVE_CAIRO_WIN32) if (!backend || 0 == strcmp (backend, "win32")) return g_object_new (PANGO_TYPE_CAIRO_WIN32_FONT_MAP, NULL); -#elif defined(HAVE_CAIRO_FREETYPE) +#endif +#if defined(HAVE_CAIRO_FREETYPE) if (!backend || 0 == strcmp (backend, "fc") || 0 == strcmp (backend, "fontconfig")) return g_object_new (PANGO_TYPE_CAIRO_FC_FONT_MAP, NULL); #endif - if (!backend) - g_assert_not_reached (); + g_error ("Unknown $PANGOCAIRO_BACKEND value. Available backends are:" +#if defined(HAVE_CORE_TEXT) && defined (HAVE_CAIRO_QUARTZ) + " coretext" +#endif +#if defined(HAVE_CAIRO_WIN32) + " win32" +#endif +#if defined(HAVE_CAIRO_FREETYPE) + " fontconfig" +#endif + ); return NULL; } |