mdbFontset(5)
β¨ NAME β¨
mdbFontset β bestie, it's literally the Fontset page π (from the m17n Library's manual, section 5)
πΈ DESCRIPTION πΈ
okay so here's the tea β β the m17n library goes and loads a fontset definition straight out of the m17n database, and it finds it by the tags <fontset, FONTSET-NAME>. The data lives in plist format and it goes a lil something like this:
FONTSET ::= PER-SCRIPT * PER-CHARSET * FALLBACK *
PER-SCRIPT ::= '(' SCRIPT PER-LANGUAGE + ')'
PER-LANGUAGE ::= '(' LANGUAGE FONT-SPEC-ELEMENT + ')'
PER-CHARSET ::= '(' CHARSET FONT-SPEC-ELEMENT + ')'
FALLBACK ::= FONT-SPEC-ELEMENT
FONT-SPEC-ELEMENT ::= '(' FONT-SPEC [ FLT-NAME ] ')'
FONT-SPEC ::=
'(' [ FOUNDRY FAMILY
[ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
REGISTRY
[ OTF-SPEC ] [ LANG-SPEC ] ')'
SCRIPT is a symbol holding a script name (think latin, han) β or nil, no biggie. LANGUAGE is a two-letter symbol of a language name code as defined by ISO 639 (hey ja, hey zh) β or again, nil π
FONT-SPEC is the part that specifies the properties of a font, periodt. FOUNDRY through REGISTRY are symbols that correspond to the #Mfoundry β¦ #Mregistry properties of a font. If you wanna know what each property actually means, go read m17nFont π«Ά
OTF-SPEC is a symbol specifyng the OTF features you need. Its symbol name follows this syntax:
OTF-SPEC-NAME ::= ':otf=' SCRIPT LANGSYS ? GSUB-FEATURES ? GPOS-FEATURES ?
SCRIPT ::= SYMBOL
LANGSYS ::= '/' SYMBOL
GSUB-FEATURES ::= '=' FEATURE-LIST ?
GPOS-FEATURES ::= '+' FEATURE-LIST ?
FEATURE-LIST ::= '~' ? FEATURE ( ',' '~' ? FEATURE ',' ).fi
and just so we're clear, FEATURE in there is a four-letter Open Type feature π
LANG-SPEC is a symbol that specifies the language support you need. Its symbol name goes like:
LANG-SPEC-NAME ::= ':lang=' LANG
and LANG here is a two or three-letter ISO-639 language code β¨
FLT-NAME is the name of a Font Layout Table (yep β Font Layout Table π).
π¦ EXAMPLE π¦
here's what a PER_SCRIPT actually looks like, bestie:
(han
(ja
((jisx0208.1983-0)))
(zh
((gb2312.1980-0)))
(nil
((big5-0))))
So what's it telling the font selector to do? It says: use a font of registry 'jisx0208.1983-0' for a 'han' character β and by "a 'han' character" we mean a character whose #Mscript property is 'han' β if that character has the #Mlanguage text property 'ja' in an M-text, and if the character is in the repertories of such fonts. Otherwise? Try a font of registry 'gb2312.1980-0' or 'big5-0' π« And if that 'han' character doesn't have a #Mlanguage text property at all, then it just tries all three fonts, no cap.
Wanna know the detail of how a font actually gets selected? That's the function mdraw_text() β go look at it π
π 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 a wrap, angel π this was Version 1.8.4, dated Mon Sep 25 2023 β mwah, slay, go read the rest of the m17n docs π β¨
π¦ 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