ref: 072dc45d270f50cfdaaf831f7a883c8b1dfb4a5b
parent: 17af586e0589df2c0bded15c13b5da24873426ab
author: Werner Lemberg <[email protected]>
date: Sat Dec 28 07:26:21 EST 2013
[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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2013-12-28 Werner Lemberg <[email protected]>
+ [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 <[email protected]>
+
[autofit] Add wrapper function for `FT_Get_Char_Index'.
Yet-to-come changes will provide HarfBuzz functionality for the new
--- 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 */
--- 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"
--- 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 )
--- a/src/autofit/hbshim.h
+++ b/src/autofit/hbshim.h
@@ -30,7 +30,9 @@
#include <hb-ot.h>
#include <hb-ft.h>
+#endif
+
FT_BEGIN_HEADER
FT_Error
@@ -45,15 +47,6 @@
/* */
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__ */