The m17n Library 1.8.4
Loading...
Searching...
No Matches
Data Fields
MFLTFont Struct Reference

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

#include <m17n-flt.h>

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

MSymbol MFLTFont::family

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

◆ x_ppem

int MFLTFont::x_ppem

Horizontal font sizes in pixels per EM.

◆ y_ppem

int MFLTFont::y_ppem

Vertical font sizes in pixels per EM.

◆ get_glyph_id

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.

◆ get_metrics

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.

◆ check_otf

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.

◆ drive_otf

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.

◆ internal

void* MFLTFont::internal

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


m17n-lib Home