Fontaine font tool
Project description
pyfontaine analyses fonts for their language and character set support.
It has a straightforward pythonic character set definition format (simple example, medium example, complex example)
To add new definitions, just add files to the internals directory - they are autodetected!
It also downloads additional definitions from the Extensis, font-config and Unicode websites.
Installation
Install the latest release easily with the pip installer: sh pip install fontaine; To install the latest development version: sh git clone https://github.com/davelab6/pyfontaine.git; cd pyfontaine; sudo python setup.py install;
Usage
Given a font, it returns a report with some general metadata and th language support analysis. sh pyfontaine font.ttf;
Given a unicode character value, it returns a list of character sets that include that character. sh pyfontaine 0x0061;
To output font reports in various formats: sh 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: sh 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: sh pyfontaine --set African,'Basic Latin','GWF vietnamese' font.ttf;
To print a list of all the missing unicode values from each set: sh pyfontaine --missing font.ttf;
To output visualisations of the coverage using Hilbert curves (thanks for the idea, Øyvind ‘pippin’ Kolås!): sh pyfontaine --coverage font.ttf; ls -l coverage_pngs/; (The PNG files are stored in a new directory, coverage_pngs, under the current directory.)
Python Module
It has a python module. Here is an example script from the Font Bakery project.
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: * Thomas Phinney for the WebINK Character Sets * Behdad Esfabod for the font-config languages definitions * Unicode Consortium for the Unicode Blocks
Dependencies
Mac OS X requires the XCode Command Line Tools to be installed
fonttools (common) or freetype-py (fast)
PyICU <http://pyicu.osafoundation.org/>–
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file fontaine-1.1.5.tar.gz
.
File metadata
- Download URL: fontaine-1.1.5.tar.gz
- Upload date:
- Size: 3.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef9feaeae4af0f2c28ebc881a237c664045e19f5e565bf56369e460c66ee7112 |
|
MD5 | 9d9c0a28861262a68f8f7783d71585cf |
|
BLAKE2b-256 | 476709bd756c3f70d3314a5254e075c04fe47a7615a016320fed1d383f08281e |