Right now on linux, Font_FontMgr only searches for fonts in the directories /system/fonts, /usr/share/fonts, and /usr/local/share/fonts. At least on NixOS, none of these directories exist and there is no standard directory where all fonts are stored. (Each font package has its own directory; /etc/fonts/fonts.conf contains an automatically generated list of all font directories.)
This PR adds support for the fontconfig library to Font_FontMgr; fontconfig is the de-facto standard to find fonts on linux. As a nice side-effect, also fonts installed in the user's home directory should be found now.
There is a new cmake option OCE_WITH_FONTCONFIG to disable fontconfig support.
Right now on linux,
Font_FontMgr
only searches for fonts in the directories/system/fonts
,/usr/share/fonts
, and/usr/local/share/fonts
. At least on NixOS, none of these directories exist and there is no standard directory where all fonts are stored. (Each font package has its own directory;/etc/fonts/fonts.conf
contains an automatically generated list of all font directories.)This PR adds support for the
fontconfig
library toFont_FontMgr
;fontconfig
is the de-facto standard to find fonts on linux. As a nice side-effect, also fonts installed in the user's home directory should be found now.There is a new cmake option
OCE_WITH_FONTCONFIG
to disable fontconfig support.