summaryrefslogtreecommitdiff
path: root/src/autofit/afglobal.h
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2013-12-21 21:31:38 +0100
committerWerner Lemberg <wl@gnu.org>2013-12-21 21:39:04 +0100
commit19241347101203f873b47ddc0c17f7144373a986 (patch)
tree6522d8fefa1f45e533941cf719fad5dc9c495aad /src/autofit/afglobal.h
parentb337fa25cf1ae602a9ba8ac11d2896cc004caa17 (diff)
downloadfreetype2-19241347101203f873b47ddc0c17f7144373a986.tar.gz
Introduce `coverages'.
Coverages are the interface to the HarfBuzz library to access OpenType features for handling glyphs not addressable by the cmap. Right now, compilation of HarfBuzz is only added to the development build. A solution for standard build mode will be delayed until HarfBuzz gets split into two libraries to avoid mutual dependencies between FreeType and HarfBuzz. Note that this is only a first step in handling coverages, basically providing the framework only. Code for handling selected OpenType features (this is, actually using the data in `afcover.h') will follow. * devel/ftoption.h, include/config/ftoption.h (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro. * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h: New files. * src/autofit/afscript.h: Add HarfBuzz script name tags. * src/autofit/afstyles.h: Add default coverage enumeration values. * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros. (AF_Coverage): New enumeration (generated by `afcover.h'). (AF_StyleClassRec): New member `coverage'. (AF_DEFINE_STYLE_CLASS): Updated. * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage data. * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros. (AF_SCRIPT_FALLBACK): Renamed to ... (AF_STYLE_FALLBACK): ... this. * src/autofit/afglobal.c: Include `hbshim.c'. Update use of `SCRIPT' and `STYLE' macros. (af_face_globals_compute_style_coverage) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'. Update. * src/autofit/afmodule.h (AF_ModuleRec): s/fallback_script/fallback_style/. * src/autofit/afmodule.c (af_property_set): Adapt handling of `fallback-script' property to set a fallback style. (af_property_get, af_autofitter_init): Updated. * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros. * src/autofit/afranges.h: Update use of `SCRIPT' macro. * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include `hbshim.c'. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'. (AUTOF_DRV_H): Add `afcover.h'. * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for all libraries needed by FreeType.
Diffstat (limited to 'src/autofit/afglobal.h')
-rw-r--r--src/autofit/afglobal.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h
index b0316e67e..43ce39472 100644
--- a/src/autofit/afglobal.h
+++ b/src/autofit/afglobal.h
@@ -33,7 +33,7 @@ FT_BEGIN_HEADER
#undef SCRIPT
-#define SCRIPT( s, S, d, dc ) \
+#define SCRIPT( s, S, d, h, dc ) \
AF_DECLARE_SCRIPT_CLASS( af_ ## s ## _script_class )
#include "afscript.h"
@@ -43,7 +43,7 @@ FT_BEGIN_HEADER
#undef STYLE
-#define STYLE( s, S, d, ws, sc, ss ) \
+#define STYLE( s, S, d, ws, sc, ss, c ) \
AF_DECLARE_STYLE_CLASS( af_ ## s ## _style_class )
#include "afstyles.h"
@@ -63,11 +63,11 @@ FT_BEGIN_HEADER
* AF_ModuleRec) and face globals (in AF_FaceGlobalsRec).
*/
- /* index of fallback script in `af_style_classes' */
+ /* index of fallback style in `af_style_classes' */
#ifdef AF_CONFIG_OPTION_CJK
-#define AF_SCRIPT_FALLBACK AF_STYLE_HANI_DEFAULT
+#define AF_STYLE_FALLBACK AF_STYLE_HANI_DEFAULT
#else
-#define AF_SCRIPT_FALLBACK AF_STYLE_NONE_DEFAULT
+#define AF_STYLE_FALLBACK AF_STYLE_NONE_DEFAULT
#endif
/* a bit mask indicating an uncovered glyph */
#define AF_STYLE_UNASSIGNED 0x7F