kyamagu / fontconfig-py

Python bindings to fontconfig

Home Page:https://fontconfig-py.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Python bindings to fontconfig

https://fontconfig-py.readthedocs.io

License:MIT License


Languages

Language:Cython 83.4%Language:Python 14.3%Language:Shell 2.3%