fclist-cffi-1.1.2
توضیحات
Python cffi bridge to fontconfig's FcFontList/FcFontMatch
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fclist-cffi-1.1.2 |
| نام | fclist-cffi |
| نسخه کتابخانه | 1.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Yoan Tournade |
| ایمیل نویسنده | y@yoantournade.com |
| آدرس صفحه اصلی | https://github.com/MonsieurV/python-fclist |
| آدرس اینترنتی | https://pypi.org/project/fclist-cffi/ |
| مجوز | MIT |
### Python cffi bridge to fontconfig's FcFontList/FcFontMatch
Note: this is [a plublished](https://pypi.org/project/fclist-cffi/) fork of tarruda [`python-fclist`](https://github.com/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
```sh
pip install fclist-cffi
```
### 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).
### Tests
Tests are written to use [pytest].
[cffi module]: https://cffi.readthedocs.io/en/latest/
[pytest]: https://docs.pytest.org
نیازمندی
| مقدار | نام |
|---|---|
| - | cffi |
نحوه نصب
نصب پکیج whl fclist-cffi-1.1.2:
pip install fclist-cffi-1.1.2.whl
نصب پکیج tar.gz fclist-cffi-1.1.2:
pip install fclist-cffi-1.1.2.tar.gz