#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
(hb_font_t *, hb_codepoint_t, hb_codepoint_t *));
DEF_DLL_FN (hb_bool_t, hb_font_get_variation_glyph,
(hb_font_t *, hb_codepoint_t, hb_codepoint_t, hb_codepoint_t *));
+DEF_DLL_FN (void, hb_ot_font_set_funcs, (hb_font_t *));
#define hb_blob_create fn_hb_blob_create
#define hb_face_create_for_tables fn_hb_face_create_for_tables
#define hb_face_get_upem fn_hb_face_get_upem
#define hb_font_get_nominal_glyph fn_hb_font_get_nominal_glyph
#define hb_font_get_variation_glyph fn_hb_font_get_variation_glyph
+#define hb_ot_font_set_funcs fn_hb_ot_font_set_funcs
#endif
/* Used by uniscribe_otf_capability. */
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;
LOAD_DLL_FN (library, hb_face_destroy);
LOAD_DLL_FN (library, hb_font_get_nominal_glyph);
LOAD_DLL_FN (library, hb_font_get_variation_glyph);
+ LOAD_DLL_FN (library, hb_ot_font_set_funcs);
return hbfont_init_w32_funcs (library);
}
#endif /* HAVE_HARFBUZZ */