linux find system font files
I do not know how to correctly find the system font files on linux.
From what I have learned, my current algorith is this:
1. read the /etc/fonts/fonts.conf
note all direcotry paths from <dir></dir> elements
example:
I note /usr/share/fonts fonts <dir>/usr/share/fonts</dir>
2. use fc-match to match a font family. get the font file name from the output from fc-match. search inside the directories from (1) for that font file.
example:
fc-match arial
n019003l.pfb: "Nimbus Sans L" "Regular"
find /usr/share/fonts/ -name n019003l.pfb
/usr/share/fonts/default/Type1/n019003l.pfb
//------
Is this approach for finding fonts portable? Can I use this on Ubuntu, Centos, Debian etc.?
Is fc-match itself portable?
Thanks
|