[pango/wip/kill-shape-engine] coretext: Fix glyph positioning



commit abd2bc790d38e397dfbdc16c1e93823c18da0e1c
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jul 18 10:27:42 2019 -0700

    coretext: Fix glyph positioning
    
    Tell harfbuzz the size of the font, so it can
    place glyphs properly.

 pango/pangocoretext.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/pango/pangocoretext.c b/pango/pangocoretext.c
index 963f1418..6871c087 100644
--- a/pango/pangocoretext.c
+++ b/pango/pangocoretext.c
@@ -175,9 +175,18 @@ pango_core_text_font_create_hb_font (PangoFont *font)
   PangoCoreTextFont *ctfont = (PangoCoreTextFont *)font;
 
   if (ctfont->priv->font_ref)
-    return hb_coretext_font_create (ctfont->priv->font_ref);
+    {
+      hb_font_t *hb_font;
+      int size;
+
+      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);
+
+      return hb_font;
+    }
 
-  return NULL;  
+  return NULL;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]