/***en Horizontal and vertical adjustments for the glyph positioning
expressed in 26.6 fractional pixel format. */
int xoff, yoff;
- /***en Flag to tell if the member <code> is encoded into a glyph ID
- of a font. */
+ /***en Flag to tell if the member <code> is already encoded into a
+ glyph ID of a font. */
unsigned encoded : 1;
/***en Flag to tell if the metrics of the glyph (members <xadv> thru
<rbearing>) are already calculated. */
unsigned measured : 1;
/***en For m17n-lib's internal use only. */
unsigned internal : 30;
+
+ /* Arbitrary data can follow. */
};
/***en
struct _MFLTFont
{
+ /* 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). */
+ MSymbol family;
+
+ /* 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 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
+ code. The function must convert it to the glyph ID of FONT. */
int (*get_glyph_id) (MFLTFont *font, MFLTGlyphString *gstring,
int form, int to);
- int (*get_metric) (MFLTFont *font, MFLTGlyphString *gstring, int form, int to);
- int (*suitable_p) (MFLTFont *font, MSymbol family, MFLTOtfSpec *spec);
+
+ /* 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,
+ int form, int to);
+
+ /* 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. */
int (*drive_otf) (MFLTFont *font, MFLTOtfSpec *spec,
MFLTGlyphString *in, int from, int to,
MFLTGlyphString *out, MFLTGlyphAdjustment *adjustment);
extern MFLT *mflt_get (char *name);
-extern MFLT *mflt_find (MFLTGlyphString *gstring, int pos, MFLTFont *font);
+extern MFLT *mflt_find (int c, MFLTFont *font);
+
+extern char *mflt_name (MFLT *flt);
extern MCharTable *mflt_coverage (MFLT *flt);