Skip to content
Misc tools for working with the Google Fonts library
Python Other
  1. Python 99.7%
  2. Other 0.3%
Branch: master
Clone or download

Latest commit

m4rc1e Merge pull request #187 from m4rc1e/qa-render
qa: Group VF instances correctly
Latest commit fa9dd7d Mar 19, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
Lib/gftools tests: test_qa added Mar 17, 2020
bin qa: Bump version number Mar 19, 2020
data/test gftools check-vtt-compile added Feb 20, 2020
experimental add missing ; Jun 23, 2016
.gitignore Add distribution and packaging patterns Oct 10, 2018
.gitmodules fix submodule path Nov 16, 2017
.travis.yml Transfer tests from ./tests to Lib/gftools/tests Dec 19, 2019
LICENSE Initial commit Oct 11, 2017 Set QA dependencies as extra requirements Jan 8, 2020
font-metadata.csv font-metadata.csv updated Jun 15, 2016
nametest.nam name update Jun 28, 2016
requirements.txt gftools check-vtt-compile added Feb 20, 2020 Bump version number Mar 18, 2020

Google Fonts Tools

This project contains tools used for working with the Google Fonts collection, plus Google Fonts Glyph Set Documentation in the /encodings subdirectory. While these tools are primarily intended for contributors to the Google Fonts project, anyone who works with fonts could find them useful.

The tools and files under this directory are available under the Apache License v2.0, for details see LICENSE

Google Fonts Official Glyph Sets (Encodings)

Usage Examples

Compare fonts:

gftools compare-font font1.ttf font2.ttf

Add a METADATA.pb to a family directory

gftools add-font ../ofl/newfamily

Sanity check a family directory:

gftools sanity-check --repair_script=/tmp/ ../ofl/josefinsans
gftools sanity-check --repair_script=/tmp/ --fix_type=fsSelection ../ufl

Check a font family against the same family hosted on Google Fonts:

gftools qa [fonts.ttf] -gfb -a -o qa

Add a DSIG table to a font

gftools fix-dsig font1.ttf

Fix a non hinted font

gftools fix-nonhinting font_in.ttf font_out.ttf


Please install these tools using pip:

pip install gftools

If you need to use gftools qa, you will need to install Harfbuzz, Cairo, FreeType and pkg-config. These can be installed on OS X using homebrew:

brew install cairo freetype harfbuzz pkg-config

Once You have installed these system packages, install gftools using the following command:

pip install gftools[qa]

Requirements and Dependencies

These tools depend on the submodule GlyphsInfo. Make sure the submodule is up to date by running:

git submodule update --init --recursive

Google Fonts API Key

In order to use the scripts gftools qa and gftools family-html-snippet, you will need to generate a Google Fonts api key, You will then need to create a new file located on your system at ~/.gf-api-key, which contains the following:

key = your-newly-generated-googlefonts-api-key

Upstream project repos

You can’t perform that action at this time.