[pango/pango2-windows: 125/126] examples: Use pango_font_map_new_default()




commit 048c0366aab4466406ac2bfdf824e1b5701747e5
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 e1a76ecb..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 (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]