[Fontconfig] Adding a font directory scanned non-recursively

Jean Abou Samra jean at abou-samra.fr
Sun Apr 2 01:10:09 UTC 2023


Le dimanche 02 avril 2023 à 03:08 +0200, Jean Abou Samra a écrit :
> Hi,
> 
> Is there a way to do something like FcConfigAppFontAddDir, but only looking
> for font files in the directory itself, not recursing into subdirectories?
> 
> For background, LilyPond, which uses Fontconfig to search for fonts, has its
> own include path for LilyPond files. Since there is tooling (IDE) support built
> around that, it would be nice to make LilyPond search for fonts in that path.
> I tried adding all the directories it contains with FcConfigAppFontAddDir,
> and it kind of works, but then, if I run LilyPond in, say, my home folder,
> it hangs, because it's scanning the tens of thousands of directories inside for
> font files...


PS: I know I can list the files myself and add them with FcConfigAppFontAddFile.
Just trying to know if there is a more elegant way, esp. one that does not require
me to be able to tell if a given file is a font file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20230402/522423de/attachment.sig>


More information about the Fontconfig mailing list