<div dir="auto">Looks good to me. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 25, 2019, 11:57 AM Eli Zaretskii <<a href="mailto:eliz@gnu.org">eliz@gnu.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> From: Behdad Esfahbod <<a href="mailto:behdad@behdad.org" target="_blank" rel="noreferrer">behdad@behdad.org</a>><br>
> Date: Wed, 24 Jul 2019 15:21:15 -0400<br>
> Cc: Eli Zaretskii <<a href="mailto:eliz@gnu.org" target="_blank" rel="noreferrer">eliz@gnu.org</a>>, <br>
> "<a href="mailto:harfbuzz@lists.freedesktop.org" target="_blank" rel="noreferrer">harfbuzz@lists.freedesktop.org</a>" <<a href="mailto:harfbuzz@lists.freedesktop.org" target="_blank" rel="noreferrer">harfbuzz@lists.freedesktop.org</a>><br>
> <br>
> Ah, right. Yes. Before 2.0.0 you'd have to call hb_ot_font_set_funcs() explicitly...<br>
> <br>
> Thanks Khaled!<br>
<br>
Thanks.<br>
<br>
Just to be sure I understand: is the below the right fix?<br>
<br>
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c<br>
index aa6bebd..8fbbe7e 100644<br>
--- a/src/w32uniscribe.c<br>
+++ b/src/w32uniscribe.c<br>
@@ -32,6 +32,7 @@ #define _WIN32_WINNT 0x0600<br>
#include <usp10.h><br>
#ifdef HAVE_HARFBUZZ<br>
# include <hb.h><br>
+# include <hb-ot.h> /* for hb_ot_font_set_funcs */<br>
# if GNUC_PREREQ (4, 3, 0)<br>
# define bswap_32(v) __builtin_bswap32(v)<br>
# else<br>
@@ -1305,7 +1308,12 @@ w32hb_get_font (struct font *font, double *scale)<br>
hb_face_t *hb_face =<br>
hb_face_create_for_tables (w32hb_get_font_table, font_handle, NULL);<br>
if (hb_face_get_glyph_count (hb_face) > 0)<br>
- hb_font = hb_font_create (hb_face);<br>
+ {<br>
+ hb_font = hb_font_create (hb_face);<br>
+ /* This is needed for HarfBuzz before 2.0.0; it is the default<br>
+ in later versions. */<br>
+ hb_ot_font_set_funcs (hb_font);<br>
+ }<br>
<br>
struct uniscribe_font_info *uniscribe_font =<br>
(struct uniscribe_font_info *) font;<br>
</blockquote></div>