FcConfigGetFonts(3)

πŸ’– FcConfigGetFonts β€” get that config font set, bestie πŸ’–

okay so real talk: this is a fontconfig page (yes, the FcConfigGetFonts(3) one, you found it, slay ✨) and it's honestly shorter than my attention span, so let's get into it.


🌸 NAME 🌸

FcConfigGetFonts β€” Get config font set. that's it. that's the whole name. iconic behaviour honestly πŸ‘‘


✨ SYNOPSIS ✨

#include <fontconfig/fontconfig.h>

FcFontSet * FcConfigGetFonts (FcConfig *config, FcSetName set);

look at that signature. so clean. so main character. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

So this function returns one of the two sets of fonts that live inside the configuration β€” which one you get depends on whatever you passed in for set. Yes, two. There are exactly two. Don't come at me, that's just how it is πŸ’…

Now the important part, bestie, listen up: this font set is owned by the library. Which means you must not modify it and you must not free it. Not even a little. Not even "just one tiny change". Fr fr, hands off 🫢

If config is NULL, then the current configuration gets used instead. convenient? yes. a trap? also kinda.

⚠️ and now the caveat that will ruin your day if you ignore it: this function isn't MT-safe. like at all. You have to call FcConfigReference before using this, and then FcConfigDestroy once the return value is no longer referenced. No cap, that's mandatory. skip it and you're on your own πŸ’€

🌈 the cute little sign-off 🌈

that's the whole page, my love β€” no hidden options, no secret flags, just vibes and a font set you're not allowed to touch. mwah πŸ’‹

this has been the FcConfigGetFonts(3) page, straight from Fontconfig 2.17.0, dated 27 June 2025 β€” go forth and reference your configs properly πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from