[pango/pango2-windows: 24/25] examples: Use pango_font_map_new_default()
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2-windows: 24/25] examples: Use pango_font_map_new_default()
- Date: Thu, 9 Jun 2022 08:27:40 +0000 (UTC)
commit 5b23f8e14e2ec02237ea6811f0bfcabcd3fb5efa
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Jun 9 11:15:57 2022 +0800
examples: Use pango_font_map_new_default()
...instead of relying on the FontConfig-specific pango_fc_hb_font_map_new().
The pango_font_map_new_default() should cover the PangoFontMap we need use
depending on what backend we have and choose to use.
examples/cairoshape.c | 3 +--
examples/userfont.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/examples/cairoshape.c b/examples/cairoshape.c
index 4f769ce3..c61d7944 100644
--- a/examples/cairoshape.c
+++ b/examples/cairoshape.c
@@ -25,7 +25,6 @@
#include <string.h>
#include <pango/pangocairo.h>
-#include <pango/pangofc-fontmap.h>
static PangoFontMap *fontmap;
@@ -307,7 +306,7 @@ main (int argc, char **argv)
filename = argv[1];
- fontmap = PANGO_FONT_MAP (pango_fc_font_map_new (NULL));
+ fontmap = PANGO_FONT_MAP (pango_font_map_new_default ());
setup_fontmap (PANGO_FONT_MAP (fontmap));
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0);
diff --git a/examples/userfont.c b/examples/userfont.c
index 3b6ad039..687c3671 100644
--- a/examples/userfont.c
+++ b/examples/userfont.c
@@ -15,7 +15,6 @@
#include <stdio.h>
#include <pango/pangocairo.h>
-#include <pango/pangofc-fontmap.h>
static PangoFontMap *fontmap;
@@ -321,7 +320,7 @@ main (int argc, char **argv)
filename = argv[1];
- fontmap = PANGO_FONT_MAP (pango_fc_font_map_new (NULL));
+ fontmap = PANGO_FONT_MAP (pango_font_map_new_default ());
setup_fontmap (PANGO_FONT_MAP (fontmap));
layout = get_layout ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]