Skip to main content

Fontaine font tool

Project description

Build Status Health Coverage Status

pyfontaine analyses fonts for their language and character/glyph-set support.

It has a straightforward pythonic set definition format:

Additional definitions are downloaded from the Extensis, font-config and Unicode websites during installation, and can be updated without reinstalling.

Adding your own definitions is easy. All files in the internals directory are auto-detected, so just add definition files there.

Installation

First, install Python and the pip python package manager. This is installed by default with homebrew, so, try to run pip and if it isn’t available then install homebrew, or install pip directly as follows:

curl -O https://bootstrap.pypa.io/get-pip.py;
sudo python get-pip.py;
rm get-pip.py;

On Mac OS X, install the pyicu dependency as follows:

CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip install pyicu;

Install the latest release easily with pip:

sudo pip install fontaine

To install the latest development version:

sudo pip install https://github.com/davelab6/pyfontaine/archive/master.zip;

Usage

Given a list of space separated font filenames, it returns a report with some general metadata and a language support analysis:

pyfontaine font.ttf;

Given a list of space separated unicode characters, or unicode values, it returns a list of character sets that include that character:

pyfontaine 0x0061;
pyfontaine ğ ø ∂;

To output font reports in various formats:

pyfontaine --xml font.ttf;
pyfontaine --json font.ttf;
pyfontaine --csv font.ttf;
pyfontaine --wiki font.ttf;

The –wiki format produces a MediaWiki table (example)

To only show character sets from different collections:

pyfontaine --collections all font.ttf; # default
pyfontaine --collections pyfontaine font.ttf;
pyfontaine --collections uniblocks font.ttf;
pyfontaine --collections extensis font.ttf;
pyfontaine --collections fontconfig font.ttf;
pyfontaine --collections cldr font.ttf;
pyfontaine --collections subsets font.ttf;

To only show specific character sets:

pyfontaine --set africaan,adobe_latin_3 font.ttf;

To print a list of all the missing unicode values from each set:

pyfontaine --missing --set adobe_latin_3 font.ttf;

Update collection data

You can update remote collections data when you are online:

pyfontaine –update-data 1;

Python Module

It has a python module, fontaine

Contributing

Your contributions under the GPLv3 are welcome!

pyfontaine is a python reimplementation of Fontaine by Ed Trager, and has been made by by Vitaly Volkov, Dave Crossland and Mikhail Kashkin.

Thanks

We would like to thank some upstream projects that make pyfontaine even more useful:

Dependencies

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

fontaine-1.3.9.tar.gz (5.0 MB view details)

Uploaded Source

File details

Details for the file fontaine-1.3.9.tar.gz.

File metadata

  • Download URL: fontaine-1.3.9.tar.gz
  • Upload date:
  • Size: 5.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fontaine-1.3.9.tar.gz
Algorithm Hash digest
SHA256 2afaf348e83fc6fa1053392f730dec69042433317f061c3cafcee3f4d2ef7477
MD5 e690045da922541adeeaf6d1c777ddb1
BLAKE2b-256 f94c82fc866be19bced75e6d65b5f4350e7dd03443031971f1d5078e3dae1444

See more details on using hashes here.

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