/* m17n-flt.h -- header file for the FLT API of the m17n library.
- Copyright (C) 2007
+ Copyright (C) 2007, 2008, 2009, 2010
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H15PRO112
#if !defined (FOR_DOXYGEN) || defined (DOXYGEN_INTERNAL_MODULE)
-extern void m17n_init_flt (int);
+extern void m17n_init_flt (void);
#undef M17N_INIT
#ifdef _M17N_H_
-#define M17N_INIT() m17n_init_flt (1)
+#define M17N_INIT() \
+ do { \
+ m17n_init (); \
+ if (merror_code == MERROR_NONE) \
+ m17n_init_flt (); \
+ } while (0)
#else /* not _M17N_H_ */
-#define M17N_INIT() m17n_init_flt (0)
+#define M17N_INIT() m17n_init_flt ()
#endif /* not _M17N_H_ */
-extern void m17n_fini_flt (int);
+extern void m17n_fini_flt (void);
#undef M17N_FINI
#ifdef _M17N_H_
-#define M17N_FINI() m17n_fini_flt (1)
+#define M17N_FINI() \
+ do { \
+ m17n_fini_flt (); \
+ m17n_fini (); \
+ } while (0)
#else /* not _M17N_H_ */
-#define M17N_FINI() m17n_fini_flt (0)
+#define M17N_FINI() m17n_fini_flt ()
#endif /* not _M17N_H_ */
#endif
-/***en @defgroup m17nFLT FLT API */
-/***ja @defgroup m17nFLT FLT API */
+/***en @defgroup m17nFLT FLT API
+ @brief API provided by libm17n-flt.so */
+/***ja @defgroup m17nFLT FLT API
+ @brief libm17n-flt.so ¤¬Ä󶡤¹¤ë API */
/*=*/
/*** @addtogroup m17nFLT */
The type #MFLTGlyph is the structure that contains information
about a glyph. */
-typedef struct _MFLTGlyph MFLTGlyph;
+/***ja
+ @brief ¥°¥ê¥Õ¤Ë´Ø¤¹¤ë¾ðÊó¤Î·¿.
-struct _MFLTGlyph
+ ·¿ #MFLTGlyph ¤Ï¡¢¥°¥ê¥Õ¤Ë´Ø¤¹¤ë¾ðÊó¤ò³ÊǼ¤¹¤ë¹½Â¤ÂΤǤ¢¤ë¡£ */
+
+typedef struct
{
- /***en @brief Character code (Unicode) of the glyph. This is the sole
+ /***en Character code (Unicode) of the glyph. This is the sole
member to be set before calling the functions mflt_find () and
mflt_run (). */
+ /***ja ¥°¥ê¥Õ¤Î (Unicode ¤Ë¤ª¤±¤ë) ʸ»ú¥³¡¼¥É¡£´Ø¿ô
+ mflt_find () ¤È mflt_run ()
+ ¤ò¸Æ¤Ó½Ð¤¹Á°¥»¥Ã¥È¤¹¤Ù¤Í£°ì¤Î¥á¥ó¥Ð¡¼¤Ç¤¢¤ë¡£ */
int c;
- /***en Glyph-id of the font of the glyph. */
+ /***en Glyph ID of the glyph in the font. */
+ /***ja ¥Õ¥©¥ó¥ÈÆâ¤Ë¤ª¤±¤ë¤½¤Î¥°¥ê¥Õ¤Î ID¡£ */
unsigned int code;
- /***en Glyph indices indicating the start of the original glyphs. */
+ /***en Starting index of the run in #MFLTGlyphString that is
+ replaced by this glyph. */
+ /***ja #MFLTGlyphString
+ ¤ÎÃæ¤Ç¡¢¤³¤Î¥°¥ê¥Õ¤Ë¤è¤Ã¤ÆÃÖ¤´¹¤¨¤é¤ì¤ëÉôʬ¤ÎÀèƬ¤Î¥¤¥ó¥Ç¥¯¥¹¡£ */
int from;
- /***en Glyph indices indicating the end of the original glyphs. */
+ /***en Ending index of the run in #MFLTGlyphString that is
+ replaced by this glyph. */
+ /***ja #MFLTGlyphString
+ ¤ÎÃæ¤Ç¡¢¤³¤Î¥°¥ê¥Õ¤Ë¤è¤Ã¤ÆÃÖ¤´¹¤¨¤é¤ì¤ëÉôʬ¤ÎËöÈø¤Î¥¤¥ó¥Ç¥¯¥¹¡£ */
int to;
/***en Advance width for horizontal layout expressed in 26.6
fractional pixel format. */
+ /***ja ²£½ñ¤»þ¤ÎÁ÷¤êÉý¤ò 26.6 fractional pixel format ¤Çɽ¸½¤·¤¿¤â¤Î¡£ */
int xadv;
/***en Advance height for vertical layout expressed in 26.6
fractional pixel format. */
+ /***ja ½Ä½ñ¤»þ¤ÎÁ÷¤ê¹â¤ò 26.6 fractional pixel format ¤Çɽ¸½¤·¤¿¤â¤Î¡£ */
int yadv;
+ /* @{ */
/***en Ink metrics of the glyph expressed in 26.6 fractional pixel
format. */
+ /***ja ¤³¤Î¥°¥ê¥Õ¤Î¥¤¥ó¥¯¥á¥È¥ê¥Ã¥¯¤ò 26.6 fractional pixel format
+ ¤Çɽ¸½¤·¤¿¤â¤Î¡£ */
int ascent, descent, lbearing, rbearing;
+ /* @} */
+ /* @{ */
/***en Horizontal and vertical adjustments for the glyph positioning
expressed in 26.6 fractional pixel format. */
+ /***ja ¥°¥ê¥Õ°ÌÃÖ·è¤á¤ÎºÝ¤Î¿åÊ¿¡¦¿âľĴÀ°Ãͤò¡¢
+ 26.6 fractional pixel format ¤Çɽ¸½¤·¤¿¤â¤Î¡£ */
int xoff, yoff;
- /***en Flag to tell if the member <code> is already encoded into a
- glyph ID of a font. */
+ /* @} */
+ /***en Flag to tell whether the member \<code\> has already been set
+ to a glyph ID in the font. */
+ /***ja ¥á¥ó¥Ð¡¼ \<code\> ¤Ë´û¤Ë¥°¥ê¥Õ ID
+ ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤«Èݤ«¤ò¼¨¤¹¥Õ¥é¥°¡£ */
unsigned encoded : 1;
- /***en Flag to tell if the metrics of the glyph (members <xadv> thru
- <rbearing>) are already calculated. */
+ /***en Flag to tell if the metrics of the glyph (members \<xadv\> thru
+ \<rbearing\>) are already calculated. */
+ /***ja ¥á¥ó¥Ð¡¼ \<xadv\> ¤«¤é \<rbearing\>
+ ¤Þ¤Ç¤Î³Æ¥á¥È¥ê¥Ã¥¯¤¬´û¤Ë·×»»ºÑ¤«Èݤ«¤ò¼¨¤¹¥Õ¥é¥°¡£ */
unsigned measured : 1;
/***en Flag to tell if the metrics of the glyph is adjusted,
- i.e. <xadv> or <yadv> is different from the normal size, or
- <xoff> or <yoff> is nonzero. */
+ i.e. \<xadv\> or \<yadv\> is different from the normal size, or
+ \<xoff\> or \<yoff\> is nonzero. */
+ /***ja ¥°¥ê¥Õ¤Î¥á¥È¥ê¥Ã¥¯¤¬Ä´À°ºÑ¤ß¤«Èݤ«¡¢
+ ¤¹¤Ê¤ï¤Á°Ê²¼¤Î¤¦¤Á1¤Ä°Ê¾å¤¬À®Î©¤·¤Æ¤¤¤ë¤³¤È¤ò¼¨¤¹¥Õ¥é¥°¡£
+ \<xadv\> ¤¬É¸½à¤ÎÃͤȰۤʤ롢
+ \<yadv\> ¤¬É¸½à¤ÎÃͤȰۤʤ롢
+ \<xoff\> ¤¬¥¼¥í¤Ç¤Ê¤¤¡¢
+ \<yoff\> ¤¬¥¼¥í¤Ç¤Ê¤¤¡£ */
unsigned adjusted : 1;
/***en For m17n-lib's internal use only. */
+ /***ja m17n-lib ÆâÉôºî¶ÈÍÑ¡£ */
unsigned internal : 30;
/* Arbitrary data can follow. */
-};
+} MFLTGlyph;
/*=*/
The type #MFLTGlyphAdjustment is the structure to store
information about a glyph metrics/position adjustment. It is
- given to the callback function #drive_otf of #MFLTFont. */
+ given to the callback function @b drive_otf of #MFLTFont. */
+
+/***ja
+ @brief ¥°¥ê¥Õ°ÌÃÖÄ´À°¾ðÊó¤Î¤¿¤á¤Î·¿.
-typedef struct _MFLTGlyphAdjustment MFLTGlyphAdjustment;
+ ·¿ #MFLTGlyphAdjustment
+ ¤Ï¡¢¥°¥ê¥Õ¤Î¥á¥È¥ê¥Ã¥¯/°ÌÃÖ¤ÎÄ´À°¤Ë´Ø¤¹¤ë¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Î¹½Â¤ÂΤǤ¢¤ê¡¢
+ #MFLTFont ¤Î callback ´Ø¿ô @b drive_otf ¤ËÅϤµ¤ì¤ë¡£ */
-struct _MFLTGlyphAdjustment
+typedef struct
{
+ /* @{ */
/***en Adjustments for advance width for horizontal layout and
advance height for vertical layout expressed in 26.6 fractional
pixel format. */
+ /***ja ¿åÊ¿¡¦¿âľÊý¸þ¤ÎÁ÷¤êÎ̤ÎÄ´À°Ãͤò 26.6 fractional pixel format
+ ¤Çɽ¸½¤·¤¿¤â¤Î¡£ */
int xadv, yadv;
- /***en Horizontal and vertical adjustments for a glyph positioning
+ /* @} */
+ /* @{ */
+ /***en Horizontal and vertical adjustments for glyph positioning
expressed in 26.6 fractional pixel format. */
+ /***ja ¥°¥ê¥Õ°ÌÃÖ·è¤á¤¿¤á¤Î¿åÊ¿¡¦¿âľĴÀ°Ãͤò 26.6 fractional pixel
+ format ¤Çɽ¸½¤·¤¿¤â¤Î¡£ */
int xoff, yoff;
+ /* @} */
/***en Number of glyphs to go back for drawing a glyph. */
+ /***ja ¥°¥ê¥ÕÉÁ²è¤Î¤¿¤á¤ËÌá¤ë¤Ù¤¥°¥ê¥Õ¿ô¡£ */
short back;
- /***en If nonzero, the member <xadv> and <yadv> are absolute, i.e.,
+ /***en If nonzero, the member \<xadv\> and \<yadv\> are absolute, i.e.,
they should not be added to a glyph's origianl advance width and
height. */
+ /***ja Èó¥¼¥í¤Î¤È¤¡¢¥á¥ó¥Ð¡¼ \<xadv\> ¤È \<yadv\> ¤ÏÀäÂÐÃͤǤ¢¤ë¡£
+ ¤¹¤Ê¤ï¤Á¤½¤ÎÃͤò¥°¥ê¥ÕËÜÍè¤ÎÁ÷¤êÉý¤Ë²Ã»»¤·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£ */
unsigned advance_is_absolute : 1;
/***en Should be set to 1 iff at least one of the other members has
a nonzero value. */
+ /***ja ¾¤Î¥á¥ó¥Ð¡¼¤Î¤¦¤ÁºÇÄã1¸Ä¤¬Èó¥¼¥í¤Î¤È¤¤Î¤ß¡¢1¤Ë¥»¥Ã¥È¤µ¤ì¤ë¡£ */
unsigned set : 1;
-};
+} MFLTGlyphAdjustment;
+
+/*=*/
/***en
@brief Type of information about a glyph sequence.
The type #MFLTGlyphString is the structure that contains
information about a sequence of glyphs. */
-typedef struct _MFLTGlyphString MFLTGlyphString;
+/***ja
+ @brief ¥°¥ê¥ÕÎó¤Î¾ðÊó¤Î¤¿¤á¤Î·¿.
+
+ ·¿ #MFLTGlyphString ¤Ï¡¢¥°¥ê¥ÕÎó¤Î¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Î¹½Â¤ÂΤǤ¢¤ë¡£ */
-struct _MFLTGlyphString
+typedef struct
{
/***en The actual byte size of elements of the array pointed by the
member #glyphs. It must be equal to or greater than "sizeof
(MFLTGlyph)". */
+ /***ja ¥á¥ó¥Ð¡¼ #glyphs ¤Î»Ø¤¹ÇÛÎó¤ÎÍ×ÁǤ¬Àê¤á¤ë¼Â¥Ð¥¤¥È¿ô¡£
+ ¤³¤ÎÃÍ¤Ï "sizeof (MFLTGlyph)" °Ê¾å¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ */
int glyph_size;
/***en Array of glyphs. */
+ /***ja ¥°¥ê¥Õ¤ÎÇÛÎó¡£ */
MFLTGlyph *glyphs;
- /***en How many elements are allocated in #glyphs. */
+ /***en Number of elements allocated in #glyphs. */
+ /***ja #glyphs Æâ¤ËÇÛÃÖ¤µ¤ì¤Æ¤¤¤ëÍ×ÁǤοô¡£ */
int allocated;
- /***en How many elements in #glyphs are in use. */
+ /***en Number of elements in #glyphs in use. */
+ /***ja #glyphs Æâ¤Ç»ÈÍÑÃæ¤ÎÍ×ÁǤοô¡£ */
int used;
/***en Flag to tell if the glyphs should be drawn from right-to-left
or not. */
+ /***ja ¥°¥ê¥Õ¤¬±¦¤«¤éº¸¤Ø¤ÈÉÁ¤«¤ì¤ë¤Ù¤¤«Èݤ«¤ò¼¨¤¹¥Õ¥é¥°¡£ */
unsigned int r2l;
-};
+} MFLTGlyphString;
+
+/*=*/
/***en
@brief Type of specification of GSUB and GPOS OpenType tables.
The type #MFLTOtfSpec is the structure that contains information
- about GSUB and GPOS features of a specific script and language
+ about the GSUB and GPOS features of a specific script and language
system to be applied to a glyph sequence. */
-typedef struct _MFLTOtfSpec MFLTOtfSpec;
+/***ja
+ @brief GSUB ¤ª¤è¤Ó GPOS OpenType ¥Æ¡¼¥Ö¥ë¤Î»ÅÍͤΤ¿¤á¤Î·¿.
+
+ ·¿ #MFLTOtfSpec ¤Ï¡¢GSUB ¤ª¤è¤Ó GPOS¥Õ¥£¡¼¥Á¥ã¡¼¤Î¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿
+ ¤á¤Î¹½Â¤ÂΤǤ¢¤ë¡£¤³¤ì¤é¥Õ¥£¡¼¥Á¥ã¡¼¤ÏÆÃÄê¤Î¥¹¥¯¥ê¥×¥È¤ª¤è¤Ó¸À¸ì¥·
+ ¥¹¥Æ¥à¤Î¤â¤Î¤Ç¤¢¤ê¡¢¥°¥ê¥ÕÎó¤ËŬÍѤµ¤ì¤ë¡£ */
-struct _MFLTOtfSpec
+typedef struct
{
/***en Unique symbol representing the spec. This is the same as the
- #OTF-SPEC of the FLT. */
+ @ref OTF-SPEC of the FLT. */
+ /***ja ¤³¤Î»ÅÍͤòɽ¤ï¤¹¥æ¥Ë¡¼¥¯¤Ê¥·¥ó¥Ü¥ë¡£
+ FLT ¤Î @ref OTF-SPEC ¤ÈƱ°ì¤ÎÃͤǤ¢¤ë¡£ */
MSymbol sym;
+ /* @{ */
/***en Tags for script and language system. */
+ /***ja ¥¹¥¯¥ê¥×¥È¤ª¤è¤Ó¸À¸ì¥·¥¹¥Æ¥à¤Î¥¿¥°¡£ */
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 appearing in the following elements.
- It may be NULL if there's no feature. */
+ /* @} */
+
+ /***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;
+
+/*=*/
/***en
@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. */
-
-typedef struct _MFLTFont MFLTFont;
-
-struct _MFLTFont
+ 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
{
/***en Family name of the font. It may be #Mnil if the family name
is not important in finding a Font Layout Table suitable for the
font (for instance, in the case that the font is an OpenType
font). */
+ /***ja ¥Õ¥©¥ó¥È¤Î¥Õ¥¡¥ß¥ê¡¼Ì¾¡£¥Õ¥©¥ó¥È¤ËŬ¤·¤¿ FLT¤òõ¤¹ºÝ¤Ë½ÅÍפǤÊ
+ ¤¤¾ì¹ç (¤¿¤È¤¨¤Ð OpenType¥Õ¥©¥ó¥È¤Î¾ì¹ç¤Ê¤É) ¤Ï¡¢#Mnil ¤Ç¤è¤¤¡£ */
MSymbol family;
- /***en Horizontal and vertical font sizes in pixel per EM. */
- int x_ppem, y_ppem;
+ /***en Horizontal font sizes in pixels per EM. */
+ /***ja ¥Õ¥©¥ó¥È¤Î¿åÊ¿¥µ¥¤¥º¤ò pixels per EM ¤Çɽ¸½¤·¤¿¤â¤Î¡£ */
+ int x_ppem;
+ /***en Vertical font sizes in pixels per EM. */
+ /***ja ¥Õ¥©¥ó¥È¤Î¿âľ¥µ¥¤¥º¤ò pixels per EM ¤Çɽ¸½¤·¤¿¤â¤Î¡£ */
+ int y_ppem;
/***en Callback function to get glyph IDs for glyphs between FROM
- (inclusive) and TO (exclusive) of GSTRING. If <encoded> member
- of a glyph is zero, the <code> member of the glyph is a character
+ (inclusive) and TO (exclusive) of GSTRING. If the member \<encoded\>
+ of a glyph is zero, the member \<code\> of that glyph is a character
code. The function must convert it to the glyph ID of FONT. */
- int (*get_glyph_id) (MFLTFont *font, MFLTGlyphString *gstring,
+ /***ja GSTRING Æâ¤Î FROM ¤«¤é TO ľÁ°¤Þ¤Ç¤Î³Æ¥°¥ê¥Õ¤ËÂбþ¤¹¤ë¥°¥ê¥Õ
+ ID¤ò¼èÆÀ¤¹¤ë¤¿¤á¤Î callback ´Ø¿ô¡£¤â¤·¤¢¤ë¥°¥ê¥Õ¤Î¥á¥ó¥Ð¡¼
+ \<encoded\>¤¬¥¼¥í¤Ê¤é¤Ð¡¢¤½¤Î¥°¥ê¥Õ¤Î¥á¥ó¥Ð¡¼ \<code\> ¤Ïʸ»ú¥³¡¼¥É¤Ç
+ ¤¢¤ë¡£¤³¤Î´Ø¿ô¤Ï¤½¤Îʸ»ú¥³¡¼¥É¤ò FONT ¤Î¥°¥ê¥Õ ID¤ËÊÑ´¹¤·¤Ê¤¯¤Æ¤Ï
+ ¤Ê¤é¤Ê¤¤¡£ */
+ int (*get_glyph_id) (struct _MFLTFont *font, MFLTGlyphString *gstring,
int from, int to);
- /*** Callback function to get metrics of glyphs between FROM
- (inclusive) and TO (exclusive) of GSTRING. If <measured> member
- of a glyph is zero, the function must set members <xadv>, <yadv>,
- <ascent>, <descent>, <lbearing>, and <rbearing> of the glyph. */
- int (*get_metrics) (MFLTFont *font, MFLTGlyphString *gstring,
+ /***en Callback function to get metrics of glyphs between FROM
+ (inclusive) and TO (exclusive) of GSTRING. If the member \<measured\>
+ of a glyph is zero, the function must set the members \<xadv\>, \<yadv\>,
+ \<ascent\>, \<descent\>, \<lbearing\>, and \<rbearing\> of the glyph. */
+ /***ja GSTRING Æâ¤Î FROM ¤«¤é TOľÁ°¤Þ¤Ç¤Î³Æ¥°¥ê¥Õ¤ËÂбþ¤¹¤ë¥á¥È¥ê¥Ã
+ ¥¯¤ò¼èÆÀ¤¹¤ë¤¿¤á¤Î callback ´Ø¿ô¡£¤â¤·¤¢¤ë¥°¥ê¥Õ¤Î¥á¥ó¥Ð¡¼
+ \<measured\>¤¬¥¼¥í¤Ê¤é¤Ð¡¢¤³¤Î´Ø¿ô¤Ï¤½¤Î¥°¥ê¥Õ¤Î¥á¥ó¥Ð¡¼ \<xadv\>,
+ \<yadv\>, \<ascent\>, \<descent\>, \<lbearing\>, ¤ª¤è¤Ó \<rbearing\>¤ò¥»¥Ã
+ ¥È¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ */
+ int (*get_metrics) (struct _MFLTFont *font, MFLTGlyphString *gstring,
int from, int to);
/***en 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. It must be
- NULL if the font doesn't have OpenType tables. */
- int (*check_otf) (MFLTFont *font, MFLTOtfSpec *spec);
-
- /*** Callback function to apply OpenType features in SPEC to glyphs
+ return 1, if the font satisfies SPEC, or 0. It must be
+ NULL if the font does not have OpenType tables. */
+ /***ja ¥Õ¥©¥ó¥È¤¬¤¢¤ëÆÃÄê¤Î¥¹¥¯¥ê¥×¥È/¸À¸ì¤ËÂФ¹¤ë GSUB/GPOS
+ OpenType¥Õ¥£¡¼¥Á¥ã¡¼¤ò»ý¤Ä¤«Èݤ«¤òÄ´¤Ù¤ë callback ´Ø¿ô¡£¤³¤Î´Ø¿ô
+ ¤Ï¥Õ¥©¥ó¥È¤¬SPEC ¤òËþ¤¿¤¹¤È¤¤Ï 1 ¤ò¡¢¤½¤¦¤Ç¤Ê¤¤¤È¤¤Ï 0¤òÊÖ¤µ¤Ê
+ ¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¥Õ¥©¥ó¥È¤¬ OpenType ¥Æ¡¼¥Ö¥ë¤ò»ý¤¿¤Ê¤¤¤È¤¤ÏNULL
+ ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ */
+ int (*check_otf) (struct _MFLTFont *font, MFLTOtfSpec *spec);
+
+ /***en Callback function to apply OpenType features in SPEC to glyphs
between FROM (inclusive) and TO (exclusive) of IN. The resulting
- glyphs should be appended to the tail of OUT. If OUT doesn't
- have a room to store all resulting glyphs, it must return -2.
- It must be NULL if the font doesn't have OpenType tables. */
- int (*drive_otf) (MFLTFont *font, MFLTOtfSpec *spec,
+ glyphs are appended to the tail of OUT. If OUT does not
+ have a room to store all the resulting glyphs, it must return -2.
+ It must be NULL if the font does not have OpenType tables. */
+ /***ja IN Æâ¤Î FROM ¤«¤é TO ľÁ°¤Þ¤Ç¤Î³Æ¥°¥ê¥Õ¤Ë SPECÆâ¤Î³Æ OpenType
+ ¥Õ¥£¡¼¥Á¥ã¡¼¤òŬÍѤ¹¤ë¤¿¤á¤Î callback ´Ø¿ô¡£Å¬ÍÑ·ë²Ì¤Î¥°¥ê¥ÕÎó¤Ï
+ OUT ¤ÎËöÈø¤ËÄɲ䵤ì¤ë¡£OUT ¤¬Ã»¤«²á¤®¤Æ·ë²Ì¤òÄɲä·ÀÚ¤ì¤Ê¤¤¾ì¹ç
+ ¤Ï -2 ¤òÊÖ¤µ¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£¥Õ¥©¥ó¥È¤¬ OpenType ¥Æ¡¼¥Ö¥ë¤ò»ý¤¿
+ ¤Ê¤¤¾ì¹ç¤Ï NULL¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ */
+ int (*drive_otf) (struct _MFLTFont *font, MFLTOtfSpec *spec,
MFLTGlyphString *in, int from, int to,
MFLTGlyphString *out, MFLTGlyphAdjustment *adjustment);
/***en For m17n-lib's internal use only. It should be initialized
to NULL. */
+ /***ja m17n-lib ¤ÎÆâÉôºî¶ÈÍÑ¡£NULL ¤Ë½éÃͲ½¤µ¤ì¤ë¡£ */
void *internal;
-};
+} MFLTFont;
+
+/*=*/
/***en
@brief Type of FLT (Font Layout Table).
- The type #MFLT is for a FLT object. Its internal structure is
- concealed from application program. */
+ The type #MFLT is for an FLT object. Its internal structure is
+ concealed from application programs. */
+
+/***ja
+ @brief FLT (Font Layout Table) ¤Î·¿.
+
+ ·¿ #MFLT ¤Ï FLT ¥ª¥Ö¥¸¥§¥¯¥È¤Î¤¿¤á¤Î·¿¤Ç¤¢¤ë¡£
+ ¤³¤ÎÆâÉô¹½Â¤¤Ï¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤«¤é¤Ï±£Ê䵤ì¤Æ¤¤¤ë¡£ */
typedef struct _MFLT MFLT;
extern int mflt_run (MFLTGlyphString *gstring, int from, int to,
MFLTFont *font, MFLT *flt);
+extern int mflt_enable_new_feature;
+
+extern MSymbol (*mflt_font_id) (MFLTFont *font);
+
+extern int (*mflt_iterate_otf_feature) (MFLTFont *font,
+ MFLTOtfSpec *spec,
+ int from, int to,
+ unsigned char *table);
+
+extern int (*mflt_try_otf) (struct _MFLTFont *font, MFLTOtfSpec *spec,
+ MFLTGlyphString *gstring, int from, int to);
+
/*=*/
/*** @} */