From: handa Date: Mon, 30 Nov 2009 11:46:04 +0000 (+0000) Subject: (mflt_font_id): Use type MFLFont. X-Git-Tag: merge-to-XML~38 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=fd692faa08fa6edc3f74737dfc3814ad5c39a6f0;p=m17n%2Fm17n-lib.git (mflt_font_id): Use type MFLFont. (mflt_iterate_otf_feature): Likewise. --- diff --git a/src/m17n-flt.h b/src/m17n-flt.h index fd15eae..0af01d8 100644 --- a/src/m17n-flt.h +++ b/src/m17n-flt.h @@ -264,16 +264,15 @@ typedef struct unsigned int script, langsys; /* @} */ - /***en Array of GSUB (1st element) and GPOS (2nd element) features. - Each array is terminated by 0. If an element is 0xFFFFFFFF - apply the previous features in that order, and apply all the - other features except those that appear in the following elements. - It may be NULL if there are no features. */ - /***ja GSUB ¥Õ¥£¡¼¥Á¥ã¡¼¤òÂè1Í×ÁÇ¡¢GPOS ¥Õ¥£¡¼¥Á¥ã¡¼¤òÂè2Í×ÁǤȤ¹¤ëÇÛ - Îó¡£³ÆÇÛÎó¤ÎËöÈø¤Ï0¤Ç¼¨¤µ¤ì¤ë¡£¤â¤·¤¢¤ëÍ×ÁǤ¬ 0xFFFFFFFF¤Ê¤é¤Ð¡¢ - °ÊÁ°¤ÎÁ´¥Õ¥£¡¼¥Á¥ã¡¼¤ò¤½¤Î½ç½ø¤ÇŬÍѤ·¡¢¹¹¤Ë°Ê¹ß¤ÎÍ×ÁǤȤ·¤Æ¸½¤ï - ¤ì¤ë¥Õ¥£¥Á¥ã¡¼°Ê³°¤Î¤¹¤Ù¤Æ¤òŬÍѤ¹¤ë¡£¥Õ¥£¡¼¥Á¥ã¡¼¤¬1¤Ä¤â¤Ê¤¤¾ì¹ç - ¤Ï NULL ¤Ç¤â¤è¤¤¡£ */ + /***en Array of GSUB (1st element) and GPOS (2nd element) feature + tag arrays. Each array is terminated by 0. If the first + element is 0xFFFFFFFF, apply all the features except those that + appear in the following elements. It may be NULL if there are + no features. */ + /***ja GSUB ¥Õ¥£¡¼¥Á¥ã¡¼¥¿¥°¤ÎÇÛÎó¤òÂè1Í×ÁÇ¡¢GPOS ¥Õ¥£¡¼¥Á¥ã¡¼¥¿¥°¤Î + ÇÛÎó¤òÂè2Í×ÁǤȤ¹¤ëÇÛÎó¡£³ÆÇÛÎó¤ÎËöÈø¤Ï0¤Ç¼¨¤µ¤ì¤ë¡£¤â¤·ºÇ½é¤ÎÍ× + ÁǤ¬ 0xFFFFFFFF¤Ê¤é¤Ð¡¢°Ê¹ß¤ÎÍ×ÁǤȤ·¤Æ¸½¤ï¤ì¤ë¥Õ¥£¥Á¥ã¡¼°Ê³°¤Î¤¹ + ¤Ù¤Æ¤òŬÍѤ¹¤ë¡£¥Õ¥£¡¼¥Á¥ã¡¼¤¬1¤Ä¤â¤Ê¤¤¾ì¹ç¤Ï NULL ¤Ç¤â¤è¤¤¡£ */ unsigned int *features[2]; } MFLTOtfSpec; @@ -283,13 +282,22 @@ typedef struct @brief Type of font to be used by the FLT driver. The type #MFLTFont is the structure that contains information - about a font used by the FLT driver. */ + about a font used by the FLT driver. Usually, an application + should prepare a bigger structure whose first element is MFLTFont + and has more information about the font that is used by callback + funcitons, and give that structure to mflt functions by coercing + it to MFLTFont. It is assured that callback functions can safely + coerce MFLTFont back to the original structure. */ /***ja @brief FLT ¥É¥é¥¤¥Ð¤¬»È¤¦¥Õ¥©¥ó¥È¤Î·¿. ·¿ #MFLTFont ¤Ï¡¢FLT¥É¥é¥¤¥Ð¤¬»È¤¦¥Õ¥©¥ó¥È¤Ë´Ø¤¹¤ë¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿ - ¤á¤Î¹½Â¤ÂΤǤ¢¤ë¡£ */ + ¤á¤Î¹½Â¤ÂΤǤ¢¤ë¡£Ä̾異¥×¥ê¥±¡¼¥·¥ç¥ó¤ÏºÇ½é¤ÎÍ×ÁǤ¬ MFLTFont ¤Ç¡¢ + »Ä¤ê¤ÎÍ×ÁǤËcallback´Ø¿ô¤¬ÍøÍѤ¹¤ë¥Õ¥©¥ó¥È¾ðÊó¤ò»ý¤Ã¤¿¡¢¤è¤êÂ礭¤Ê + ¹½Â¤ÂΤòÍÑ°Õ¤·¡¢¤½¤ì¤ò MFLTFont ¤Ë coerce ¤·¤Æ mflt ¤Î³Æ´Ø¿ô¤ËÅϤ¹¡£ + ³Æcallback´Ø¿ô¤Ï MFLTFont ¤ò¸µ¤Î¹½Â¤ÂÎ¤Ë coerce ¤·Ä¾¤¹¤³¤È¤¬¤Ç¤­¤ë + ¤³¤È¤¬Êݾڤµ¤ì¤Æ¤¤¤ë¡£ */ typedef struct _MFLTFont { @@ -390,9 +398,9 @@ extern MCharTable *mflt_coverage (MFLT *flt); extern int mflt_run (MFLTGlyphString *gstring, int from, int to, MFLTFont *font, MFLT *flt); -extern MSymbol (*mflt_font_id) (struct _MFLTFont *font); +extern MSymbol (*mflt_font_id) (MFLTFont *font); -extern int (*mflt_iterate_otf_feature) (struct _MFLTFont *font, +extern int (*mflt_iterate_otf_feature) (MFLTFont *font, MFLTOtfSpec *spec, int from, int to, unsigned char *table);