[pango/pango2: 35/63] pango-view: wip work with pango-hbfontmap
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 35/63] pango-view: wip work with pango-hbfontmap
- Date: Fri, 10 Jun 2022 03:41:33 +0000 (UTC)
commit 23f480a0176fc0c28cbfa421480e4d09845025cb
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 f2b5c85b..af26c702 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]