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
find.

###Usage

```python
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.family, font.style, 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
fontconfig.h.

`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.

Source Distribution

fclist-1.1.1.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file fclist-1.1.1.tar.gz.

File metadata

  • Download URL: fclist-1.1.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fclist-1.1.1.tar.gz
Algorithm Hash digest
SHA256 b17940098d7c94146faf8f3011018c37a43411704c7abd7a517b7b4a6f5129d6
MD5 f9eaa68d936b26a6a38dd52148ab0ed8
BLAKE2b-256 b19e4f35bdb8a06f2b3b7b6e90bf215cd29724b38c75b6c282d0ce4690e007b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page