]> git.eshelyaron.com Git - emacs.git/commitdiff
Properly fix building with HarfBuzz and without libotf
authorKhaled Hosny <khaledhosny@eglug.org>
Sat, 22 Dec 2018 08:13:06 +0000 (10:13 +0200)
committerKhaled Hosny <khaledhosny@eglug.org>
Sat, 22 Dec 2018 08:22:22 +0000 (10:22 +0200)
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.

src/ftcrfont.c
src/ftfont.c
src/ftxfont.c
src/xftfont.c

index ae5b0a92eeeed482f19bc7329799e81d75806580..95ff89328d61af0872b775e47eb0c9351eb857ec 100644 (file)
@@ -302,7 +302,7 @@ struct font_driver const ftcrfont_driver =
 #ifdef HAVE_LIBOTF
   .otf_capability = ftfont_otf_capability,
 #endif
-#if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ)
+#if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ
   .shape = ftfont_shape,
 #endif
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
index 8476a74854c7e74be58cd0902e4a9eafb91e15e1..43a3e46e5783f9a51470378444a42161fec39e58 100644 (file)
@@ -474,8 +474,9 @@ ftfont_get_otf (struct ftfont_info *ftfont_info)
   ftfont_info->otf = otf;
   return otf;
 }
+#endif /* HAVE_LIBOTF */
 
-# ifdef HAVE_HARFBUZZ
+#ifdef HAVE_HARFBUZZ
 
 static hb_font_t *
 ftfont_get_hb_font (struct ftfont_info *ftfont_info)
@@ -486,8 +487,7 @@ ftfont_get_hb_font (struct ftfont_info *ftfont_info)
   return ftfont_info->hb_font;
 }
 
-# endif        /* HAVE_HARFBUZZ */
-#endif /* HAVE_LIBOTF */
+#endif /* HAVE_HARFBUZZ */
 
 Lisp_Object
 ftfont_get_cache (struct frame *f)
@@ -2670,7 +2670,7 @@ ftfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
 #endif /* HAVE_LIBOTF */
 
 #ifdef HAVE_HARFBUZZ
-#ifdef HAVE_LIBOTF
+
 static hb_unicode_combining_class_t
 uni_combining (hb_unicode_funcs_t *funcs, hb_codepoint_t ch, void *user_data)
 {
@@ -2929,10 +2929,9 @@ done:
   return make_fixnum (glyph_len);
 }
 
-#endif /* HAVE_LIBOTF */
 #endif /* HAVE_HARFBUZZ */
 
-#if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ)
+#if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ
 
 Lisp_Object
 ftfont_shape (Lisp_Object lgstring)
@@ -2957,7 +2956,7 @@ ftfont_shape (Lisp_Object lgstring)
     }
 }
 
-#endif /* HAVE_LIBOTF && (HAVE_M17N_FLT || defined HAVE_HARFBUZZ) */
+#endif /* (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ */
 
 static const char *const ftfont_booleans [] = {
   ":antialias",
@@ -3038,7 +3037,7 @@ static struct font_driver const ftfont_driver =
 #ifdef HAVE_LIBOTF
   .otf_capability = ftfont_otf_capability,
 #endif
-#if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ)
+#if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ
   .shape = ftfont_shape,
 #endif
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
index a30b07636e6847df4cd49f8a1a6b1bec500fbd0a..66fd9abf5305ad1f97c3ccc686f1e9e044c70461 100644 (file)
@@ -359,7 +359,7 @@ struct font_driver const ftxfont_driver =
   .otf_capability = ftfont_otf_capability,
 #endif
   .end_for_frame = ftxfont_end_for_frame,
-#if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ)
+#if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ
   .shape = ftfont_shape,
 #endif
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
index 5111936f3e749d6ed4db97d1c25e4ebce8e6fcb3..56d0e30e24c834c705afed028026ae6984f8f417 100644 (file)
@@ -672,7 +672,7 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y,
   return len;
 }
 
-#if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ)
+#if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ
 static Lisp_Object
 xftfont_shape (Lisp_Object lgstring)
 {
@@ -784,7 +784,7 @@ struct font_driver const xftfont_driver =
   .otf_capability = ftfont_otf_capability,
 #endif
   .end_for_frame = xftfont_end_for_frame,
-#if defined HAVE_LIBOTF && (defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ)
+#if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ
   .shape = xftfont_shape,
 #endif
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS