From 8a80e42bc17b4511f29049e7cfa7412b9cf1b318 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 14 Dec 2020 00:00:09 -0800 Subject: [PATCH] pango fucking cairo resolution! --- src/output/cairo-fsm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/output/cairo-fsm.c b/src/output/cairo-fsm.c index 54b65dd9c0..24ae81fbbd 100644 --- a/src/output/cairo-fsm.c +++ b/src/output/cairo-fsm.c @@ -632,7 +632,10 @@ xr_layout_cell_text (struct xr_fsm *xr, const struct table_cell *cell, desc = xr->style->fonts[font_type]; assert (xr->cairo); - PangoLayout *layout = pango_cairo_create_layout (xr->cairo); + PangoContext *context = pango_cairo_create_context (xr->cairo); + if (xr->style->font_scale != 1.0) + pango_cairo_context_set_resolution (context, 72.0); + PangoLayout *layout = pango_layout_new (context); pango_layout_set_font_description (layout, desc); const char *text = cell->text; -- 2.30.2