FcConfigSetSysRoot(3)

okay bestie, you clicked into the FcConfigSetSysRoot(3) manual page and it's giving β€œset the system root directory” energy πŸ’…βœ¨

🌸 NAME 🌸

FcConfigSetSysRoot β€” set the system root directory πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the include and the signature, exactly as they are, no cap:

#include <fontconfig/fontconfig.h>

void FcConfigSetSysRoot (FcConfig *config, const FcChar8 *sysroot);

πŸ’… DESCRIPTION πŸ’…

okay so this is the part where you set sysroot as the system root directory. Like, that's the whole assignment, and it ate πŸ’….

Every file path that's used or created with this config β€” and yup, that includes file properties in patterns β€” will be considered relative to this sysroot, or made relative to it. No weirdness, just everything sitting under that root vibe 🌈.

This is lowkey iconic because it lets a host generate caches for targets at build time. (Build-time cache generation? Obsessed.) 🫢

It also means a cache can be re-targeted to a different base directory β€” but only if FcConfigGetSysRoot is used to resolve file paths. That's the catch, bestie, don't forget it πŸ’–.

And when you set this on the current config, that causes changing the current config, which means it calls FcConfigSetCurrent(). So yeah, it's making moves on the current config fr fr.

πŸŽ€ SINCE πŸŽ€

version 2.10.92 ✨ β€” she's been around.


xoxo, Fontconfig 2.17.0 β€’ 27 June 2025 β€’ catch u on FcConfigSetSysRoot(3) again πŸ’–πŸ«Ά

πŸ“¦ where this page comes from