[pango/pango2-windows: 210/211] 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: 210/211] examples: Use pango_font_map_new_default()
- Date: Sat, 11 Jun 2022 04:21:38 +0000 (UTC)
commit feff2c582eee8bda872f5cf0b6fd3654bd4517b4
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 d3a90bd8..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 ());
+ 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 35df63ca..92ca101b 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 ());
+ 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]