[pango/matthiasc/for-master: 30/30] utils: Don't use deprecated api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/matthiasc/for-master: 30/30] utils: Don't use deprecated api
- Date: Fri, 18 Sep 2020 19:34:27 +0000 (UTC)
commit e8181138ab5b4403bee552e768d53a0674d881dd
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Sep 18 15:33:27 2020 -0400
utils: Don't use deprecated api
Port pango-viewer to use the new
pango_fc_font_map_set_default_substitute.
utils/viewer-pangoft2.c | 2 +-
utils/viewer-pangoxft.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/utils/viewer-pangoft2.c b/utils/viewer-pangoft2.c
index 87973c80..3a698b8e 100644
--- a/utils/viewer-pangoft2.c
+++ b/utils/viewer-pangoft2.c
@@ -51,7 +51,7 @@ pangoft2_view_create (const PangoViewer *klass G_GNUC_UNUSED)
fontmap = pango_ft2_font_map_new ();
pango_ft2_font_map_set_resolution (PANGO_FT2_FONT_MAP (fontmap), opt_dpi, opt_dpi);
- pango_ft2_font_map_set_default_substitute (PANGO_FT2_FONT_MAP (fontmap), substitute_func, NULL, NULL);
+ pango_fc_font_map_set_default_substitute (PANGO_FC_FONT_MAP (fontmap), substitute_func, NULL, NULL);
return fontmap;
}
diff --git a/utils/viewer-pangoxft.c b/utils/viewer-pangoxft.c
index 948cd90e..95a4545e 100644
--- a/utils/viewer-pangoxft.c
+++ b/utils/viewer-pangoxft.c
@@ -51,8 +51,8 @@ pangoxft_view_create (const PangoViewer *klass)
XftInit (NULL);
- pango_xft_set_default_substitute (instance->display, instance->screen,
- default_substitute, NULL, NULL);
+ pango_fc_font_map_set_default_substitute (PANGO_FC_FONT_MAP (pango_xft_get_font_map (instance->display,
instance->screen)),
+ default_substitute, NULL, NULL);
return instance;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]