[HarfBuzz] Failure in hb_font_get_nominal_glyph
Behdad Esfahbod
behdad at behdad.org
Thu Jul 25 16:08:43 UTC 2019
Looks good to me.
On Thu, Jul 25, 2019, 11:57 AM Eli Zaretskii <eliz at gnu.org> wrote:
> > From: Behdad Esfahbod <behdad at behdad.org>
> > Date: Wed, 24 Jul 2019 15:21:15 -0400
> > Cc: Eli Zaretskii <eliz at gnu.org>,
> > "harfbuzz at lists.freedesktop.org" <harfbuzz at lists.freedesktop.org>
> >
> > 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;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/harfbuzz/attachments/20190725/1fdcb02a/attachment.html>
More information about the HarfBuzz
mailing list