The m17n Library 1.8.4
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions | Variables
FLT API

API provided by libm17n-flt.so
More...

Data Structures

struct  MFLTGlyph
 Type of information about a glyph. More...
 
struct  MFLTGlyphAdjustment
 Type of information about a glyph position adjustment. More...
 
struct  MFLTGlyphString
 Type of information about a glyph sequence. More...
 
struct  MFLTOtfSpec
 Type of specification of GSUB and GPOS OpenType tables. More...
 
struct  MFLTFont
 Type of font to be used by the FLT driver. More...
 

Typedefs

typedef struct _MFLT MFLT
 Type of FLT (Font Layout Table).
 

Functions

MFLTmflt_get (MSymbol name)
 Return an FLT object that has a specified name.
 
MFLTmflt_find (int c, MFLTFont *font)
 Find an FLT suitable for the specified character and font.
 
const char * mflt_name (MFLT *flt)
 Return the name of an FLT.
 
MCharTablemflt_coverage (MFLT *flt)
 Return a coverage of a FLT.
 
int mflt_run (MFLTGlyphString *gstring, int from, int to, MFLTFont *font, MFLT *flt)
 Layout characters with an FLT.
 
MFLTmdebug_dump_flt (MFLT *flt, int indent)
 Dump a Font Layout Table.
 
void mflt_dump_gstring (MFLTGlyphString *gstring)
 Dump an MFLTGlyphString.
 

Variables

int mflt_enable_new_feature
 Flag to control several new OTF handling commands.
 
int(* mflt_iterate_otf_feature )(struct _MFLTFont *font, MFLTOtfSpec *spec, int from, int to, unsigned char *table)
 
MSymbol(* mflt_font_id )(struct _MFLTFont *font)
 
int(* mflt_try_otf )(struct _MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *gstring, int from, int to)
 

Detailed Description

API provided by libm17n-flt.so

FLT support for a window system.


This section defines the m17n FLT API concerning character layouting facility using FLT (Font Layout Table). The format of FLT is described in Font Layout Table.

Typedef Documentation

◆ MFLT

typedef struct _MFLT MFLT

Type of FLT (Font Layout Table).

The type MFLT is for an FLT object. Its internal structure is concealed from application programs.

Function Documentation

◆ mflt_get()

MFLT * mflt_get ( MSymbol  name)

Return an FLT object that has a specified name.

The mflt_get() function returns an FLT object whose name is name.

Return value:
If the operation was successful, mflt_get() returns a pointer to the found FLT object. Otherwise, it returns NULL.

◆ mflt_find()

MFLT * mflt_find ( int  c,
MFLTFont font 
)

Find an FLT suitable for the specified character and font.

The mflt_find() function returns the most appropriate FLT for layouting character c with font font.

Return value:
If the operation was successful, mflt_find() returns a pointer to the found FLT object. Otherwise, it returns NULL.

◆ mflt_name()

const char * mflt_name ( MFLT flt)

Return the name of an FLT.

The mflt_name() function returns the name of flt.

◆ mflt_coverage()

MCharTable * mflt_coverage ( MFLT flt)

Return a coverage of a FLT.

The mflt_coverage() function returns a char-table that contains nonzero values for characters supported by flt.

◆ mflt_run()

int mflt_run ( MFLTGlyphString gstring,
int  from,
int  to,
MFLTFont font,
MFLT flt 
)

Layout characters with an FLT.

The mflt_run() function layouts characters in gstring between from (inclusive) and to (exclusive) with font. If flt is nonzero, it is used for all the charaters. Otherwise, appropriate FLTs are automatically chosen.

Return values
>=0The operation was successful. The value is the index to the glyph, which was previously indexed by to, in gstring->glyphs.
-2gstring->glyphs is too short to store the result. The caller can call this fucntion again with a longer gstring->glyphs.
-1Some other error occurred.

◆ mdebug_dump_flt()

MFLT * mdebug_dump_flt ( MFLT flt,
int  indent 
)

Dump a Font Layout Table.

The mdebug_dump_flt() function prints the Font Layout Table flt in a human readable way to the stderr or to what specified by the environment variable MDEBUG_OUTPUT_FILE. indent specifies how many columns to indent the lines but the first one.

Return value:
This function returns flt.

◆ mflt_dump_gstring()

void mflt_dump_gstring ( MFLTGlyphString gstring)

Dump an MFLTGlyphString.

The mflt_dump_gstring() function prints the glyph sequence gstring in a human readable way to the stderr or to what specified by the environment variable MDEBUG_OUTPUT_FILE.

Variable Documentation

◆ mflt_enable_new_feature

int mflt_enable_new_feature

Flag to control several new OTF handling commands.

If the variable mflt_enable_new_feature is nonzero, the function mflt_run() can drive a Font Layout Table that contains the new OTF-related commands ":otf?" and/or OTF feature specification in a category table.

◆ mflt_iterate_otf_feature

int(* mflt_iterate_otf_feature) (struct _MFLTFont *font, MFLTOtfSpec *spec, int from, int to, unsigned char *table) ( struct _MFLTFont *  font,
MFLTOtfSpec spec,
int  from,
int  to,
unsigned char *  table 
)

◆ mflt_font_id

MSymbol(* mflt_font_id) (struct _MFLTFont *font) ( struct _MFLTFont *  font)

◆ mflt_try_otf

int(* mflt_try_otf) (struct _MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *gstring, int from, int to) ( struct _MFLTFont *  font,
MFLTOtfSpec spec,
MFLTGlyphString gstring,
int  from,
int  to 
)

m17n-lib Home