mfontset_modify_entry(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 script is not Mnil, it has to be a symbol identifying a script. in that case, language is either a symbol identifying a language or Mnil, and font gets associated with that script/language pair. easy.
  • if charset is not Mnil, it has to be a symbol representing a charset object. in that case, font gets associated with that charset. slay.
  • if both script and charset are not Mnil? buckle up, because two copies of font are 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 script and charset are Mnil, then font gets associated with Mnil. 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 how is positive, font has the highest priority in the group of fonts associated with the same item. she's at the top of the group chat.
  • if how is negative, font has the lowest priority. no shade, just placement.
  • if how is zero, font becomes 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() returns 0. πŸ’–
  • otherwise it returns -1, and it assigns an error code to the external variable merror_code. 😭

✨ ERRORS ✨

  • MERROR_SYMBOL

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