GithubHelp home page GithubHelp logo

kyamagu / fontconfig-py Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 102 KB

Python bindings to fontconfig

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

License: MIT License

Python 14.34% Cython 83.37% Shell 2.29%
fontconfig python

fontconfig-py's Introduction

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.

fontconfig-py's People

Contributors

dependabot[bot] avatar kyamagu avatar

Watchers

 avatar  avatar

fontconfig-py's Issues

Set up documentation

Set up sphinx documentation for the project. The documentation should describe:

  • Overview
  • Install
  • Usage
  • API reference
  • License

This project bundles freetype2, and perhaps that requires having the FTL.txt license file somewhere in the document directory.

fontconfig version issue in the readthedocs environment

Currently, the build process in the readthedocs depends on the fontconfig system package, and that introduces version mismatch with the bundled fontconfig. This causes some APIs missing from the package (#17). Needs to investigate whether it's possible to install the package in the readthedocs environment.

Error cannot load default config file

Simply after installing in a venv I tried to open a shell and try import fontconfig and I get the following error:

Fontconfig error: Cannot load default config file: No such file: (null)

I'm on arch linux and using fontconfig version 2.14.2-1 if it helps.

Is this expected behavior ? It seems weird to get this log using a library for the first time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.