aboutsummaryrefslogtreecommitdiffstats
path: root/src/ftfont.c
diff options
context:
space:
mode:
authorKhaled Hosny2018-12-22 10:13:06 +0200
committerKhaled Hosny2018-12-22 10:22:22 +0200
commit47ed564056a657eb602559576d59cd66734e7234 (patch)
tree1f1fb78e0f23c53da91d48c27d2ff653d895f77f /src/ftfont.c
parent80e0491420a9f645efa6c1438f209f70610c4065 (diff)
downloademacs-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/ftfont.c')
-rw-r--r--src/ftfont.c15
1 files changed, 7 insertions, 8 deletions
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
480static hb_font_t * 481static hb_font_t *
481ftfont_get_hb_font (struct ftfont_info *ftfont_info) 482ftfont_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
492Lisp_Object 492Lisp_Object
493ftfont_get_cache (struct frame *f) 493ftfont_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
2674static hb_unicode_combining_class_t 2674static hb_unicode_combining_class_t
2675uni_combining (hb_unicode_funcs_t *funcs, hb_codepoint_t ch, void *user_data) 2675uni_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
2937Lisp_Object 2936Lisp_Object
2938ftfont_shape (Lisp_Object lgstring) 2937ftfont_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
2962static const char *const ftfont_booleans [] = { 2961static 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