[autofit] Code shuffling to reduce use of cpp macros. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Call `af_get_coverage' unconditionally. * src/autofit/autofit.c: Include `hbshim.c' unconditionally. * src/autofit/hbshim.c (af_get_coverage) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function. * src/autofit/hbshim.h: Provide function declarations unconditionally.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
diff --git a/ChangeLog b/ChangeLog
index dd0a75e..2238497 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2013-12-28 Werner Lemberg <wl@gnu.org>
+ [autofit] Code shuffling to reduce use of cpp macros.
+
+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
+ Call `af_get_coverage' unconditionally.
+
+ * src/autofit/autofit.c: Include `hbshim.c' unconditionally.
+
+ * src/autofit/hbshim.c (af_get_coverage)
+ [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function.
+
+ * src/autofit/hbshim.h: Provide function declarations
+ unconditionally.
+
+2013-12-28 Werner Lemberg <wl@gnu.org>
+
[autofit] Add wrapper function for `FT_Get_Char_Index'.
Yet-to-come changes will provide HarfBuzz functionality for the new
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 4c9ee1f..9d82f94 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -193,10 +193,8 @@
}
}
-#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
/* get glyphs not directly addressable by cmap */
af_get_coverage( globals, style_class, gstyles );
-#endif
}
/* mark ASCII digits */
diff --git a/src/autofit/autofit.c b/src/autofit/autofit.c
index 00c5af3..e2b9934 100644
--- a/src/autofit/autofit.c
+++ b/src/autofit/autofit.c
@@ -34,9 +34,7 @@
#include "afcjk.c"
#include "afindic.c"
-#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
#include "hbshim.c"
-#endif
#include "afloader.c"
#include "afmodule.c"
diff --git a/src/autofit/hbshim.c b/src/autofit/hbshim.c
index e9b93a2..451636e 100644
--- a/src/autofit/hbshim.c
+++ b/src/autofit/hbshim.c
@@ -294,6 +294,19 @@
#else /* !FT_CONFIG_OPTION_USE_HARDBUZZ */
+ FT_Error
+ af_get_coverage( AF_FaceGlobals globals,
+ AF_StyleClass style_class,
+ FT_Byte* gstyles )
+ {
+ FT_UNUSED( globals );
+ FT_UNUSED( style_class );
+ FT_UNUSED( gstyles );
+
+ return FT_Err_Ok;
+ }
+
+
FT_UInt
af_get_char_index( AF_StyleMetrics metrics,
FT_ULong charcode )
diff --git a/src/autofit/hbshim.h b/src/autofit/hbshim.h
index 915ca75..52b67c4 100644
--- a/src/autofit/hbshim.h
+++ b/src/autofit/hbshim.h
@@ -30,6 +30,8 @@
#include <hb-ot.h>
#include <hb-ft.h>
+#endif
+
FT_BEGIN_HEADER
@@ -46,15 +48,6 @@ FT_BEGIN_HEADER
FT_END_HEADER
-
-#else /* !FT_CONFIG_OPTION_USE_HARFBUZZ */
-
- FT_UInt
- af_get_char_index( AF_StyleMetrics metrics,
- FT_ULong charcode );
-
-#endif /* !FT_CONFIG_OPTION_USE_HARFBUZZ */
-
#endif /* __HBSHIM_H__ */