FcFileScan(3)
π FcFileScan(3) β the fontconfig manual, bestie edition π
okay so before we even start: this is a page from the fontconfig manual, section 3, and the star of the show is FcFileScan. she scans a font file. that's the whole gig. let's get into it β¨
πΈ NAME πΈ
FcFileScan β scan a font file π
like, literally. one file. scanning it. iconic behavior honestly.
β¨ SYNOPSIS β¨
#include <fontconfig/fontconfig.h>
FcBool FcFileScan (FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, FcBlanks *blanks, const FcChar8 *file, FcBool force);
six arguments, no cap. don't panic, we're going through every single one π«Ά
π DESCRIPTION π
so what she does is: she scans a single file and adds all the fonts she finds to set. that's it, that's the vibe. one file in, fonts out, slay π
if force is FcTrue, then the file gets scanned even if associated information is found in cache. like, no ma'am, we are not trusting the cache today, we're doing the work ourselves. main character energy fr fr π₯
if file is a directory, it gets added to dirs instead. not scanned, just noted. subtle. mysterious. she contains multitudes π¦
now, whether fonts are actually found depends on fontconfig policy as well as the current configuration β so it's giving "it depends," which is annoying but that's the truth ngl.
and here's a fun little internal detail π β fontconfig will ignore BDF and PCF fonts which are not in Unicode (or the effectively equivalent ISO Latin-1) encoding, because those are simply not usable by Unicode-based applications. like, sorry babe, wrong encoding, we can't use you π
the configuration can also ignore fonts based on filename or on the contents of the font file itself. so yeah, there are multiple vibe checks a font has to pass before she makes the cut π§
return value time π β returns FcFalse if any of the fonts cannot be added (due to allocation failure). otherwise returns FcTrue. that's the whole contract, no notes.
β οΈ real talk: that FcFalse is specifically an allocation-failure situation, so if you see it, it's a memory thing, not a "your font is ugly" thing π
okay that's the page!! go scan something iconic, bestie π
π cute sign-off: this was Fontconfig 2.17.0, dated 27 June 2025 β the FcFileScan(3) era. mwah π π
π¦ where this page comes from
- fedora 43: fontconfig-devel 2.17.0-3.fc43 Β· HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016
- fedora 43: fontconfig-devel 2.17.0-3.fc43 Β· HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016
- fedora 44: fontconfig-devel 2.17.0-4.fc44 Β· HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016
- fedora 44: fontconfig-devel 2.17.0-4.fc44 Β· HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms