Skip to main content

An API for interacting with the parts of fonts during the font development process.

Project description

Build Status Code Health PyPI Python Versions

FontParts

An API for interacting with the parts of fonts during the font development process. FontParts is a strong candidate to replace RoboFab. The project has a MIT open-source licence.

The documentation is at fontparts.readthedocs.io.

This is a work in progress. We are still working out the API, abstract implementation, example implementation, test suite and documentation.

Want to contribute? Great! These issues need help. Also, feedback is very much welcome, please open an issue when you run into something that you wish fontParts did/didn’t do.

Installation

FontParts requires Python 2.7, 3.4 or later.

The package is listed in the Python Package Index (PyPI), so you can install it with pip:

pip install fontParts

If you would like to contribute to its development, you can clone the repository from Github, install the package in ‘editable’ mode and modify the source code in place. We recommend creating a virtual environment, using virtualenv or Python 3 venv module.

# download the source code to 'fontParts' folder
git clone https://github.com/robofab-developers/fontParts.git
cd fontParts

# create new virtual environment called e.g. 'fontParts-venv', or anything you like
python -m virtualenv fontParts-venv

# source the `activate` shell script to enter the environment (Un\*x); to exit, just type `deactivate`
. fontParts-venv/bin/activate

# to activate the virtual environment in Windows `cmd.exe`, do
fontParts-venv\Scripts\activate.bat

# install in 'editable' mode
pip install -e .

Testing

Testing is setup so that each environment that includes fontParts can provides the objects needed to run a common set of tests. This makes testing very easy for environments that use fontParts (for example, see the noneLab test.py script), but it means testing is different than other python packages.

Automated testing of the package is done in the nonelab environment. nonelab is fontParts for the commandline, implemented with defcon and is included as part of the fontParts package.

To run the test suite, you can do:

python Lib/fontParts/nonelab/test.py

To test in other environments, run the test script provided by that environment.

You can also use tox to automatically run tests on different Python versions in isolated virtual environments.

pip install tox
tox

Note that when you run tox without arguments, the tests are executed for all the environments listed in tox.ini’s envlist. In our case, this includes Python 2.7 and 3.6, so for this to work the python2.7 and python3.6 executables must be available in your PATH.

You can specify an alternative environment list via the -e option, or the TOXENV environment variable:

tox -e py27-nocov
TOXENV="py36-cov,htmlcov" tox

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

fontParts-0.1.1.zip (109.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fontParts-0.1.1-py2.py3-none-any.whl (104.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file fontParts-0.1.1.zip.

File metadata

  • Download URL: fontParts-0.1.1.zip
  • Upload date:
  • Size: 109.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fontParts-0.1.1.zip
Algorithm Hash digest
SHA256 d87c6d2c526f029eb118c30f5e5d09482b0733d9c01b6565cc35efe21508c27f
MD5 171dac7fdf05b0da7922483d308c85e6
BLAKE2b-256 d2e1ac2bac848d68cd07782145f7a273468504f2013e753fdb5734d46b1f35ee

See more details on using hashes here.

File details

Details for the file fontParts-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fontParts-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 00a63dc6b930f7731dc703bd208e1ceb6be3d781b2f82860db123cc28b3656a9
MD5 16051d6fa0bcb8ef8576946df00b3619
BLAKE2b-256 c98d3f7a7315b8fa2c58ce541e782cb9c57f7bb750bbbc4ddc89489b58708394

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page