mfont_parse_name(3m17n)
mfont_parse_name π
okay bestie, welcome to the mfont_parse_name page from the The m17n Library manual β she's a tiny function with big main character energy β¨
β¨ NAME β¨
mfont_parse_name β the one that takes a font name (a string, a little text vibe) and hands you back an actual font object π no cap, that's the whole plot.
πΈ SYNOPSIS πΈ
MFont* mfont_parse_name (const char * name, MSymbol format)
π¦ DESCRIPTION π¦
so here's the tea, bestie: mfont_parse_name() creates a new font object. That's it, that's the job π
The properties get pulled out of the fontname β like, name is where the good stuff lives, and this function goes in and extracts all the properties from it. obsessed.
the format argument tells it how to read name, and it's giving three whole moods:
- if
formatisMxβnamegets parsed as XLFD (that's X Logical Font Description, the classic one π) - if
formatisMfontconfigβnamegets parsed as Fontconfig's textual representation of a font π - if
formatisMnilβ it triesnameas XLFD first, and if that fails, it falls back to parsing it as Fontconfig's representation. literally the "try again bestie" option π
π RETURN VALUE π
if the operation was successful, this function returns a pointer to the created font π«Ά
otherwise? it returns NULL. yeah. π
β 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, signed off with love from the m17n crew π§ββοΈ slay, go parse some font names, periodt πβ¨
π¦ 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