[pango/simple-fontmap: 27/31] pangocairo: Allow picking the new fc fontmap
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/simple-fontmap: 27/31] pangocairo: Allow picking the new fc fontmap
- Date: Thu, 6 Jan 2022 19:09:02 +0000 (UTC)
commit 04339b561ca0cbddc48101d3fecd65e121288eb9
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 24 10:38:38 2021 -0500
pangocairo: Allow picking the new fc fontmap
Make PANGOCAIRO_BACKEND=fontconfig2 or fc2 work.
pango/pangocairo-fontmap.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c
index 70bc66dc..8dc15e20 100644
--- a/pango/pangocairo-fontmap.c
+++ b/pango/pangocairo-fontmap.c
@@ -33,6 +33,7 @@
#endif
#if defined (HAVE_CAIRO_FREETYPE)
# include "pangocairo-fc.h"
+# include "pangofc-hbfontmap.h"
#endif
@@ -87,8 +88,11 @@ pango_cairo_font_map_new (void)
#endif
#if defined(HAVE_CAIRO_FREETYPE)
if (!backend || 0 == strcmp (backend, "fc")
- || 0 == strcmp (backend, "fontconfig"))
+ || 0 == strcmp (backend, "fontconfig"))
return g_object_new (PANGO_TYPE_CAIRO_FC_FONT_MAP, NULL);
+ else if (0 == strcmp (backend, "fc2") ||
+ 0 == strcmp (backend, "fontconfig2"))
+ return g_object_new (PANGO_TYPE_FC_HB_FONT_MAP, NULL);
#endif
{
const char backends[] = ""
@@ -100,9 +104,10 @@ pango_cairo_font_map_new (void)
#endif
#if defined(HAVE_CAIRO_FREETYPE)
" fontconfig"
+ " fontconfig2"
#endif
;
- g_critical ("Unknown $PANGOCAIRO_BACKEND value.\n Available backends are:%s", backends);
+ g_critical ("Unknown PANGOCAIRO_BACKEND value.\nAvailable backends are:%s", backends);
}
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]