From: handa Date: Fri, 12 Oct 2007 05:45:31 +0000 (+0000) Subject: Include m17n-core.h instead of m17n.h. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cc4e59c9cd79701a3b00dcc641e760aebe09ee28;p=m17n%2Fm17n-lib.git Include m17n-core.h instead of m17n.h. (struct _MFLTOtfFeatures): New struct. (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos. (struct _MFLTFont): Delete otf, add check_otf. (MCHAR_INVALID_CODE): Define it. --- diff --git a/src/m17n-flt.h b/src/m17n-flt.h index f8aa48d..083e722 100644 --- a/src/m17n-flt.h +++ b/src/m17n-flt.h @@ -23,8 +23,8 @@ #ifndef _M17N_FLT_H_ #define _M17N_FLT_H_ -#ifndef _M17N_H_ -#include +#ifndef _M17N_CORE_H_ +#include #endif M17N_BEGIN_HEADER @@ -146,6 +146,23 @@ struct _MFLTGlyphString 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 . */ + 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 @@ -153,16 +170,11 @@ 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; @@ -178,11 +190,10 @@ struct _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 member @@ -221,6 +232,10 @@ extern MCharTable *mflt_coverage (MFLT *flt); 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_ */