summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-06-13 06:51:43 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-06-22 13:57:26 -0400
commitdb3fd89440ac03232cf3779c9c05d9a2563a40e9 (patch)
treefe2f859bd2e5fec17955fe52c02b194cb4c7d01c /pango
parent240bc7c8cc2f1401d5953582bbd9fea0423d7ab9 (diff)
downloadpango-db3fd89440ac03232cf3779c9c05d9a2563a40e9.tar.gz
Drop PANGOCAIRO_BACKEND for now
We don't allow building with multiple backends atm.
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-fontmap.c60
1 files changed, 12 insertions, 48 deletions
diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c
index dc90cf2b..4444eb49 100644
--- a/pango/pango-fontmap.c
+++ b/pango/pango-fontmap.c
@@ -1136,60 +1136,24 @@ static GPrivate default_font_map = G_PRIVATE_INIT (g_object_unref); /* MT-safe *
* explicitly create an instance of `PangoFontMap` itself
* (and not a platform-specific subclass), see [ctor@Pango.FontMap.new].
*
- * You can override the type of backend returned by using an
- * environment variable %PANGOCAIRO_BACKEND. Supported types,
- * based on your build, are fontconfig, win32, and coretext.
- *
- * If requested type is not available, `NULL` is returned.
- * This is only useful for testing, when at least two backends
- * are compiled in.
- *
- * Return value: (transfer full): the newly allocated `PangoFontMap`,
- * which should be freed with g_object_unref().
+ * Return value: (transfer full): the newly allocated `PangoFontMap`
*/
PangoFontMap *
pango_font_map_new_default (void)
{
- const char *backend;
-
- backend = getenv ("PANGOCAIRO_BACKEND");
- if (backend && !*backend)
- backend = NULL;
-
-#if defined (HAVE_CORE_TEXT)
- if (!backend || 0 == strcmp (backend, "coretext"))
- return PANGO_FONT_MAP (pango_core_text_font_map_new ());
-#endif
-
-#if defined (HAVE_DIRECT_WRITE)
- if (!backend || 0 == strcmp (backend, "win32"))
- return PANGO_FONT_MAP (pango_direct_write_font_map_new ());
-#endif
-
-#if defined (HAVE_FONTCONFIG)
- if (!backend || 0 == strcmp (backend, "fc")
- || 0 == strcmp (backend, "fontconfig"))
- return PANGO_FONT_MAP (pango_fc_font_map_new ());
-#endif
-
- {
- const char backends[] = ""
+/* If we ever go back to having multiple backends built
+ * at the same time, bring back a PANGO_BACKEND env var
+ * here.
+ */
#if defined (HAVE_CORE_TEXT)
- " coretext"
-#endif
-#if defined (HAVE_DIRECT_WRITE)
- " win32"
-#endif
-#if defined (HAVE_FNTCONFIG)
- " fontconfig"
-#endif
- ;
-
- g_critical ("Unknown PANGOCAIRO_BACKEND value.\n"
- "Available backends are:%s", backends);
- }
-
+ return PANGO_FONT_MAP (pango_core_text_font_map_new ());
+#elif defined (HAVE_DIRECT_WRITE)
+ return PANGO_FONT_MAP (pango_direct_write_font_map_new ());
+#elif defined (HAVE_FONTCONFIG)
+ return PANGO_FONT_MAP (pango_fc_font_map_new ());
+#else
return NULL;
+#endif
}
/**