Python cffi bridge to fontconfig's FcFontList/FcFontMatch
Note: this is a plublished fork of tarruda python-fclist.
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.
Installing
pip install fclist-cffi
Usage
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).
Tests
Tests are written to use pytest.
Metadata
Release files for fclist-cffi 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fclist-cffi-1.1.2.tar.gz | 3.7 kB | Without provenance | Details for fclist-cffi-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fclist_cffi-1.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for fclist_cffi-1.1.2-py2.py3-none-any.whl |
Total release size: 8.2 kB
Release files / fclist-cffi-1.1.2.tar.gz
| Download URL | fclist-cffi-1.1.2.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1bb3c039156b8b1913b9e582d4a8f1a48b3d8ea56e5152d604c020874a7e779a
|
|
BLAKE2b-256 checksum How to use checksums |
7e457cace5df531d61b2dfd5b313fda77f64e9f85cf8dd27b0a00dcc19ee2057
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Release files / fclist_cffi-1.1.2-py2.py3-none-any.whl
| Download URL | fclist_cffi-1.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e8d0eff93f40a60f611db67aef13283a2de23314b42b6a161d413d3827bc8c04
|
|
BLAKE2b-256 checksum How to use checksums |
1371a8ab7fdc3df972ea80fc42b9874d642a7ef2e69b8b5203978664f03b3ac8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Security for fclist-cffi 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.