dirs
dirs copied to clipboard
directories-next: Add system font directory
There is currently the user writeable font directory, accessible through UserDirs::font_dir, however, I can't seem to find one in BaseDirs. For reliably getting font file paths on the major platforms to use them for example in SDL, it's needed to get the paths to the system font directories as well.
As I see, the locations for fonts on the major platforms are:
- Linux:
/usr/share/fontsand subdirectories, determined throughfc-liston my system (Arch Linux) - Mac OS X:
/System/Library/Fontsand/Library/Fonts, taken from Wikipedia - Windows:
C:\Windows\Fonts, found after usingfind . -type d -iname '*font*'in a clean new Wineprefix
It might be appropiate to return them as a Vec<&Path>, as on Linux and Mac OS X, there are multiple appropiate folders (on Linux the subdirectories of /usr/share/fonts, on Mac OS X /System/Library/Fonts and /Library/Fonts).
Unfortunately I don't have a real system to check if the Mac OS X and Windows paths are right.
I can tackle this one down :) Expect a PR at the end of the week :)