Python bindings to fontconfig based on Cython.
Currently, Linux and macOS are supported.
Install from the PyPI:
pip install fontconfig-py
The following demonstrates the usage of fontconfig.query
to identify English
fonts in the system:
import fontconfig
fonts = fontconfig.query(where=":lang=en", select=("family",))
for font in fonts:
print(font["family"])
There are other Python wrappers for fontconfig:
- fontconfig: CFFI bindings for fontconfig
- python_fontconfig: Python wrapper based on ctypes
- 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
- MIT license
This project is distributed under MIT license. The binary wheels link fontconfig and freetype which are distributed under different licenses. See THIRD-PARTY-NOTICES.txt.