#ifndef _M17N_FLT_H_
#define _M17N_FLT_H_
-#ifndef _M17N_H_
-#include <m17n.h>
+#ifndef _M17N_CORE_H_
+#include <m17n-core.h>
#endif
M17N_BEGIN_HEADER
The type #MFLTOtfSpec is the structure that contains information
about GSUB and GPOS features to be applied to a glyph sequence. */
+typedef struct _MFLTOtfFeatures MFLTOtfFeatures;
+
+struct _MFLTOtfFeatures
+{
+ /***en Number of feature tags stored in the member <tags>. */
+ int count;
+ /***en Array of feature tags. */
+ unsigned int *tags;
+};
+
+/***en
+ @brief Type of information about requested spec of OpenType tables.
+
+ The type #MFLTOtfSpec is the structure that contains information
+ about GSUB and GPOS features of a specific script and language
+ system to be applied to a glyph sequence. */
+
typedef struct _MFLTOtfSpec MFLTOtfSpec;
struct _MFLTOtfSpec
/***en Unique symbol representing the spec. This is the same as the
#OTF-SPEC of the FLT. */
MSymbol sym;
- /***en Tags for script and langsys. */
+ /***en Tags for script and language system. */
unsigned int script, langsys;
- /***en Number of GSUB features stored in the member #gsub. */
- int gsub_count;
- /***en Array of tags of GSUB features. */
- unsigned int *gsub;
- /***en Number of GPOS features stored in the member #gpos. */
- int gpos_count;
- /***en Array of tags of GPOS features. */
- unsigned int *gpos;
+ /***en Array of GSUB (1st element) and GPOS (2nd element)
+ features. */
+ MFLTOtfFeatures gsub_gpos[2];
};
typedef struct _MFLTFont MFLTFont;
/* Horizontal and vertical font sizes in pixel per EM. */
int x_ppem, y_ppem;
- /* If the font is an OpenType font, MFLTFont->otf.sym must be #Mt,
- and the other members must describe available GSUB/GPOS features
- of the specific script and language system for which the font is
- used. Otherwise, MFLTFont->spec.sym must be #Mnil. */
- MFLTOtfSpec otf;
+ /* Callback function to check if the font has OpenType GSUB/GPOS
+ features for a specific script/language. The function must
+ return 1 if the font satisfy SPEC, else return 0. */
+ int (*check_otf) (MFLTFont *font, MFLTOtfSpec *spec);
/* Callback function to get glyph IDs for glyphs between FROM
(inclusive) and TO (exclusive) of GSTRING. If <encoded> member
extern int mflt_run (MFLTGlyphString *gstring, int from, int to,
MFLTFont *font, MFLT *flt);
+#if !defined (FOR_DOXYGEN) || defined (DOXYGEN_INTERNAL_MODULE)
+#define MCHAR_INVALID_CODE 0xFFFFFFFF
+#endif
+
M17N_END_HEADER
#endif /* _M17N_FLT_H_ */