Skip to main content

A lib for guessing font name

Project description

Overview

fontname is a lib for guessing font name, in other words, reading and decoding quirk encoded raw font name.

It current supports SFNT format fonts, and is adept at dealing with CJK fonts.

It has been tested with hundreds fonts, but there will be many fonts still not supported, bug report is welcomed.

Installation

pip install fontname

fontname require freetype-py, it will be installed automatic.

Usage example

from fontname import guess_font_name
name = guess_font_name("FZZhunYuan-M02.ttf")
assert name == "方正准圆_GBK"

License

fontname is release under MIT license

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

fontname-0.2.0.zip (7.1 kB view hashes)

Uploaded Source

Built Distribution

fontname-0.2.0-py2.py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 2 Python 3

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