Contributions to the Font Bakery source code are welcomed! Please read and follow the instructions in contrib-getting-started
and then use the instructions below to set up a source code development environment.
Important
Please note that the required dependencies are different for documentation development and source code development. Please see the doc-contrib-guide
if you are attempting to improve our docs!
You must have a Python 3 interpreter and the pip
Python package manager installed on your system to participate in Font Bakery development.
Pull the source repository with the following command:
$ git clone https://github.com/googlefonts/fontbakery.git
and navigate to the root of the repository with:
$ cd fontbakery
Execute the following command in the root of the Font Bakery source repository to create a Python virtual environment for development and testing:
$ python3 -m venv fontbakery-venv
Activate the Python virtual environment with:
$ source fontbakery-venv/bin/activate
$ fonttools-venv\Scripts\activate.bat
Next, install the Font Bakery source in editable mode with:
$ pip install -e .
Important
Please note that there are optional non-Python dependencies that must be installed to execute some features in the Font Bakery project. Please see the ../user/installation/index
for additional details.
You are now ready to modify the Font Bakery source files and test your changes.
When your work is complete, deactivate the virtual environment with the following command:
$ deactivate
Please see writing-profiles
for instructions on how to write custom Font Bakery profiles.
Font Bakery check-googlefonts
provides over 130 checks for fonts and families according to the quality requirements of the Google Fonts team. In addition to a complete architectural overhaul, release 0.3.1 introduced a set of code tests to assure the quality of the Font Bakery suite of checks. We aim to reach 100% test coverage.
Tip
You can find test line coverage data at the end of the testing report that is executed for any Travis CI job
In order to run the tests you need to have the tox
dependency and Python interpreter versions that are defined for testing installed.
Install tox
in your virtual environment with:
$ pip install tox
You can find the versions of the Python interpreter that are used for testing in the tox.ini
file. This file is located in the root of the Font Bakery repository.
Use the following command in the root of the source repository to execute the Font Bakery test suite:
$ tox
All proposals for source code modifications, including submissions by project members, require a review process. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests to submit your changes for review.
The test suite that you execute locally with tox
is executed by the Travis CI testing service when you submit a pull request to the repository. Please add new tests that cover your source changes with all proposals. Pull requests cannot be merged if any test fails as a result of your modifications.
Important
Please submit tests that cover all source code changes in your pull request!
The Travis CI build logs can be viewed at https://travis-ci.org/googlefonts/fontbakery.
This project follows Google's Open Source Community Guidelines and the Font Bakery Code of Conduct.
The source code is licensed under the Apache v2.0 License.