emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] harfbuzz 47ed564: Properly fix building with HarfBuzz and


From: Khaled Hosny
Subject: [Emacs-diffs] harfbuzz 47ed564: Properly fix building with HarfBuzz and without libotf
Date: Sat, 22 Dec 2018 03:24:07 -0500 (EST)

branch: harfbuzz
commit 47ed564056a657eb602559576d59cd66734e7234
Author: Khaled Hosny <address@hidden>
Commit: Khaled Hosny <address@hidden>

    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.
---
 src/ftcrfont.c |  2 +-
 src/ftfont.c   | 15 +++++++--------
 src/ftxfont.c  |  2 +-
 src/xftfont.c  |  4 ++--
 4 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index ae5b0a9..95ff893 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -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
diff --git a/src/ftfont.c b/src/ftfont.c
index 8476a74..43a3e46 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -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
diff --git a/src/ftxfont.c b/src/ftxfont.c
index a30b076..66fd9ab 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -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
diff --git a/src/xftfont.c b/src/xftfont.c
index 5111936..56d0e30 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,
   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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]