diff --git a/ChangeLog b/ChangeLog index dd0a75e04..2238497e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2013-12-28 Werner Lemberg + + [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 [autofit] Add wrapper function for `FT_Get_Char_Index'. diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c index 4c9ee1f21..9d82f947e 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 00c5af3de..e2b9934e4 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 e9b93a229..451636ef7 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 915ca7535..52b67c45d 100644 --- a/src/autofit/hbshim.h +++ b/src/autofit/hbshim.h @@ -30,6 +30,8 @@ #include #include +#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__ */