Skip to main content

Compile fonts from sources (UFO, Glyphs) to binary (OpenType, TrueType).

Project description

Travis Build Status Python Versions PyPI Version

fontmake

This library provides a wrapper for several other Python libraries which together compile fonts from various sources (.glyphs, .ufo) into binaries (.otf, .ttf).

Installation

Fontmake requires Python 2.7, 3.5 or later.

Releases are available on PyPI and can be installed with pip.

pip install fontmake

Use the -U, --upgrade option to update fontmake and its dependencies to the newest available release:

pip install -U fontmake

Alternatively, you can download the git repository and install from source:

git clone https://github.com/googlei18n/fontmake
cd fontmake
pip install .

Developers who want to quickly test changes to the source code without re-installing, can use the “–editable” option when installing from a local source checkout:

pip install -e .

However, even with an editable installation, it is recommended to always reinstall fontmake after pulling the latest changes from the upstream repo:

git pull
pip install -e .

This makes sure that the requirements are still met, i.e. updating old ones to new minimum required versions, or installing new ones as needed.

It also ensures that the package metadata is updated, e.g. when displaying the installed version with pip list or pip show fontmake.

Virtual environments

It is recommended to install fontmake inside a “virtual environment” to prevent conflicts between its dependencies and other modules installed globally.

You can either install virtualenv (pip install --user virtualenv), or use the Python 3 venv module.

  • To create a new virtual environment, e.g. inside the ‘env’ directory:

    python -m virtualenv env

    Similarly, if you are using the venv module:

    python3 -m venv env
  • To “activate” a virtual environment, i.e. temporarily place the folder containing the executable scripts on the shell’s $PATH so they can be run from anywhere, run this from the Bash shell (e.g., Linux, Mac):

    source env/bin/activate

    If you are using the Windows Command Prompt:

    env/bin/activate.bat
  • To deactivate the virtual environment and restore the original environment, just do:

    deactivate

Dependencies and requirements files

Fontmake is mostly the front-end interface for a number of Python libraries.

These are automatically installed or updated to the minimum required version whenever you install a given fontmake version.

Pip also allows to specify a set of packages that work together in text files. These can be used with the -r option to recreate a particular environment.

There are two such requirements files in fontmake repository:

  • dev_requirements.txt: contains the URLs of the git repositories for all fontmake’s dependencies.

  • requirements.txt: contains the current released versions of the direct dependencies which fontmake is tested against.

To install from the latest development versions, or upgrade an existing environment to the current HEAD commit of the respective master branches, you can do:

pip install -r dev_requirements.txt

For more information on requirements files, see pip documentation.

Usage

After installation, you can use the fontmake console script. For example:

fontmake -g MyFont.glyphs  # outputs binary font files for masters only

Use fontmake -h to see options for specifying different types of input and output.

You can also use fontmake as a module to run intermediate steps in the build process, via methods of the fontmake.font_project.FontProject class.

Project details


Release history Release notifications | RSS feed

This version

1.7.3

Download files

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

Source Distribution

fontmake-1.7.3.zip (35.4 kB view details)

Uploaded Source

Built Distribution

fontmake-1.7.3-py2.py3-none-any.whl (23.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fontmake-1.7.3.zip.

File metadata

  • Download URL: fontmake-1.7.3.zip
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for fontmake-1.7.3.zip
Algorithm Hash digest
SHA256 a60b0cbb6af5198873ef72888be51a06d2690473e146093d45a16602de21857a
MD5 06859efd01e06b8de5f874085c94a1c8
BLAKE2b-256 a245c779b674b784e06267bbf32a346b8d135babe0a95b0e318b71e79e9c12d1

See more details on using hashes here.

Provenance

File details

Details for the file fontmake-1.7.3-py2.py3-none-any.whl.

File metadata

  • Download URL: fontmake-1.7.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for fontmake-1.7.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a48e2c695488acac4e3f9c0385bcc5d525909fca8134e212a85b4c07f54953e8
MD5 13d0856197c700a64836001bd30c26a9
BLAKE2b-256 34dea7611dd7643741b8a2c07d2e464d3f8ae4d609bf91035d71906bedd5260e

See more details on using hashes here.

Provenance

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