diff options
| author | Khaled Hosny | 2018-12-22 10:13:06 +0200 |
|---|---|---|
| committer | Khaled Hosny | 2018-12-22 10:22:22 +0200 |
| commit | 47ed564056a657eb602559576d59cd66734e7234 (patch) | |
| tree | 1f1fb78e0f23c53da91d48c27d2ff653d895f77f /src | |
| parent | 80e0491420a9f645efa6c1438f209f70610c4065 (diff) | |
| download | emacs-47ed564056a657eb602559576d59cd66734e7234.tar.gz emacs-47ed564056a657eb602559576d59cd66734e7234.zip | |
Properly fix building with HarfBuzz and without libotf
HarfBuzz support does not depend on libotf, the build breakage when
libotf is missing was because code guarded with:
#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
was incorrectly changed to:
#if defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ
this is now properly fixed by making it:
#if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ
Other changes in previous commits were reverted.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftcrfont.c | 2 | ||||
| -rw-r--r-- | src/ftfont.c | 15 | ||||
| -rw-r--r-- | src/ftxfont.c | 2 | ||||
| -rw-r--r-- | src/xftfont.c | 4 |
4 files changed, 11 insertions, 12 deletions
diff --git a/src/ftcrfont.c b/src/ftcrfont.c index ae5b0a92eee..95ff89328d6 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c | |||
| @@ -302,7 +302,7 @@ struct font_driver const ftcrfont_driver = | |||
| 302 | #ifdef HAVE_LIBOTF | 302 | #ifdef HAVE_LIBOTF |
| 303 | .otf_capability = ftfont_otf_capability, | 303 | .otf_capability = ftfont_otf_capability, |
| 304 | #endif | 304 | #endif |
| 305 | #if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ) | 305 | #if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ |
| 306 | .shape = ftfont_shape, | 306 | .shape = ftfont_shape, |
| 307 | #endif | 307 | #endif |
| 308 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS | 308 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS |
diff --git a/src/ftfont.c b/src/ftfont.c index 8476a74854c..43a3e46e578 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -474,8 +474,9 @@ ftfont_get_otf (struct ftfont_info *ftfont_info) | |||
| 474 | ftfont_info->otf = otf; | 474 | ftfont_info->otf = otf; |
| 475 | return otf; | 475 | return otf; |
| 476 | } | 476 | } |
| 477 | #endif /* HAVE_LIBOTF */ | ||
| 477 | 478 | ||
| 478 | # ifdef HAVE_HARFBUZZ | 479 | #ifdef HAVE_HARFBUZZ |
| 479 | 480 | ||
| 480 | static hb_font_t * | 481 | static hb_font_t * |
| 481 | ftfont_get_hb_font (struct ftfont_info *ftfont_info) | 482 | ftfont_get_hb_font (struct ftfont_info *ftfont_info) |
| @@ -486,8 +487,7 @@ ftfont_get_hb_font (struct ftfont_info *ftfont_info) | |||
| 486 | return ftfont_info->hb_font; | 487 | return ftfont_info->hb_font; |
| 487 | } | 488 | } |
| 488 | 489 | ||
| 489 | # endif /* HAVE_HARFBUZZ */ | 490 | #endif /* HAVE_HARFBUZZ */ |
| 490 | #endif /* HAVE_LIBOTF */ | ||
| 491 | 491 | ||
| 492 | Lisp_Object | 492 | Lisp_Object |
| 493 | ftfont_get_cache (struct frame *f) | 493 | ftfont_get_cache (struct frame *f) |
| @@ -2670,7 +2670,7 @@ ftfont_variation_glyphs (struct font *font, int c, unsigned variations[256]) | |||
| 2670 | #endif /* HAVE_LIBOTF */ | 2670 | #endif /* HAVE_LIBOTF */ |
| 2671 | 2671 | ||
| 2672 | #ifdef HAVE_HARFBUZZ | 2672 | #ifdef HAVE_HARFBUZZ |
| 2673 | #ifdef HAVE_LIBOTF | 2673 | |
| 2674 | static hb_unicode_combining_class_t | 2674 | static hb_unicode_combining_class_t |
| 2675 | uni_combining (hb_unicode_funcs_t *funcs, hb_codepoint_t ch, void *user_data) | 2675 | uni_combining (hb_unicode_funcs_t *funcs, hb_codepoint_t ch, void *user_data) |
| 2676 | { | 2676 | { |
| @@ -2929,10 +2929,9 @@ done: | |||
| 2929 | return make_fixnum (glyph_len); | 2929 | return make_fixnum (glyph_len); |
| 2930 | } | 2930 | } |
| 2931 | 2931 | ||
| 2932 | #endif /* HAVE_LIBOTF */ | ||
| 2933 | #endif /* HAVE_HARFBUZZ */ | 2932 | #endif /* HAVE_HARFBUZZ */ |
| 2934 | 2933 | ||
| 2935 | #if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ) | 2934 | #if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ |
| 2936 | 2935 | ||
| 2937 | Lisp_Object | 2936 | Lisp_Object |
| 2938 | ftfont_shape (Lisp_Object lgstring) | 2937 | ftfont_shape (Lisp_Object lgstring) |
| @@ -2957,7 +2956,7 @@ ftfont_shape (Lisp_Object lgstring) | |||
| 2957 | } | 2956 | } |
| 2958 | } | 2957 | } |
| 2959 | 2958 | ||
| 2960 | #endif /* HAVE_LIBOTF && (HAVE_M17N_FLT || defined HAVE_HARFBUZZ) */ | 2959 | #endif /* (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ */ |
| 2961 | 2960 | ||
| 2962 | static const char *const ftfont_booleans [] = { | 2961 | static const char *const ftfont_booleans [] = { |
| 2963 | ":antialias", | 2962 | ":antialias", |
| @@ -3038,7 +3037,7 @@ static struct font_driver const ftfont_driver = | |||
| 3038 | #ifdef HAVE_LIBOTF | 3037 | #ifdef HAVE_LIBOTF |
| 3039 | .otf_capability = ftfont_otf_capability, | 3038 | .otf_capability = ftfont_otf_capability, |
| 3040 | #endif | 3039 | #endif |
| 3041 | #if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ) | 3040 | #if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ |
| 3042 | .shape = ftfont_shape, | 3041 | .shape = ftfont_shape, |
| 3043 | #endif | 3042 | #endif |
| 3044 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS | 3043 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS |
diff --git a/src/ftxfont.c b/src/ftxfont.c index a30b07636e6..66fd9abf530 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -359,7 +359,7 @@ struct font_driver const ftxfont_driver = | |||
| 359 | .otf_capability = ftfont_otf_capability, | 359 | .otf_capability = ftfont_otf_capability, |
| 360 | #endif | 360 | #endif |
| 361 | .end_for_frame = ftxfont_end_for_frame, | 361 | .end_for_frame = ftxfont_end_for_frame, |
| 362 | #if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ) | 362 | #if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ |
| 363 | .shape = ftfont_shape, | 363 | .shape = ftfont_shape, |
| 364 | #endif | 364 | #endif |
| 365 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS | 365 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS |
diff --git a/src/xftfont.c b/src/xftfont.c index 5111936f3e7..56d0e30e24c 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -672,7 +672,7 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, | |||
| 672 | return len; | 672 | return len; |
| 673 | } | 673 | } |
| 674 | 674 | ||
| 675 | #if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ) | 675 | #if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ |
| 676 | static Lisp_Object | 676 | static Lisp_Object |
| 677 | xftfont_shape (Lisp_Object lgstring) | 677 | xftfont_shape (Lisp_Object lgstring) |
| 678 | { | 678 | { |
| @@ -784,7 +784,7 @@ struct font_driver const xftfont_driver = | |||
| 784 | .otf_capability = ftfont_otf_capability, | 784 | .otf_capability = ftfont_otf_capability, |
| 785 | #endif | 785 | #endif |
| 786 | .end_for_frame = xftfont_end_for_frame, | 786 | .end_for_frame = xftfont_end_for_frame, |
| 787 | #if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ) | 787 | #if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ |
| 788 | .shape = xftfont_shape, | 788 | .shape = xftfont_shape, |
| 789 | #endif | 789 | #endif |
| 790 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS | 790 | #ifdef HAVE_OTF_GET_VARIATION_GLYPHS |