[Fontconfig] Rejecting and accepting fonts
Akira TAGOH
akira at tagoh.org
Wed Nov 15 11:54:34 UTC 2017
> I note that my path is: /usr/share/fonts/truetype/dejavu/ but even adjusting
> for that, there is no appearance of DejaVuSans in fc-list.
>
> I tried various paths like:
> /usr/share/fonts/truetype/dejavu/*
> /usr/share/fonts/truetype/
> And various slash-no-slash on the ends.
In that case:
$ cat fonts.conf
<fontconfig>
<dir>/usr/share/fonts</dir>
<selectfont>
<rejectfont><glob>/usr/share/fonts/*</glob></rejectfont>
<acceptfont>
<glob>/usr/share/fonts/truetype</glob>
<glob>/usr/share/fonts/truetype/dejavu</glob>
<glob>/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf</glob>
</acceptfont>
</selectfont>
</fontconfig>
$ FONTCONFIG_FILE=`pwd`/fonts.conf ./fc-list/fc-list
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
This works for me. don't put a slash at the end of directory path.
--
Akira TAGOH
More information about the Fontconfig
mailing list