MFLTFont Struct Reference
[FLT API]

Type of font to be used by the FLT driver. More...

Data Fields

MSymbol family
int x_ppem
int y_ppem
int(* get_glyph_id )(struct _MFLTFont *font, MFLTGlyphString *gstring, int from, int to)
int(* get_metrics )(struct _MFLTFont *font, MFLTGlyphString *gstring, int from, int to)
int(* check_otf )(struct _MFLTFont *font, MFLTOtfSpec *spec)
int(* drive_otf )(struct _MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in, int from, int to, MFLTGlyphString *out, MFLTGlyphAdjustment *adjustment)
void * internal

Detailed Description

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. 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.


Field Documentation

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).

Horizontal font sizes in pixels per EM.

Vertical font sizes in pixels per EM.

int(* MFLTFont::get_glyph_id)(struct _MFLTFont *font, MFLTGlyphString *gstring, int from, int to)

Callback function to get glyph IDs for glyphs between FROM (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(* MFLTFont::get_metrics)(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 the member <measured> of a glyph is zero, the function must set the members <xadv>, <yadv>, <ascent>, <descent>, <lbearing>, and <rbearing> of the glyph.

int(* MFLTFont::check_otf)(struct _MFLTFont *font, MFLTOtfSpec *spec)

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 satisfies SPEC, or 0. It must be NULL if the font does not have OpenType tables.

int(* MFLTFont::drive_otf)(struct _MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in, int from, int to, MFLTGlyphString *out, MFLTGlyphAdjustment *adjustment)

Callback function to apply OpenType features in SPEC to glyphs between FROM (inclusive) and TO (exclusive) of IN. The resulting 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.

For m17n-lib's internal use only. It should be initialized to NULL.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

m17n-lib Home