Skip to main content

("Python cffi bridge to fontconfig's FcFontList/FcFontMatch",)

Project description

###Python cffi bridge to fontconfig's FcFontList/FcFontMatch

Useful for python programs that need to query information about fonts installed
in the system(use this instead of parsing fc-list output). Requires the
fontconfig shared library installed in a directory that the cffi module can


from fclist import fclist, fcmatch

# Print the family, style and file path of monospace/truetype fonts
for font in fclist(spacing='mono', fontformat='TrueType'):
print,, font.file

# Print the system's default monospace font
print fcmatch('monospace')

`fclist` can receive any keyword arguments that can be passed to the `fc-list`
command, and the returned font objects have most attributes defined by

`fcmatch` receives the same pattern that is normally passed to `fc-match`, but
it doesn't support the --all/--sort options(only returns a single font object).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fclist, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size fclist-1.1.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page