[pango/pango2: 34/178] pango-view: wip work with pango-hbfontmap
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 34/178] pango-view: wip work with pango-hbfontmap
- Date: Wed, 22 Jun 2022 20:10:12 +0000 (UTC)
commit 41838b7e04d91ff2bb1cac46ac4e8543b364c79c
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 7 07:36:08 2022 -0400
pango-view: wip work with pango-hbfontmap
utils/viewer-pangocairo.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/utils/viewer-pangocairo.c b/utils/viewer-pangocairo.c
index f2b5c85b1..af26c7024 100644
--- a/utils/viewer-pangocairo.c
+++ b/utils/viewer-pangocairo.c
@@ -52,7 +52,10 @@ pangocairo_view_create (const PangoViewer *klass G_GNUC_UNUSED)
instance->backend = cairo_viewer_iface_create (&instance->iface);
instance->fontmap = pango_cairo_font_map_new ();
- pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (instance->fontmap), opt_dpi);
+ if (PANGO_IS_CAIRO_FONT_MAP (instance->fontmap))
+ pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (instance->fontmap), opt_dpi);
+ else
+ pango_hb_font_map_set_resolution (PANGO_HB_FONT_MAP (instance->fontmap), opt_dpi);
instance->font_options = cairo_font_options_create ();
if (opt_hinting != HINT_DEFAULT)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]