FcStrCopyFilename(3)

okay bestie, welcome to FcStrCopyFilename(3) 💅✨ — the fontconfig manual page that’s literally all about turning a filename into a complete path. no cap, she’s lowkey iconic for path cleanup.

🌸 NAME 🌸

FcStrCopyFilename — create a complete path from a filename 🎀

✨ SYNOPSIS ✨

#include <fontconfig/fontconfig.h>

FcChar8 * FcStrCopyFilename (const FcChar8 *s);

🦋 DESCRIPTION 🦋

okay so FcStrCopyFilename constructs an absolute pathname from s. that’s the whole main character mission, fr fr.

here’s the vibe check on what it does:

  • it converts any leading '~' characters into the value of the HOME environment variable 🏠✨
  • any relative paths are converted to absolute paths using the current working directory 📍
  • sequences of '/' characters are converted to a single '/' — yes, she said “one slash is enough, bestie” 💀
  • names containing the current directory '.' or parent directory '..' are correctly reconstructed 🧚💜
and pls note, bestie: it returns NULL if '~' is the leading character and HOME is unset or disabled — see FcConfigEnableHome. that’s the important little caveat, no cap 😭

mwah 💋 this page is from Fontconfig 2.17.0, dated 27 June 2025, and yes the manual is literally FcStrCopyFilename(3) — bye bestie, go make those paths absolute 🫶🌸✨

📦 where this page comes from