diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32uniscribe.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index aa6bebdc024..8fbbe7e4a9e 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -32,6 +32,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 32 | #include <usp10.h> | 32 | #include <usp10.h> |
| 33 | #ifdef HAVE_HARFBUZZ | 33 | #ifdef HAVE_HARFBUZZ |
| 34 | # include <hb.h> | 34 | # include <hb.h> |
| 35 | # include <hb-ot.h> /* for hb_ot_font_set_funcs */ | ||
| 35 | # if GNUC_PREREQ (4, 3, 0) | 36 | # if GNUC_PREREQ (4, 3, 0) |
| 36 | # define bswap_32(v) __builtin_bswap32(v) | 37 | # define bswap_32(v) __builtin_bswap32(v) |
| 37 | # else | 38 | # else |
| @@ -87,6 +88,7 @@ DEF_DLL_FN (hb_bool_t, hb_font_get_nominal_glyph, | |||
| 87 | (hb_font_t *, hb_codepoint_t, hb_codepoint_t *)); | 88 | (hb_font_t *, hb_codepoint_t, hb_codepoint_t *)); |
| 88 | DEF_DLL_FN (hb_bool_t, hb_font_get_variation_glyph, | 89 | DEF_DLL_FN (hb_bool_t, hb_font_get_variation_glyph, |
| 89 | (hb_font_t *, hb_codepoint_t, hb_codepoint_t, hb_codepoint_t *)); | 90 | (hb_font_t *, hb_codepoint_t, hb_codepoint_t, hb_codepoint_t *)); |
| 91 | DEF_DLL_FN (void, hb_ot_font_set_funcs, (hb_font_t *)); | ||
| 90 | 92 | ||
| 91 | #define hb_blob_create fn_hb_blob_create | 93 | #define hb_blob_create fn_hb_blob_create |
| 92 | #define hb_face_create_for_tables fn_hb_face_create_for_tables | 94 | #define hb_face_create_for_tables fn_hb_face_create_for_tables |
| @@ -97,6 +99,7 @@ DEF_DLL_FN (hb_bool_t, hb_font_get_variation_glyph, | |||
| 97 | #define hb_face_get_upem fn_hb_face_get_upem | 99 | #define hb_face_get_upem fn_hb_face_get_upem |
| 98 | #define hb_font_get_nominal_glyph fn_hb_font_get_nominal_glyph | 100 | #define hb_font_get_nominal_glyph fn_hb_font_get_nominal_glyph |
| 99 | #define hb_font_get_variation_glyph fn_hb_font_get_variation_glyph | 101 | #define hb_font_get_variation_glyph fn_hb_font_get_variation_glyph |
| 102 | #define hb_ot_font_set_funcs fn_hb_ot_font_set_funcs | ||
| 100 | #endif | 103 | #endif |
| 101 | 104 | ||
| 102 | /* Used by uniscribe_otf_capability. */ | 105 | /* Used by uniscribe_otf_capability. */ |
| @@ -1305,7 +1308,12 @@ w32hb_get_font (struct font *font, double *scale) | |||
| 1305 | hb_face_t *hb_face = | 1308 | hb_face_t *hb_face = |
| 1306 | hb_face_create_for_tables (w32hb_get_font_table, font_handle, NULL); | 1309 | hb_face_create_for_tables (w32hb_get_font_table, font_handle, NULL); |
| 1307 | if (hb_face_get_glyph_count (hb_face) > 0) | 1310 | if (hb_face_get_glyph_count (hb_face) > 0) |
| 1308 | hb_font = hb_font_create (hb_face); | 1311 | { |
| 1312 | hb_font = hb_font_create (hb_face); | ||
| 1313 | /* This is needed for HarfBuzz before 2.0.0; it is the default | ||
| 1314 | in later versions. */ | ||
| 1315 | hb_ot_font_set_funcs (hb_font); | ||
| 1316 | } | ||
| 1309 | 1317 | ||
| 1310 | struct uniscribe_font_info *uniscribe_font = | 1318 | struct uniscribe_font_info *uniscribe_font = |
| 1311 | (struct uniscribe_font_info *) font; | 1319 | (struct uniscribe_font_info *) font; |
| @@ -1486,6 +1494,7 @@ load_harfbuzz_funcs (HMODULE library) | |||
| 1486 | LOAD_DLL_FN (library, hb_face_destroy); | 1494 | LOAD_DLL_FN (library, hb_face_destroy); |
| 1487 | LOAD_DLL_FN (library, hb_font_get_nominal_glyph); | 1495 | LOAD_DLL_FN (library, hb_font_get_nominal_glyph); |
| 1488 | LOAD_DLL_FN (library, hb_font_get_variation_glyph); | 1496 | LOAD_DLL_FN (library, hb_font_get_variation_glyph); |
| 1497 | LOAD_DLL_FN (library, hb_ot_font_set_funcs); | ||
| 1489 | return hbfont_init_w32_funcs (library); | 1498 | return hbfont_init_w32_funcs (library); |
| 1490 | } | 1499 | } |
| 1491 | #endif /* HAVE_HARFBUZZ */ | 1500 | #endif /* HAVE_HARFBUZZ */ |