.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA) .\" Copyright (C) 2001-2011 .\" National Institute of Advanced Industrial Science and Technology (AIST) .\" This file is part of the m17n library documentation. .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.2 or .\" any later version published by the Free Software Foundation; with no .\" Invariant Section, no Front-Cover Texts, .\" and no Back-Cover Texts. A copy of the license is included in the .\" appendix entitled "GNU Free Documentation License". .TH "m17nFLT" 3m17n "Mon Sep 25 2023" "Version 1.8.4" "The m17n Library" \" -*- nroff -*- .ad l .nh .SH NAME m17nFLT_\-_FLT \- \- API provided by libm17n\-flt\&.so .br .SH SYNOPSIS .br .PP .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBMFLTGlyph\fP" .br .RI "Type of information about a glyph\&. " .ti -1c .RI "struct \fBMFLTGlyphAdjustment\fP" .br .RI "Type of information about a glyph position adjustment\&. " .ti -1c .RI "struct \fBMFLTGlyphString\fP" .br .RI "Type of information about a glyph sequence\&. " .ti -1c .RI "struct \fBMFLTOtfSpec\fP" .br .RI "Type of specification of GSUB and GPOS OpenType tables\&. " .ti -1c .RI "struct \fBMFLTFont\fP" .br .RI "Type of font to be used by the FLT driver\&. " .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef struct _MFLT \fBMFLT\fP" .br .RI "Type of FLT (Font Layout Table)\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBMFLT\fP * \fBmflt_get\fP (MSymbol name)" .br .RI "Return an FLT object that has a specified name\&. " .ti -1c .RI "\fBMFLT\fP * \fBmflt_find\fP (int c, \fBMFLTFont\fP *font)" .br .RI "Find an FLT suitable for the specified character and font\&. " .ti -1c .RI "const char * \fBmflt_name\fP (\fBMFLT\fP *flt)" .br .RI "Return the name of an FLT\&. " .ti -1c .RI "\fBMCharTable\fP * \fBmflt_coverage\fP (\fBMFLT\fP *flt)" .br .RI "Return a coverage of a FLT\&. " .ti -1c .RI "int \fBmflt_run\fP (\fBMFLTGlyphString\fP *gstring, int from, int to, \fBMFLTFont\fP *font, \fBMFLT\fP *flt)" .br .RI "Layout characters with an FLT\&. " .ti -1c .RI "\fBMFLT\fP * \fBmdebug_dump_flt\fP (\fBMFLT\fP *flt, int indent)" .br .RI "Dump a Font Layout Table\&. " .ti -1c .RI "void \fBmflt_dump_gstring\fP (\fBMFLTGlyphString\fP *gstring)" .br .RI "Dump an \fBMFLTGlyphString\fP\&. " .in -1c .SS "Variables" .in +1c .ti -1c .RI "int \fBmflt_enable_new_feature\fP" .br .RI "Flag to control several new OTF handling commands\&. " .ti -1c .RI "int(* \fBmflt_iterate_otf_feature\fP )(struct _MFLTFont *font, \fBMFLTOtfSpec\fP *spec, int from, int to, unsigned char *table)" .br .ti -1c .RI "MSymbol(* \fBmflt_font_id\fP )(struct _MFLTFont *font)" .br .ti -1c .RI "int(* \fBmflt_try_otf\fP )(struct _MFLTFont *font, \fBMFLTOtfSpec\fP *spec, \fBMFLTGlyphString\fP *gstring, int from, int to)" .br .in -1c .SH "Detailed Description" .PP API provided by libm17n\-flt\&.so .br FLT support for a window system\&. .PP .br .PP This section defines the m17n FLT API concerning character layouting facility using FLT (Font Layout Table)\&. The format of FLT is described in \fBmdbFLT\fP\&. .br .SH "Data Structure Documentation" .SS MFLTGlyph .PP Type of information about a glyph\&. .ad l .nh .PP \fBFIELD DOCUMENTATION:\fP .PP .PP \fBint MFLTGlyph::c\fP Character code (Unicode) of the glyph\&. .PP \fBunsigned int MFLTGlyph::code\fP Glyph ID of the glyph in the font\&. .PP \fBint MFLTGlyph::from\fP Starting index of the run in \fBMFLTGlyphString\fP that is replaced by this glyph\&. .br .PP \fBint MFLTGlyph::to\fP Ending index of the run in \fBMFLTGlyphString\fP that is replaced by this glyph\&. .br .PP \fBint MFLTGlyph::xadv\fP Advance width for horizontal layout expressed in 26\&.6 fractional pixel format\&. .br .PP \fBint MFLTGlyph::yadv\fP Advance height for vertical layout expressed in 26\&.6 fractional pixel format\&. .br .PP \fBint MFLTGlyph::ascent\fP Ink metrics of the glyph expressed in 26\&.6 fractional pixel format\&. .br .PP \fBint MFLTGlyph::descent\fP .PP \fBint MFLTGlyph::lbearing\fP .PP \fBint MFLTGlyph::rbearing\fP .PP \fBint MFLTGlyph::xoff\fP Horizontal and vertical adjustments for the glyph positioning expressed in 26\&.6 fractional pixel format\&. .br .PP \fBint MFLTGlyph::yoff\fP .PP \fBunsigned MFLTGlyph::encoded\fP Flag to tell whether the member has already been set to a glyph ID in the font\&. .br .PP \fBunsigned MFLTGlyph::measured\fP Flag to tell if the metrics of the glyph (members thru ) are already calculated\&. .br .PP \fBunsigned MFLTGlyph::adjusted\fP Flag to tell if the metrics of the glyph is adjusted, i\&.e\&. or is different from the normal size, or or is nonzero\&. .br .PP \fBunsigned MFLTGlyph::internal\fP For m17n\-lib's internal use only\&. .SS MFLTGlyphAdjustment .PP Type of information about a glyph position adjustment\&. .ad l .nh .PP \fBFIELD DOCUMENTATION:\fP .PP .PP \fBint MFLTGlyphAdjustment::xadv\fP Adjustments for advance width for horizontal layout and advance height for vertical layout expressed in 26\&.6 fractional pixel format\&. .br .PP \fBint MFLTGlyphAdjustment::yadv\fP .PP \fBint MFLTGlyphAdjustment::xoff\fP Horizontal and vertical adjustments for glyph positioning expressed in 26\&.6 fractional pixel format\&. .br .PP \fBint MFLTGlyphAdjustment::yoff\fP .PP \fBshort MFLTGlyphAdjustment::back\fP Number of glyphs to go back for drawing a glyph\&. .PP \fBunsigned MFLTGlyphAdjustment::advance_is_absolute\fP If nonzero, the member and are absolute, i\&.e\&., they should not be added to a glyph's origianl advance width and height\&. .br .PP \fBunsigned MFLTGlyphAdjustment::set\fP Should be set to 1 if at least one of the other members has a nonzero value\&. .br .SS MFLTGlyphString .PP Type of information about a glyph sequence\&. .ad l .nh .PP \fBFIELD DOCUMENTATION:\fP .PP .PP \fBint MFLTGlyphString::glyph_size\fP The actual byte size of elements of the array pointed by the member \fBglyphs\fP\&. It must be equal to or greater than 'sizeof (MFLTGlyph)'\&. .br .PP \fB\fBMFLTGlyph\fP* MFLTGlyphString::glyphs\fP Array of glyphs\&. .PP \fBint MFLTGlyphString::allocated\fP Number of elements allocated in \fBglyphs\fP\&. .PP \fBint MFLTGlyphString::used\fP Number of elements in \fBglyphs\fP in use\&. .PP \fBunsigned int MFLTGlyphString::r2l\fP Flag to tell if the glyphs should be drawn from right\-to\-left or not\&. .br .SS MFLTOtfSpec .PP Type of specification of GSUB and GPOS OpenType tables\&. .ad l .nh .PP \fBFIELD DOCUMENTATION:\fP .PP .PP \fBMSymbol MFLTOtfSpec::sym\fP Unique symbol representing the spec\&. This is the same as the \fBOTF\-SPEC\fP of the FLT\&. .br .PP \fBunsigned int MFLTOtfSpec::script\fP Tags for script and language system\&. .PP \fBunsigned int MFLTOtfSpec::langsys\fP .PP \fBunsigned int* MFLTOtfSpec::features[2]\fP Array of GSUB (1st element) and GPOS (2nd element) feature tag arrays\&. Each array is terminated by 0\&. It may be NULL if there is no feature to specify\&. .PP (1) The case of using this information for selecting which features to apply to a glyph string\&. If the array is NULL, apply no feature\&. If the first element is 0xFFFFFFFF, apply all available features except for what appear in the second and following elements (if any)\&. Otherwise, apply all listed features\&. .PP (2) The case of using this information for checking if a a font can be drived by a specific FLT\&. If the array is NULL, the font should not have any features\&. Otherwize, the font should have all features before 0xFFFFFFFF element (if any) and should not have any features after that element\&. .br .SS MFLTFont .PP Type of font to be used by the FLT driver\&. .ad l .nh .PP \fBFIELD DOCUMENTATION:\fP .PP .PP \fBMSymbol MFLTFont::family\fP Family name of the font\&. It may be \fBMnil\fP 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)\&. .br .PP \fBint MFLTFont::x_ppem\fP Horizontal font sizes in pixels per EM\&. .PP \fBint MFLTFont::y_ppem\fP Vertical font sizes in pixels per EM\&. .PP \fBint(* MFLTFont::get_glyph_id) (struct _MFLTFont *font, \fBMFLTGlyphString\fP *gstring, int from, int to)\fP Callback function to get glyph IDs for glyphs between FROM (inclusive) and TO (exclusive) of GSTRING\&. If the member of a glyph is zero, the member of that glyph is a character code\&. The function must convert it to the glyph ID of FONT\&. .br .PP \fBint(* MFLTFont::get_metrics) (struct _MFLTFont *font, \fBMFLTGlyphString\fP *gstring, int from, int to)\fP Callback function to get metrics of glyphs between FROM (inclusive) and TO (exclusive) of GSTRING\&. If the member of a glyph is zero, the function must set the members , , , , , and of the glyph\&. .br .PP \fBint(* MFLTFont::check_otf) (struct _MFLTFont *font, \fBMFLTOtfSpec\fP *spec)\fP 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\&. .br .PP \fBint(* MFLTFont::drive_otf) (struct _MFLTFont *font, \fBMFLTOtfSpec\fP *spec, \fBMFLTGlyphString\fP *in, int from, int to, \fBMFLTGlyphString\fP *out, \fBMFLTGlyphAdjustment\fP *adjustment)\fP 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\&. .br .PP \fBvoid* MFLTFont::internal\fP For m17n\-lib's internal use only\&. It should be initialized to NULL\&. .br .SH "Typedef Documentation" .PP .SS "typedef struct _MFLT \fBMFLT\fP" .PP Type of FLT (Font Layout Table)\&. The type \fBMFLT\fP is for an FLT object\&. Its internal structure is concealed from application programs\&. .br .SH "Variable Documentation" .PP .SS "int mflt_enable_new_feature" .PP Flag to control several new OTF handling commands\&. If the variable mflt_enable_new_feature is nonzero, the function \fBmflt_run()\fP can drive a Font Layout Table that contains the new OTF\-related commands ':otf?' and/or OTF feature specification in a category table\&. .br .SS "int(* mflt_iterate_otf_feature) (struct _MFLTFont *font, \fBMFLTOtfSpec\fP *spec, int from, int to, unsigned char *table) (struct _MFLTFont * font, \fBMFLTOtfSpec\fP * spec, int from, int to, unsigned char * table)" .SS "MSymbol(* mflt_font_id) (struct _MFLTFont *font) (struct _MFLTFont * font)" .SS "int(* mflt_try_otf) (struct _MFLTFont *font, \fBMFLTOtfSpec\fP *spec, \fBMFLTGlyphString\fP *gstring, int from, int to) (struct _MFLTFont * font, \fBMFLTOtfSpec\fP * spec, \fBMFLTGlyphString\fP * gstring, int from, int to)" .SH "Author" .PP Generated automatically by Doxygen for The m17n Library from the source code\&. .SH COPYRIGHT Copyright (C) 2001 Information\-technology Promotion Agency (IPA) .br Copyright (C) 2001\-2011 National Institute of Advanced Industrial Science and Technology (AIST) .br Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License .