FcConfigParseAndLoad(3)

πŸ’– NAME πŸ’–

okay bestie, welcome to the FcConfigParseAndLoad(3) page β€” it's literally the manual for loading a configuration file, and yes, she ate. πŸŽ€

✨ SYNOPSIS ✨

#include <fontconfig/fontconfig.h>

FcBool FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: FcConfigParseAndLoad walks the configuration in file and constructs the internal representation in config. the way it just does that? iconic. πŸ’…

any include files referenced from within file will be loaded and parsed too β€” no cap, it handles the whole little family tree. 🌸

now, the complain girlies: if complain is FcFalse, no warning will be displayed if file does not exist. ngl, that's the "keep it quiet" setting. πŸ™ˆ

error and warning messages will be output to stderr, so if something's off, that's where the drama shows up. πŸ’€

it returns FcFalse if some error occurred while loading the file β€” either a parse error, semantic error or allocation failure. otherwise returns FcTrue. periodt. ✨

and here's the follow-up step, bestie: after all configuration files / strings have been loaded, with FcConfigParseAndLoad and/or FcConfigParseAndLoadFromMemory, call FcConfigBuildFonts to build the font database. that's the main character move. πŸ‘‘

fr fr, don't skip that last part β€” the page says to call FcConfigBuildFonts after all the configuration files / strings are loaded. 🫢

okay that's the whole page β€” Fontconfig 2.17.0, 27 June 2025, signing off with maximum sparkle πŸ’…πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from