> From: Behdad Esfahbod <[email protected]>
> Date: Wed, 24 Jul 2019 15:21:15 -0400
> Cc: Eli Zaretskii <[email protected]>, 
>       "[email protected]" <[email protected]>
> 
> Ah, right.  Yes.  Before 2.0.0 you'd have to call hb_ot_font_set_funcs() 
> explicitly...
> 
> Thanks Khaled!

Thanks.

Just to be sure I understand: is the below the right fix?

diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index aa6bebd..8fbbe7e 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -32,6 +32,7 @@ #define _WIN32_WINNT 0x0600
 #include <usp10.h>
 #ifdef HAVE_HARFBUZZ
 # include <hb.h>
+# include <hb-ot.h>    /* for hb_ot_font_set_funcs */
 # if GNUC_PREREQ (4, 3, 0)
 #  define bswap_32(v)  __builtin_bswap32(v)
 # else
@@ -1305,7 +1308,12 @@ w32hb_get_font (struct font *font, double *scale)
   hb_face_t *hb_face =
     hb_face_create_for_tables (w32hb_get_font_table, font_handle, NULL);
   if (hb_face_get_glyph_count (hb_face) > 0)
-    hb_font = hb_font_create (hb_face);
+    {
+      hb_font = hb_font_create (hb_face);
+      /* This is needed for HarfBuzz before 2.0.0; it is the default
+        in later versions.  */
+      hb_ot_font_set_funcs (hb_font);
+    }
 
   struct uniscribe_font_info *uniscribe_font =
     (struct uniscribe_font_info *) font;
_______________________________________________
HarfBuzz mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to