Note: Making all files takes a considerable amount of time.
It's a CPU and I/O intensive task to compile the fonts and so the build system has been setup to
be able to run many jobs in parallel. Therefore it's recommended to pass the [`-j` flag to make](https://www.gnu.org/software/make/manual/html_node/Parallel.html) and
optionally pipe the fairly verbose output to /dev/null, e.g. `make -j 8 >/dev/null`.
### Editing
This font is stored and authored in the [Unified Font Object (UFO)](http://unifiedfontobject.org/) file format and can be edited by many different software, some free. However, it's only been "tested" with [RoboFont](http://robofont.com/) which is a popular commercial font editor. There's a 30 day fully-functional free trial version of the app, so you can use it for smaller contributions without needing to buy a RoboFont license.
To make life easier for you, configure RoboFont's settings like this:
- Set the grid to 128 units. This means that each grid square equals one pixel at 2x scale.
- Set "Snap points to" to a reasonably high number that's a power-of-two, like 8.
- Set "SHIFT increment" to 16
- Set "CMD SHIFT increment" to 128
When you've made an edit, simply save your changes and run make:
```
$ make
```
*For quick turnaround, consider:*
- Build and test only the "Regular" style.
- Use `misc/notify` to get desktop notifications on builds so that you don't have to sit and wait looking at the terminal while it's building.
E.g. `misc/notify make Regular`
See ["Building"](#Building) for more details.
### Preview & debug
This project comes with a simple web-based application for debugging and
previewing the font. It's a very useful tool to have when working on the font.
- Comes with a large body of sample text data (which is also editable.)
- Provides samples of the most common latin-script pairs, useful for kerning.
- Provides samples of words ordered by commonality in latin scripts with a
preference for English (accessible via common-pair samples.)
- Can show the complete repertoire of the fonts, with correct glyph order and
even RoboFont color labels ("marks").
- Controls for basic font properties like family, weight, italic, size,
line-height, letter-spacing, etc.
- Controls for a lot of font features like ligature sets, contextual alternates,
alternate numerics, etc.
- Controls for web-browser text features like `capitalize`, `uppercase`,
The following will start a local web server (which is only accessible from your local computer; not the internet) that serves the debug-and-preview app:
```
$ docs/serve.sh &
```
You can now visit `http://localhost:2015/lab/`.
After you rebuild some font files, reload the web page to refresh fonts.
Kerning is the concept of harmony in the pace of characters, defined as a set of distances
between specific character pairs, like "A" & "c".
Good kerning makes words more readable. Oftentimes this means that when adjusting kerning,
you have to look at whole words and sentences when adjusting the kerning of a pair, since
the spacing between two characters should work in harmony with the spacing of all other characters.
All major font editors provide user interfaces for previewing and adjusting kerning.
When adding or adjusting kerning:
- Make sure to use kerning groups (`src/Inter-UI-*.ufo/groups.plist`)
- If a glyphname is missing in kerning groups, define a new group for it.
Group naming scheme is: `@KERN_<DIRECTION>_<NAME>` where `<DIRECTION>`
is either `LEFT` or `RIGHT`, depending on if the group represents the left-hand side
of a pair or the right-hand side. `<NAME>` is the name of a glyph that most commonly
represents the group. For instance, for all glyphs that has a left-side shape similar
to "c", like "d", the group name is "c". This makes it easy to test kerning of groups
by just using the `<NAME>` part in previews.
- Try to submit image samples of kerning adjustments with your pull requests whenever
feasible.
The script `misc/kernsample.py` is helpful in generating samples for all existing
right-hand side characters given a left-hand side glyphname.
```txt
$ misc/kernsample.py src/Inter-UI-Black.ufo P -suffix MOR
PAMOR P/AE MOR PJMOR PXMOR PYMOR PZMOR P/ae mor P/ampersand mor P/backslash mor P/dzcaron mor P/eightsub mor P/ellipsis mor Pfmor P/four mor P/guilsinglleft mor P/idieresisacute mor P/periodcentered mor P/quotedblbase mor Psmor P/seven mor P/slash mor Ptmor P/two mor P/underscore mor Pymor
```
Type `misc/kernsample.py -h` for help on how to use the program.
This only includes existing kerning and is thus only useful for adjustments.
No, you don't. To build font files, all you need is Python. To edit the font files, you need something that can edit UFO files (like [RoboFont](http://robofont.com/) or a text editor.)
This probably means that you need to run `./init.sh` to setup the case-sensitive virtual file system mount that is needed by the font build system. Unfortunately the toolchain used (which is the same as for Roboto) requires not only a case-preserving file system, but also a case-sensitive one.