[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.
This commit is contained in:
Werner Lemberg 2013-12-28 12:26:21 +01:00
parent 17af586e05
commit 072dc45d27
5 changed files with 30 additions and 13 deletions

View File

@ -1,3 +1,18 @@
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'.

View File

@ -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 */

View File

@ -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"

View File

@ -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 )

View File

@ -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__ */