summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2020-06-26 08:57:29 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2020-06-26 08:57:29 +0000
commit4ead5d2a2346c77a3dbc5e8d75221fa28e88f4e5 (patch)
tree5e0f92bfb9ee55801c95f7db0afeb22bfbe80c5b
parent07c21d16be9cefbfbf82d357aab6896932d1f610 (diff)
parenteece984b8c6fd6eeb663312d40db105a58ff9a84 (diff)
downloadpango-4ead5d2a2346c77a3dbc5e8d75221fa28e88f4e5.tar.gz
Merge branch 'issue488' into 'master'
pangocoretext: Fix Cairo scaling Closes #488 See merge request GNOME/pango!210
-rw-r--r--pango/pangocoretext.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pango/pangocoretext.c b/pango/pangocoretext.c
index c261615e..44d2805a 100644
--- a/pango/pangocoretext.c
+++ b/pango/pangocoretext.c
@@ -176,12 +176,16 @@ pango_core_text_font_create_hb_font (PangoFont *font)
if (ctfont->priv->font_ref)
{
+ const PangoMatrix *matrix;
hb_font_t *hb_font;
+ double x_scale, y_scale;
int size;
+ matrix = pango_core_text_font_key_get_matrix (ctfont->priv->key);
+ pango_matrix_get_font_scale_factors (matrix, &x_scale, &y_scale);
size = pango_core_text_font_key_get_size (ctfont->priv->key);
hb_font = hb_coretext_font_create (ctfont->priv->font_ref);
- hb_font_set_scale (hb_font, size, size);
+ hb_font_set_scale (hb_font, size / x_scale, size / y_scale);
return hb_font;
}