665d8936df9abaec38192b4b648e281b961181c8
[m17n/m17n-lib.git] / src / m17n-flt.h
1 /* m17n-flt.h -- header file for the FLT API of the m17n library.
2    Copyright (C) 2007
3      National Institute of Advanced Industrial Science and Technology (AIST)
4      Registration Number H15PRO112
5
6    This file is part of the m17n library.
7
8    The m17n library is free software; you can redistribute it and/or
9    modify it under the terms of the GNU Lesser General Public License
10    as published by the Free Software Foundation; either version 2.1 of
11    the License, or (at your option) any later version.
12
13    The m17n library is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    Lesser General Public License for more details.
17
18    You should have received a copy of the GNU Lesser General Public
19    License along with the m17n library; if not, write to the Free
20    Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21    02111-1307, USA.  */
22
23 #ifndef _M17N_FLT_H_
24 #define _M17N_FLT_H_
25
26 #ifndef _M17N_CORE_H_
27 #include <m17n-core.h>
28 #endif
29
30 M17N_BEGIN_HEADER
31
32 #if !defined (FOR_DOXYGEN) || defined (DOXYGEN_INTERNAL_MODULE)
33
34 extern void m17n_init_flt (void);
35 #undef M17N_INIT
36 #ifdef _M17N_H_
37 #define M17N_INIT()                     \
38   do {                                  \
39     m17n_init ();                       \
40     if (merror_code == MERROR_NONE)     \
41       m17n_init_flt ();                 \
42   } while (0)
43 #else  /* not _M17N_H_ */
44 #define M17N_INIT() m17n_init_flt ()
45 #endif  /* not _M17N_H_ */
46
47 extern void m17n_fini_flt (void);
48 #undef M17N_FINI
49 #ifdef _M17N_H_
50 #define M17N_FINI()     \
51   do {                  \
52     m17n_fini_flt ();   \
53     m17n_fini ();       \
54   } while (0)
55 #else  /* not _M17N_H_ */
56 #define M17N_FINI() m17n_fini_flt ()
57 #endif  /* not _M17N_H_ */
58
59 #endif
60
61 /***en @defgroup m17nFLT FLT API */
62 /***ja @defgroup m17nFLT FLT API */
63 /*=*/
64
65 /*** @addtogroup m17nFLT */
66 /*** @{ */
67 /*=*/
68
69 /***en
70     @brief Type of information about a glyph.
71
72     The type #MFLTGlyph is the structure that contains information
73     about a glyph.  */
74
75 /***ja
76     @brief ¥°¥ê¥Õ¤Ë´Ø¤¹¤ë¾ðÊó¤Î·¿.
77
78     ·¿ #MFLTGlyph ¤Ï¡¢¥°¥ê¥Õ¤Ë´Ø¤¹¤ë¾ðÊó¤ò³ÊǼ¤¹¤ë¹½Â¤ÂΤǤ¢¤ë¡£  */
79
80 typedef struct
81 {
82   /***en Character code (Unicode) of the glyph.  This is the sole
83       member to be set before calling the functions mflt_find () and
84       mflt_run ().  */
85   /***ja ¥°¥ê¥Õ¤Î (Unicode ¤Ë¤ª¤±¤ë) Ê¸»ú¥³¡¼¥É¡£´Ø¿ô
86       mflt_find () ¤È mflt_run ()
87       ¤ò¸Æ¤Ó½Ð¤¹Á°¥»¥Ã¥È¤¹¤Ù¤­Í£°ì¤Î¥á¥ó¥Ð¡¼¤Ç¤¢¤ë¡£  */
88   int c;
89   /***en Glyph ID of the glyph in the font.  */
90   /***ja ¥Õ¥©¥ó¥ÈÆâ¤Ë¤ª¤±¤ë¤½¤Î¥°¥ê¥Õ¤Î ID¡£  */
91   unsigned int code;
92   /***en Starting index of the run in #MFLTGlyphString that is
93       replaced by this glyph.  */
94   /***ja #MFLTGlyphString
95       ¤ÎÃæ¤Ç¡¢¤³¤Î¥°¥ê¥Õ¤Ë¤è¤Ã¤ÆÃÖ¤­´¹¤¨¤é¤ì¤ëÉôʬ¤ÎÀèƬ¤Î¥¤¥ó¥Ç¥¯¥¹¡£  */
96   int from;
97   /***en Ending index of the run in #MFLTGlyphString that is
98       replaced by this glyph.  */
99   /***ja #MFLTGlyphString
100       ¤ÎÃæ¤Ç¡¢¤³¤Î¥°¥ê¥Õ¤Ë¤è¤Ã¤ÆÃÖ¤­´¹¤¨¤é¤ì¤ëÉôʬ¤ÎËöÈø¤Î¥¤¥ó¥Ç¥¯¥¹¡£  */
101   int to;
102   /***en Advance width for horizontal layout expressed in 26.6
103       fractional pixel format.  */
104   /***ja ²£½ñ¤­»þ¤ÎÁ÷¤êÉý¤ò 26.6 fractional pixel format ¤Çɽ¸½¤·¤¿¤â¤Î¡£  */
105   int xadv;
106   /***en Advance height for vertical layout expressed in 26.6
107       fractional pixel format.  */
108   /***ja ½Ä½ñ¤­»þ¤ÎÁ÷¤ê¹â¤ò 26.6 fractional pixel format ¤Çɽ¸½¤·¤¿¤â¤Î¡£  */
109   int yadv;
110   /***en Ink metrics of the glyph expressed in 26.6 fractional pixel
111       format.  */
112   /***ja ¤³¤Î¥°¥ê¥Õ¤Î¥¤¥ó¥¯¥á¥È¥ê¥Ã¥¯¤ò 26.6 fractional pixel format
113       ¤Çɽ¸½¤·¤¿¤â¤Î¡£  */
114   int ascent, descent, lbearing, rbearing;
115   /***en Horizontal and vertical adjustments for the glyph positioning
116       expressed in 26.6 fractional pixel format.  */
117   /***ja ¥°¥ê¥Õ°ÌÃÖ·è¤á¤ÎºÝ¤Î¿åÊ¿¡¦¿âľĴÀ°Ãͤò¡¢
118       26.6 fractional pixel format ¤Çɽ¸½¤·¤¿¤â¤Î¡£  */
119   int xoff, yoff;
120   /***en Flag to tell whether the member <code> has already been set
121       to a glyph ID in the font.  */
122   /***ja ¥á¥ó¥Ð¡¼ <code> ¤Ë´û¤Ë¥°¥ê¥Õ ID
123       ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤«Èݤ«¤ò¼¨¤¹¥Õ¥é¥°¡£  */
124   unsigned encoded : 1;
125   /***en Flag to tell if the metrics of the glyph (members <xadv> thru
126       <rbearing>) are already calculated.  */
127   /***ja ¥á¥ó¥Ð¡¼ <xadv> ¤«¤é <rbearing>
128       ¤Þ¤Ç¤Î³Æ¥á¥È¥ê¥Ã¥¯¤¬´û¤Ë·×»»ºÑ¤«Èݤ«¤ò¼¨¤¹¥Õ¥é¥°¡£  */
129   unsigned measured : 1;
130   /***en Flag to tell if the metrics of the glyph is adjusted,
131       i.e. <xadv> or <yadv> is different from the normal size, or
132       <xoff> or <yoff> is nonzero.  */
133   /***ja ¥°¥ê¥Õ¤Î¥á¥È¥ê¥Ã¥¯¤¬Ä´À°ºÑ¤ß¤«Èݤ«¡¢
134       ¤¹¤Ê¤ï¤Á°Ê²¼¤Î¤¦¤Á1¤Ä°Ê¾å¤¬À®Î©¤·¤Æ¤¤¤ë¤³¤È¤ò¼¨¤¹¥Õ¥é¥°¡£
135       <xadv> ¤¬É¸½à¤ÎÃͤȰۤʤ롢
136       <yadv> ¤¬É¸½à¤ÎÃͤȰۤʤ롢
137       <xoff> ¤¬¥¼¥í¤Ç¤Ê¤¤¡¢
138       <yoff> ¤¬¥¼¥í¤Ç¤Ê¤¤¡£  */
139   unsigned adjusted : 1;
140   /***en For m17n-lib's internal use only.  */
141   /***ja m17n-lib ÆâÉôºî¶ÈÍÑ¡£  */
142   unsigned internal : 30;
143
144   /* Arbitrary data can follow.  */
145 } MFLTGlyph;
146
147 /*=*/
148
149 /***en
150     @brief Type of information about a glyph position adjustment.
151
152     The type #MFLTGlyphAdjustment is the structure to store
153     information about a glyph metrics/position adjustment.  It is
154     given to the callback function #drive_otf of #MFLTFont.  */
155
156 /***ja
157     @brief ¥°¥ê¥Õ°ÌÃÖÄ´À°¾ðÊó¤Î¤¿¤á¤Î·¿.
158
159     ·¿ #MFLTGlyphAdjustment
160     ¤Ï¡¢¥°¥ê¥Õ¤Î¥á¥È¥ê¥Ã¥¯/°ÌÃÖ¤ÎÄ´À°¤Ë´Ø¤¹¤ë¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Î¹½Â¤ÂΤǤ¢¤ê¡¢
161     #MFLTFont ¤Î callback ´Ø¿ô #drive_otf ¤ËÅϤµ¤ì¤ë¡£  */
162
163 typedef struct
164 {
165   /***en Adjustments for advance width for horizontal layout and
166       advance height for vertical layout expressed in 26.6 fractional
167       pixel format.  */
168   /***ja ¿åÊ¿¡¦¿âľÊý¸þ¤ÎÁ÷¤êÎ̤ÎÄ´À°Ãͤò 26.6 fractional pixel format
169       ¤Çɽ¸½¤·¤¿¤â¤Î¡£  */
170   int xadv, yadv;
171   /***en Horizontal and vertical adjustments for glyph positioning
172       expressed in 26.6 fractional pixel format.  */
173   /***ja ¥°¥ê¥Õ°ÌÃÖ·è¤á¤¿¤á¤Î¿åÊ¿¡¦¿âľĴÀ°Ãͤò 26.6 fractional pixel
174       format ¤Çɽ¸½¤·¤¿¤â¤Î¡£  */
175   int xoff, yoff;
176   /***en Number of glyphs to go back for drawing a glyph.  */
177   /***ja ¥°¥ê¥ÕÉÁ²è¤Î¤¿¤á¤ËÌá¤ë¤Ù¤­¥°¥ê¥Õ¿ô¡£  */
178   short back;
179   /***en If nonzero, the member <xadv> and <yadv> are absolute, i.e.,
180       they should not be added to a glyph's origianl advance width and
181       height.  */
182   /***ja Èó¥¼¥í¤Î¤È¤­¡¢¥á¥ó¥Ð¡¼ <xadv> ¤È <yadv> ¤ÏÀäÂÐÃͤǤ¢¤ë¡£
183       ¤¹¤Ê¤ï¤Á¤½¤ÎÃͤò¥°¥ê¥ÕËÜÍè¤ÎÁ÷¤êÉý¤Ë²Ã»»¤·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£  */
184   unsigned advance_is_absolute : 1;
185   /***en Should be set to 1 iff at least one of the other members has
186       a nonzero value.  */
187   /***ja Â¾¤Î¥á¥ó¥Ð¡¼¤Î¤¦¤ÁºÇÄã1¸Ä¤¬Èó¥¼¥í¤Î¤È¤­¤Î¤ß¡¢1¤Ë¥»¥Ã¥È¤µ¤ì¤ë¡£  */
188   unsigned set : 1;
189 } MFLTGlyphAdjustment;
190
191 /*=*/
192
193 /***en
194     @brief Type of information about a glyph sequence.
195
196     The type #MFLTGlyphString is the structure that contains
197     information about a sequence of glyphs.  */
198
199 /***ja
200     @brief ¥°¥ê¥ÕÎó¤Î¾ðÊó¤Î¤¿¤á¤Î·¿.
201
202     ·¿ #MFLTGlyphString ¤Ï¡¢¥°¥ê¥ÕÎó¤Î¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿¤á¤Î¹½Â¤ÂΤǤ¢¤ë¡£  */
203
204 typedef struct
205 {
206   /***en The actual byte size of elements of the array pointed by the
207       member #glyphs.  It must be equal to or greater than "sizeof
208       (MFLTGlyph)".  */
209   /***ja ¥á¥ó¥Ð¡¼ #glyphs ¤Î»Ø¤¹ÇÛÎó¤ÎÍ×ÁǤ¬Àê¤á¤ë¼Â¥Ð¥¤¥È¿ô¡£
210       ¤³¤ÎÃͤϠ"sizeof (MFLTGlyph)" °Ê¾å¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£  */
211   int glyph_size;
212   /***en Array of glyphs.  */
213   /***ja ¥°¥ê¥Õ¤ÎÇÛÎó¡£  */
214   MFLTGlyph *glyphs;
215   /***en Number of elements allocated in #glyphs.  */
216   /***ja #glyphs Æâ¤ËÇÛÃÖ¤µ¤ì¤Æ¤¤¤ëÍ×ÁǤοô¡£  */
217   int allocated;
218   /***en Number of elements in #glyphs in use.  */
219   /***ja #glyphs Æâ¤Ç»ÈÍÑÃæ¤ÎÍ×ÁǤοô¡£  */
220   int used;
221   /***en Flag to tell if the glyphs should be drawn from right-to-left
222       or not.  */
223   /***ja ¥°¥ê¥Õ¤¬±¦¤«¤éº¸¤Ø¤ÈÉÁ¤«¤ì¤ë¤Ù¤­¤«Èݤ«¤ò¼¨¤¹¥Õ¥é¥°¡£  */
224   unsigned int r2l;
225 } MFLTGlyphString;
226
227 /*=*/
228
229 /***en
230     @brief Type of specification of GSUB and GPOS OpenType tables.
231
232     The type #MFLTOtfSpec is the structure that contains information
233     about the GSUB and GPOS features of a specific script and language
234     system to be applied to a glyph sequence.  */
235
236 /***ja
237     @brief GSUB ¤ª¤è¤Ó GPOS OpenType ¥Æ¡¼¥Ö¥ë¤Î»ÅÍͤΤ¿¤á¤Î·¿.
238
239     ·¿ #MFLTOtfSpec ¤Ï¡¢GSUB ¤ª¤è¤Ó GPOS¥Õ¥£¡¼¥Á¥ã¡¼¤Î¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿
240     ¤á¤Î¹½Â¤ÂΤǤ¢¤ë¡£¤³¤ì¤é¥Õ¥£¡¼¥Á¥ã¡¼¤ÏÆÃÄê¤Î¥¹¥¯¥ê¥×¥È¤ª¤è¤Ó¸À¸ì¥·
241     ¥¹¥Æ¥à¤Î¤â¤Î¤Ç¤¢¤ê¡¢¥°¥ê¥ÕÎó¤ËŬÍѤµ¤ì¤ë¡£  */
242
243 typedef struct
244 {
245   /***en Unique symbol representing the spec.  This is the same as the
246       #OTF-SPEC of the FLT.  */
247   /***ja ¤³¤Î»ÅÍͤòɽ¤ï¤¹¥æ¥Ë¡¼¥¯¤Ê¥·¥ó¥Ü¥ë¡£
248       FLT ¤Î #OTF-SPEC ¤ÈƱ°ì¤ÎÃͤǤ¢¤ë¡£  */
249   MSymbol sym;
250
251   /***en Tags for script and language system.  */
252   /***ja ¥¹¥¯¥ê¥×¥È¤ª¤è¤Ó¸À¸ì¥·¥¹¥Æ¥à¤Î¥¿¥°¡£  */
253   unsigned int script, langsys;
254
255   /***en Array of GSUB (1st element) and GPOS (2nd element) features.
256       Each array is terminated by 0.  If an element is 0xFFFFFFFF
257       apply the previous features in that order, and apply all the
258       other features except those that appear in the following elements.
259       It may be NULL if there are no features.  */
260   /***ja GSUB ¥Õ¥£¡¼¥Á¥ã¡¼¤òÂè1Í×ÁÇ¡¢GPOS ¥Õ¥£¡¼¥Á¥ã¡¼¤òÂè2Í×ÁǤȤ¹¤ëÇÛ
261       Îó¡£³ÆÇÛÎó¤ÎËöÈø¤Ï0¤Ç¼¨¤µ¤ì¤ë¡£¤â¤·¤¢¤ëÍ×ÁǤ¬ 0xFFFFFFFF¤Ê¤é¤Ð¡¢
262       °ÊÁ°¤ÎÁ´¥Õ¥£¡¼¥Á¥ã¡¼¤ò¤½¤Î½ç½ø¤ÇŬÍѤ·¡¢¹¹¤Ë°Ê¹ß¤ÎÍ×ÁǤȤ·¤Æ¸½¤ï
263       ¤ì¤ë¥Õ¥£¥Á¥ã¡¼°Ê³°¤Î¤¹¤Ù¤Æ¤òŬÍѤ¹¤ë¡£¥Õ¥£¡¼¥Á¥ã¡¼¤¬1¤Ä¤â¤Ê¤¤¾ì¹ç
264       ¤Ï NULL ¤Ç¤â¤è¤¤¡£  */
265   unsigned int *features[2];
266 } MFLTOtfSpec;
267
268 /*=*/
269
270 /***en
271     @brief Type of font to be used by the FLT driver.
272
273     The type #MFLTFont is the structure that contains information
274     about a font used by the FLT driver.  */
275
276 /***ja
277     @brief FLT ¥É¥é¥¤¥Ð¤¬»È¤¦¥Õ¥©¥ó¥È¤Î·¿.
278
279     ·¿ #MFLTFont ¤Ï¡¢FLT¥É¥é¥¤¥Ð¤¬»È¤¦¥Õ¥©¥ó¥È¤Ë´Ø¤¹¤ë¾ðÊó¤ò³ÊǼ¤¹¤ë¤¿
280     ¤á¤Î¹½Â¤ÂΤǤ¢¤ë¡£  */
281
282 typedef struct _MFLTFont
283 {
284   /***en Family name of the font.  It may be #Mnil if the family name
285      is not important in finding a Font Layout Table suitable for the
286      font (for instance, in the case that the font is an OpenType
287      font).  */
288   /***ja ¥Õ¥©¥ó¥È¤Î¥Õ¥¡¥ß¥ê¡¼Ì¾¡£¥Õ¥©¥ó¥È¤ËŬ¤·¤¿ FLT¤òõ¤¹ºÝ¤Ë½ÅÍפǤÊ
289       ¤¤¾ì¹ç (¤¿¤È¤¨¤Ð OpenType¥Õ¥©¥ó¥È¤Î¾ì¹ç¤Ê¤É) ¤Ï¡¢#Mnil ¤Ç¤è¤¤¡£ */
290   MSymbol family;
291
292   /***en Horizontal and vertical font sizes in pixels per EM.  */
293   /***ja ¥Õ¥©¥ó¥È¤Î¿åÊ¿¡¦¿âľ¥µ¥¤¥º¤ò pixels per EM ¤Çɽ¸½¤·¤¿¤â¤Î¡£  */
294   int x_ppem, y_ppem;
295
296   /***en Callback function to get glyph IDs for glyphs between FROM
297      (inclusive) and TO (exclusive) of GSTRING.  If the member <encoded>
298      of a glyph is zero, the member <code> of that glyph is a character
299      code.  The function must convert it to the glyph ID of FONT.  */
300   /***ja GSTRING Æâ¤Î FROM ¤«¤é TO Ä¾Á°¤Þ¤Ç¤Î³Æ¥°¥ê¥Õ¤ËÂбþ¤¹¤ë¥°¥ê¥Õ
301       ID¤ò¼èÆÀ¤¹¤ë¤¿¤á¤Î callback ´Ø¿ô¡£¤â¤·¤¢¤ë¥°¥ê¥Õ¤Î¥á¥ó¥Ð¡¼
302       <encoded>¤¬¥¼¥í¤Ê¤é¤Ð¡¢¤½¤Î¥°¥ê¥Õ¤Î¥á¥ó¥Ð¡¼ <code> ¤Ïʸ»ú¥³¡¼¥É¤Ç
303       ¤¢¤ë¡£¤³¤Î´Ø¿ô¤Ï¤½¤Îʸ»ú¥³¡¼¥É¤ò FONT ¤Î¥°¥ê¥Õ ID¤ËÊÑ´¹¤·¤Ê¤¯¤Æ¤Ï
304       ¤Ê¤é¤Ê¤¤¡£  */
305   int (*get_glyph_id) (struct _MFLTFont *font, MFLTGlyphString *gstring,
306                        int from, int to);
307
308   /***en Callback function to get metrics of glyphs between FROM
309      (inclusive) and TO (exclusive) of GSTRING.  If the member <measured>
310      of a glyph is zero, the function must set the members <xadv>, <yadv>,
311      <ascent>, <descent>, <lbearing>, and <rbearing> of the glyph.  */
312   /***ja GSTRING Æâ¤Î FROM ¤«¤é TOľÁ°¤Þ¤Ç¤Î³Æ¥°¥ê¥Õ¤ËÂбþ¤¹¤ë¥á¥È¥ê¥Ã
313       ¥¯¤ò¼èÆÀ¤¹¤ë¤¿¤á¤Î callback ´Ø¿ô¡£¤â¤·¤¢¤ë¥°¥ê¥Õ¤Î¥á¥ó¥Ð¡¼
314       <measured>¤¬¥¼¥í¤Ê¤é¤Ð¡¢¤³¤Î´Ø¿ô¤Ï¤½¤Î¥°¥ê¥Õ¤Î¥á¥ó¥Ð¡¼ <xadv>,
315       <yadv>, <ascent>, <descent>, <lbearing>, ¤ª¤è¤Ó <rbearing>¤ò¥»¥Ã
316       ¥È¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£  */
317   int (*get_metrics) (struct _MFLTFont *font, MFLTGlyphString *gstring,
318                      int from, int to);
319
320   /***en Callback function to check if the font has OpenType GSUB/GPOS
321      features for a specific script/language.  The function must
322      return 1, if the font satisfies SPEC, or 0.  It must be
323      NULL if the font does not have OpenType tables.  */
324   /***ja ¥Õ¥©¥ó¥È¤¬¤¢¤ëÆÃÄê¤Î¥¹¥¯¥ê¥×¥È/¸À¸ì¤ËÂФ¹¤ë GSUB/GPOS
325       OpenType¥Õ¥£¡¼¥Á¥ã¡¼¤ò»ý¤Ä¤«Èݤ«¤òÄ´¤Ù¤ë callback ´Ø¿ô¡£¤³¤Î´Ø¿ô
326       ¤Ï¥Õ¥©¥ó¥È¤¬SPEC ¤òËþ¤¿¤¹¤È¤­¤Ï 1 ¤ò¡¢¤½¤¦¤Ç¤Ê¤¤¤È¤­¤Ï 0¤òÊÖ¤µ¤Ê
327       ¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¥Õ¥©¥ó¥È¤¬ OpenType ¥Æ¡¼¥Ö¥ë¤ò»ý¤¿¤Ê¤¤¤È¤­¤ÏNULL
328       ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£  */
329   int (*check_otf) (struct _MFLTFont *font, MFLTOtfSpec *spec);
330
331   /***en Callback function to apply OpenType features in SPEC to glyphs
332      between FROM (inclusive) and TO (exclusive) of IN.  The resulting
333      glyphs are appended to the tail of OUT.  If OUT does not
334      have a room to store all the resulting glyphs, it must return -2.
335      It must be NULL if the font does not have OpenType tables.  */
336   /***ja IN Æâ¤Î FROM ¤«¤é TO Ä¾Á°¤Þ¤Ç¤Î³Æ¥°¥ê¥Õ¤Ë SPECÆâ¤Î³Æ OpenType
337       ¥Õ¥£¡¼¥Á¥ã¡¼¤òŬÍѤ¹¤ë¤¿¤á¤Î callback ´Ø¿ô¡£Å¬ÍÑ·ë²Ì¤Î¥°¥ê¥ÕÎó¤Ï
338       OUT ¤ÎËöÈø¤ËÄɲ䵤ì¤ë¡£OUT ¤¬Ã»¤«²á¤®¤Æ·ë²Ì¤òÄɲä·ÀÚ¤ì¤Ê¤¤¾ì¹ç
339       ¤Ï -2 ¤òÊÖ¤µ¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£¥Õ¥©¥ó¥È¤¬ OpenType ¥Æ¡¼¥Ö¥ë¤ò»ý¤¿
340       ¤Ê¤¤¾ì¹ç¤Ï NULL¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£  */
341   int (*drive_otf) (struct _MFLTFont *font, MFLTOtfSpec *spec,
342                     MFLTGlyphString *in, int from, int to,
343                     MFLTGlyphString *out, MFLTGlyphAdjustment *adjustment);
344
345   /***en For m17n-lib's internal use only.  It should be initialized
346       to NULL.  */
347   /***ja m17n-lib ¤ÎÆâÉôºî¶ÈÍÑ¡£NULL ¤Ë½éÃͲ½¤µ¤ì¤ë¡£  */
348   void *internal;
349 } MFLTFont;
350
351 /*=*/
352
353 /***en
354     @brief Type of FLT (Font Layout Table).
355
356     The type #MFLT is for an FLT object.  Its internal structure is
357     concealed from application programs.  */
358
359 /***ja
360     @brief FLT (Font Layout Table) ¤Î·¿.
361
362     ·¿ #MFLT ¤Ï FLT ¥ª¥Ö¥¸¥§¥¯¥È¤Î¤¿¤á¤Î·¿¤Ç¤¢¤ë¡£
363     ¤³¤ÎÆâÉô¹½Â¤¤Ï¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥×¥í¥°¥é¥à¤«¤é¤Ï±£Ê䵤ì¤Æ¤¤¤ë¡£  */
364
365 typedef struct _MFLT MFLT;
366
367 extern MFLT *mflt_get (MSymbol name);
368
369 extern MFLT *mflt_find (int c, MFLTFont *font);
370
371 extern const char *mflt_name (MFLT *flt);
372
373 extern MCharTable *mflt_coverage (MFLT *flt);
374
375 extern int mflt_run (MFLTGlyphString *gstring, int from, int to,
376                      MFLTFont *font, MFLT *flt);
377
378 /*=*/
379 /*** @} */
380
381 M17N_END_HEADER
382
383 #endif /* _M17N_FLT_H_ */
384
385 /*
386   Local Variables:
387   coding: euc-japan
388   End:
389 */