Metadata-Version: 2.4
Name: fontconfig-py
Version: 0.2.0
Summary: Python bindings to fontconfig
Author-email: Kota Yamaguchi <yamaguchi_kota@cyberagent.co.jp>
License-Expression: MIT AND FTL
Requires-Python: <4.0,>=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Provides-Extra: docs
Requires-Dist: sphinx>=7.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=3.0; extra == "docs"
Dynamic: license-file

# fontconfig-py

[![PyPI version](https://badge.fury.io/py/fontconfig-py.svg)](https://pypi.org/project/fontconfig-py)
[![Docs status](https://readthedocs.org/projects/fontconfig-py/badge/)](https://fontconfig-py.readthedocs.io/)

Python bindings to [fontconfig](https://www.freedesktop.org/wiki/Software/fontconfig/) based on Cython.

Currently, Linux and macOS are supported.

## Install

Install from the PyPI:

```bash
pip install fontconfig-py
```

## Usage

The following demonstrates the usage of `fontconfig.query` to identify English
fonts in the system:

```python
import fontconfig

fonts = fontconfig.query(where=":lang=en", select=("family", "file"))
for font in fonts:
    print(font)
```

## Development notes

There are other Python wrappers for fontconfig:

- [fontconfig](https://pypi.org/project/fontconfig/): CFFI bindings for fontconfig
- [python_fontconfig](https://github.com/ldo/python_fontconfig): Python wrapper based on ctypes
- [Python_fontconfig](https://pypi.org/project/Python-fontconfig/): Unmaintained Cython wrapper

The features of this package are the following:

- Cython-based wrapper
- Statically linked binary wheels; no runtime dependency
- Continuous integration to the PyPI distribution
- [User documentation](https://fontconfig-py.readthedocs.io/)
- MIT license

## License notice

This project is distributed under [MIT license](LICENSE).
The binary wheels bundles [fontconfig](https://www.fontconfig.org) and [freetype](https://www.freetype.org) under different licenses.
See [NOTICE](NOTICE).
