Skip to content

kyamagu/fontconfig-py

Repository files navigation

fontconfig-py

PyPI version Docs status

Python bindings to fontconfig based on Cython.

Currently, Linux and macOS are supported.

Install

Install from the PyPI:

pip install fontconfig-py

Usage

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"])

Development notes

There are other Python wrappers for fontconfig:

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

License notice

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.