mfontset_modify_entry(3m17n)
π mfontset_modify_entry π
okay bestie, welcome to the m17n Library corner of the manual, where we talk about fonts, scripts, languages and charsets like it's absolutely nothing. this one lives in section 3, and its whole name is literally mfontset_modify_entry. she's an icon, she's a legend, and she's here to rearrange the furniture inside your fontset. no cap.
β¨ NAME β¨
mfontset_modify_entry β
that's it. that's the name. the original page really said "no description, just vibes" and honestly? respect. π the actual lore is all down in DESCRIPTION, keep scrolling.
β¨ SYNOPSIS β¨
int mfontset_modify_entry (MFontset * fontset, MSymbol script, MSymbol
language, MSymbol charset, MFont * spec, MSymbol layouter_name, int how)
like, look at all those arguments. seven of them. she's high maintenance but she's worth it. π
β¨ DESCRIPTION β¨
so what does she actually do? she modifies the contents of a fontset. and specifically, mfontset_modify_entry() associates, inside the fontset fontset, a copy of font with either a script/language pair or with a charset. yes, a copy. she's not borrowing it, she's keeping it. π
okay so here's the whole structure of a fontset, and it's giving very organized girlboss energy. every single font in a fontset is tied to one of these three things:
- a particular script/language pair,
- a particular charset,
- or the symbol
Mnil.
and all the fonts that are associated with the same item? they form a group. it's a little clique. a friend group. a squad. π
now, the rules, because there are rules:
- if
scriptis notMnil, it has to be a symbol identifying a script. in that case,languageis either a symbol identifying a language orMnil, andfontgets associated with that script/language pair. easy. - if
charsetis notMnil, it has to be a symbol representing a charset object. in that case,fontgets associated with that charset. slay. - if both
scriptandcharsetare notMnil? buckle up, because two copies offontare created. one of them is associated with the script/language pair, and the other one is associated with that charset. two for the price of one, periodt. - if both
scriptandcharsetareMnil, thenfontgets associated withMnil. and this kind of font has a name: they're called fallback fonts. the understudies. the ones who step in when nobody else can. π«Ά
next up: the argument how, and this one decides the priority of font. it's the main character ranking system:
- if
howis positive,fonthas the highest priority in the group of fonts associated with the same item. she's at the top of the group chat. - if
howis negative,fonthas the lowest priority. no shade, just placement. - if
howis zero,fontbecomes the only available font for the associated item, and all the other fonts get removed from the group. dramatic? yes. necessary? also yes.
β οΈ bestie, be careful with that how == 0 option. it literally clears out everybody else in the group. that's not a vibe check, that's an eviction. π
and finally, layouter_name. if it's not Mnil, it must be a symbol representing a mdbFLT (a font layout table). and in that case, if font gets selected for drawing an M-text, that font layout table is the one used to generate a glyph code sequence from a character sequence. iykyk. β¨
β¨ RETURN VALUE β¨
- if the operation was a success,
mfontset_modify_entry()returns0. π - otherwise it returns
-1, and it assigns an error code to the external variablemerror_code. π
β¨ ERRORS β¨
MERROR_SYMBOL
β¨ 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.
okay bestie that's the whole page, you ate that π go forth and modify your fontsets responsibly. this was Version 1.8.4, dated Mon Sep 25 2023, from the mfontset_modify_entry(3m17n) page β mwah, love u, bye ππ¦πΈ
π¦ 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