python-fontconfig
python-fontconfig copied to clipboard
request pattern match
In sh
fc-match -a 'sans'
You may get the matched font list.
So may you create the liked feature?
I need get font object by
for font in fonts:
print font....
But I get a str object. How I get font object?
Pass the string to fontconfig.FcFont. Also note that https://github.com/lilydjwg/python-fontconfig recently add ttc font support, or you'll always get the first in the file.