Skip to main content

Python bindings for Fontconfig library

Project description

Python bindings for Fontconfig library


Tested on

  • Python 2.7.2 (32-bit, 64-bit)

  • Python 3.2.2 (32-bit, 64-bit)


From PyPI:

>>> pip install Python-fontconfig


>>> easy_install Python-fontconfig

From GitHub:

>>> git clone git://
>>> cd python-fontconfig/
>>> python install

Building C source

>>> python build_ext -i


>>> cd test/
>>> python


>>> import fontconfig
>>> fonts = fontconfig.query(family='ubuntu', lang='en')
>>> fonts
>>> font = fonts[0]
>>> font
<FcFont: Ubuntu>
>>> font.
font.capability     font.fullname       font.slant
font.count_chars    font.get_languages  font.spacing
font.decorative     font.has_char         font.index          font.weight
font.file           font.outline        font.width
font.fontformat     font.print_pattern
font.foundry        font.scalable
[('en', 'Ubuntu')]
>>> font.foundry
>>> font.fontformat
>>> font.has_char('A')
>>> font.file
>>> font = fontconfig.FcFont(font.file)
[('en', 'Ubuntu')]


This program is released under GPLv3 license, see LICENSE for more detail.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Python-fontconfig-0.5.1.tar.gz (45.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page