m17nFLT(3m17n)
π m17nFLT β the FLT era begins π
okay bestie, sit down, hydrate, because we're doing m17nFLT(3m17n) from The m17n Library and it's lowkey a whole vibe. this is the FLT page: the FLT API that lives inside libm17n-flt.so. it's giving font-layout-table main character energy and i am obsessed. π¦
β¨ NAME β¨
m17nFLT β FLT β the API provided by libm17n-flt.so. that's it, that's the name, slay.
πΈ SYNOPSIS πΈ
π Data Structures
struct MFLTGlyphβ type of information about a glyph.struct MFLTGlyphAdjustmentβ type of information about a glyph position adjustment.struct MFLTGlyphStringβ type of information about a glyph sequence.struct MFLTOtfSpecβ type of specification of GSUB and GPOS OpenType tables.struct MFLTFontβ type of font to be used by the FLT driver.
π Typedefs
typedef struct _MFLT MFLTβ type of FLT (Font Layout Table).
π Functions
MFLT * mflt_get (MSymbol name)β return an FLT object that has a specified name.MFLT * mflt_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.MCharTable * mflt_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.MFLT * mdebug_dump_flt (MFLT *flt, int indent)β dump a Font Layout Table.void mflt_dump_gstring (MFLTGlyphString *gstring)β dump anMFLTGlyphString.
π 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 the character layouting facility using FLT (Font Layout Table). and the format of FLT itself? it's described over in mdbFLT. go read that when you're done here, i'm literally begging. π
π§ Data Structure Documentation π§
π MFLTGlyph
type of information about a glyph.
FIELD DOCUMENTATION:
int MFLTGlyph::cβ character code (Unicode) of the glyph.unsigned int MFLTGlyph::codeβ glyph ID of the glyph in the font.int MFLTGlyph::fromβ starting index of the run inMFLTGlyphStringthat is replaced by this glyph.int MFLTGlyph::toβ ending index of the run inMFLTGlyphStringthat is replaced by this glyph.int MFLTGlyph::xadvβ advance width for horizontal layout expressed in 26.6 fractional pixel format.int MFLTGlyph::yadvβ advance height for vertical layout expressed in 26.6 fractional pixel format.int MFLTGlyph::ascentβ ink metrics of the glyph expressed in 26.6 fractional pixel format.int MFLTGlyph::descentint MFLTGlyph::lbearingint MFLTGlyph::rbearingint MFLTGlyph::xoffβ horizontal and vertical adjustments for the glyph positioning expressed in 26.6 fractional pixel format.int MFLTGlyph::yoffunsigned MFLTGlyph::encodedβ flag to tell whether the member<code>has already been set to a glyph ID in the font.unsigned MFLTGlyph::measuredβ flag to tell if the metrics of the glyph (members<xadv>thru<rbearing>) are already calculated.unsigned MFLTGlyph::adjustedβ flag to tell if the metrics of the glyph is adjusted, i.e.<xadv>or<yadv>is different from the normal size, or<xoff>or<yoff>is nonzero.unsigned MFLTGlyph::internalβ for m17n-lib's internal use only. π« don't touch, bestie.
π MFLTGlyphAdjustment
type of information about a glyph position adjustment.
FIELD DOCUMENTATION:
int MFLTGlyphAdjustment::xadvβ adjustments for advance width for horizontal layout and advance height for vertical layout expressed in 26.6 fractional pixel format.int MFLTGlyphAdjustment::yadvint MFLTGlyphAdjustment::xoffβ horizontal and vertical adjustments for glyph positioning expressed in 26.6 fractional pixel format.int MFLTGlyphAdjustment::yoffshort MFLTGlyphAdjustment::backβ number of glyphs to go back for drawing a glyph.unsigned MFLTGlyphAdjustment::advance_is_absoluteβ if nonzero, the member<xadv>and<yadv>are absolute, i.e., they should not be added to a glyph's origianl advance width and height. (yes, "origianl". we respect the typo, it's canon. π)unsigned MFLTGlyphAdjustment::setβ should be set to1if at least one of the other members has a nonzero value.
π MFLTGlyphString
type of information about a glyph sequence.
FIELD DOCUMENTATION:
int MFLTGlyphString::glyph_sizeβ the actual byte size of elements of the array pointed by the memberglyphs. it must be equal to or greater than'sizeof (MFLTGlyph)'. no shrinking, periodt.MFLTGlyph* MFLTGlyphString::glyphsβ array of glyphs.int MFLTGlyphString::allocatedβ number of elements allocated inglyphs.int MFLTGlyphString::usedβ number of elements inglyphsin use.unsigned int MFLTGlyphString::r2lβ flag to tell if the glyphs should be drawn from right-to-left or not.
π MFLTOtfSpec
type of specification of GSUB and GPOS OpenType tables.
FIELD DOCUMENTATION:
MSymbol MFLTOtfSpec::symβ unique symbol representing the spec. this is the same as theOTF-SPECof the FLT.unsigned int MFLTOtfSpec::scriptβ tags for script and language system.unsigned int MFLTOtfSpec::langsysunsigned int* MFLTOtfSpec::features[2]β array of GSUB (1st element) and GPOS (2nd element) feature tag arrays. each array is terminated by0. it may beNULLif there is no feature to specify.
(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.
(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.
(typos "a a" and "Otherwize" and "drived" are preserved, we are nothing if not faithful π)
π MFLTFont
type of font to be used by the FLT driver.
FIELD DOCUMENTATION:
MSymbol MFLTFont::familyβ family name of the font. it may beMnilif 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).int MFLTFont::x_ppemβ horizontal font sizes in pixels per EM.int MFLTFont::y_ppemβ 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 betweenFROM(inclusive) andTO(exclusive) ofGSTRING. 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 ofFONT.int(* MFLTFont::get_metrics) (struct _MFLTFont *font, MFLTGlyphString *gstring, int from, int to)β callback function to get metrics of glyphs betweenFROM(inclusive) andTO(exclusive) ofGSTRING. 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 return1, if the font satisfiesSPEC, or0. it must beNULLif 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 inSPECto glyphs betweenFROM(inclusive) andTO(exclusive) ofIN. the resulting glyphs are appended to the tail ofOUT. ifOUTdoes not have a room to store all the resulting glyphs, it must return-2. it must beNULLif the font does not have OpenType tables.void* MFLTFont::internalβ for m17n-lib's internal use only. it should be initialized toNULL. (initialize it, bestie, i'm not playing π)
β Typedef Documentation β
π 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. so don't go peeking, it's not for you, it's mysterious on purpose. π«Ά
π¦ Variable Documentation π¦
π 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.
π 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)
π MSymbol(* mflt_font_id) (struct _MFLTFont *font)
(struct _MFLTFont * font)
π 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)
π Author π
generated automatically by Doxygen for The m17n Library from the source code. so like, the robot did it. iconic of it honestly. π€β¨
π COPYRIGHT π
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.
and that's the whole page, bestie!! π Version 1.8.4, dated Mon Sep 25 2023, and it goes by m17nFLT(3m17n) β take care of her, she's been around since forever and she still ate. mwah. π
ππΈ
π¦ where this page comes from
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms