Nigel Tao, Chuck Bigelow, and Rob Pike
16 November 2016
An Announcement
The experimental user interface toolkit being built at
golang.org/x/exp/shiny
includes several text elements, but there is a problem with testing them:
What font should be used?
Answering this question led us to today’s announcement,
the release of a family of high-quality WGL4 TrueType fonts,
created by the Bigelow & Holmes type foundry specifically for the Go project.
The font family, called Go (naturally), includes proportional- and fixed-width faces in normal,
bold, and italic renderings.
The fonts have been tested for technical uses, particularly programming.
Go source code looks particularly good when displayed in Go fonts, as its name implies, with things like
punctuation characters easily distinguishable and operators lined up and placed consistently:
Perhaps the most remarkable feature of the Go fonts is their license:
They are licensed under the same open source license as the rest of the Go project’s software,
an unusually free arrangement for a high-quality font set.
Here are samples of the proportionally-spaced…
and monospaced fonts:
How to use them
If you just want the TTF files, run
git clone https://go.googlesource.com/image
and copy them from the subsequent image/font/gofont/ttfs
directory.
If you want to use Go (the fonts) with Go (the software), each font is provided by a separate package.
To use the Go Regular font in a program, import golang.org/x/image/font/gofont/goregular
, and write:
font, err := truetype.Parse(goregular.TTF)
The github.com/golang/freetype/truetype
package provides the truetype.Parse
function today.
There is also work underway to add a TrueType package under golang.org/x
again licensed under the same open source license as the rest of the Go project’s software.
We leave it to you to find some of the other unusual properties the fonts have,
but for an overview of the fonts’ design we asked Chuck Bigelow to provide some background.
The remainder of this blog post is his response.
Notes on the fonts, by Chuck Bigelow
The Go fonts are divided into two sets, Go proportional, which is
sans-serif, and Go Mono, which is slab-serif.
Go proportional fonts
Sans-serif
Go proportional fonts are sans-serif, like several popular fonts
for screen displays. There is some evidence that some sans-serif
faces at small sizes and low resolutions on screens are slightly
more legible than their seriffed counterparts, while at large sizes,
there is not a significant difference in legibility between sans and
seriffed faces, at least in the pair tested. [1] (The bracketed numbers
refer to the references listed at the end of this article.)
Style
Go sans-serif fonts are “humanist” rather than “grotesque” in
style. This is an historical distinction, not an aesthetic judgment.
Widely used sans-serif fonts like Helvetica and Arial are called
grotesque because an early 19th century sans-serif typeface
was named “Grotesque,” and the name became generic.
The shapes of modern grotesque fonts like Helvetica are sculpted,
with smooth, assimilated forms.
Humanist sans-serifs are derived from Humanist handwriting
and early fonts of the Italian Renaissance and still show subtle
traces of pen-written calligraphy. There is some evidence that
humanist fonts are more legible than grotesque fonts. [2]
Italics
Go proportional italics have the same width metrics as the roman
fonts. Go italics are oblique versions of the romans, with one
noticeable exception: the italic lowercase ‘a’ is redesigned as a
cursive single-story form to harmonize with the bowl shapes of
the b d g p q set, in which the upright forms also adapt well to
slanting, The addition of cursive ‘a’ makes the italics appear more
lively than a simply slanted roman. Some typog