README.md 3.2 KB

Roboto VF

This is a variable version of Roboto, intended to be a 1:1 match with the official non-variable v2.136 release from github.com/googlefonts/roboto/releases.

This is not an official Google project, but was enabled with generous funding by Google Fonts, who contracted Type Network to make the Variable Fonts upgrade.

Development Process

Roboto v2.136 has static fonts for 6 weights in roman and italic with a normal width, along with 3 weights in roman and italic with a condensed width.

This project began by taking UFO sources generated by the build system of that release, which have quadratic outlines, and fixing some interpolation compatibility issues in the Thin, Regular and Bold files. This work was done by @asaumierdemers and @cjdunn

New sources for the condensed width that extends the weight range to match the normal width were made by @sannorozco using anisotropic interpolation and corrected by hand. With these, the TTF has named instances for all the styles in the v2.136 release, plus additional named instances for all styles along the Weight and Width axes given values in the OpenType OS/2 table.

A new build script was written by @m4rc1e that preserves outline overlaps and generates a Variable Font from these new UFOs; the earlier build system was thus discarded. The hinting was transplanted from the v2.136 release TTFs to VTT using /scripts/helpers/mapper-VTT-gids.py and then adjusted to apply the hinting across the Variable Font design space, by Mike Duggan.

Install and Generate

Create a new virtualenv, activate it, and install some dependencies:

virtualenv env
source env/bin/activate
pip install .
pip install -r requirements.txt

Generate fonts using the build system:

sh sources/build.sh

This will output a new TTF binary in sources/master_ttf/Roboto-Regular.ttf

Font hinting

The fonts have been hinted using Microsoft VTT and compiled using vttLib. The hinting data is stored as xml in sources/vtt-hinting.ttx.

If you would like to make modifications to the hints using VTT, you'll need to do the following:

  • Rebuild the fonts. We MUST ensure that hint modifications are being done on the latest binaries.
  • Make a VTT source font which contains the existing hinting data by running sh sources/make_vtt_src_font.sh. The font will be exported to sources/Roboto[ital,wdth,wght]_VTT.ttf.
  • In VTT, edit the newly generated font.
  • Export the source font's hinting data back to sources/vtt-hinting.ttx by running sh sources/export_vtt_hints.sh
  • Commit your changes using git.

Warning: vttLib doesn't support transformed composites. Please ensure source files do not contain them.

License

All work found in this repo is all available under the Apache license, version 2.0.