blob: 34e390bc567fc5c8bb5db68581e482865ac38f3b [file] [log] [blame]
Russ Coxaf5018f2020-03-09 23:54:35 -04001# Go fonts
Rob Pikec1295682016-11-16 17:58:50 -0800216 Nov 2016
Russ Coxfaf1e2d2020-03-14 09:44:01 -04003Summary: Announcing the Go font family, by Bigelow & Holmes.
Rob Pikec1295682016-11-16 17:58:50 -08004
5Nigel Tao
6
7Chuck Bigelow
8
9Rob Pike
10
Russ Coxaf5018f2020-03-09 23:54:35 -040011## An Announcement
Rob Pikec1295682016-11-16 17:58:50 -080012
13The experimental user interface toolkit being built at
Russ Coxaf5018f2020-03-09 23:54:35 -040014[`golang.org/x/exp/shiny`](https://godoc.org/golang.org/x/exp/shiny)
Rob Pikec1295682016-11-16 17:58:50 -080015includes several text elements, but there is a problem with testing them:
16What font should be used?
17Answering this question led us to today's announcement,
Russ Coxaf5018f2020-03-09 23:54:35 -040018the release of a family of high-quality [WGL4](https://en.wikipedia.org/wiki/Windows_Glyph_List_4) TrueType fonts,
19created by the [Bigelow & Holmes](http://bigelowandholmes.typepad.com/) type foundry specifically for the Go project.
Rob Pikec1295682016-11-16 17:58:50 -080020
Russ Cox482079d2020-03-09 22:11:04 -040021The font family, called Go (naturally), includes proportional- and fixed-width faces in normal,
22bold, and italic renderings.
Rob Pikec1295682016-11-16 17:58:50 -080023The fonts have been tested for technical uses, particularly programming.
24Go source code looks particularly good when displayed in Go fonts, as its name implies, with things like
25punctuation characters easily distinguishable and operators lined up and placed consistently:
26
Rob Pike165bdf82016-11-17 14:55:35 -080027.image go-fonts/go-font-code.png _ 519
Rob Pikec1295682016-11-16 17:58:50 -080028
29Perhaps the most remarkable feature of the Go fonts is their license:
30They are licensed under the same open source license as the rest of the Go project's software,
31an unusually free arrangement for a high-quality font set.
32
33Here are samples of the proportionally-spaced...
34
35.image go-fonts/go-regular.png _ 600
36
37and monospaced fonts:
38
39.image go-fonts/go-mono.png _ 600
40
Russ Coxaf5018f2020-03-09 23:54:35 -040041## How to use them
Rob Pikec1295682016-11-16 17:58:50 -080042
43If you just want the TTF files, run
44
45 git clone https://go.googlesource.com/image
Russ Cox7fd29cb2020-03-09 23:23:49 -040046
Rob Pikec1295682016-11-16 17:58:50 -080047and copy them from the subsequent `image/font/gofont/ttfs` directory.
48If you want to use Go (the fonts) with Go (the software), each font is provided by a separate package.
49To use the Go Regular font in a program, import `golang.org/x/image/font/gofont/goregular`, and write:
50
Rob Pikec1295682016-11-16 17:58:50 -080051 font, err := truetype.Parse(goregular.TTF)
52
Russ Coxaf5018f2020-03-09 23:54:35 -040053The [`github.com/golang/freetype/truetype`](https://godoc.org/github.com/golang/freetype/truetype)
54package provides the [`truetype.Parse`](https://godoc.org/github.com/golang/freetype/truetype#Parse) function today.
Rob Pikec1295682016-11-16 17:58:50 -080055There is also work underway to add a TrueType package under `golang.org/x`
56again licensed under the same open source license as the rest of the Go project's software.
57
Rob Pikec1295682016-11-16 17:58:50 -080058We leave it to you to find some of the other unusual properties the fonts have,
59but for an overview of the fonts' design we asked Chuck Bigelow to provide some background.
60The remainder of this blog post is his response.
61
Russ Coxaf5018f2020-03-09 23:54:35 -040062## Notes on the fonts, by Chuck Bigelow
Rob Pikec1295682016-11-16 17:58:50 -080063
64The Go fonts are divided into two sets, Go proportional, which is
65sans-serif, and Go Mono, which is slab-serif.
66
Russ Coxaf5018f2020-03-09 23:54:35 -040067## Go proportional fonts
Rob Pikec1295682016-11-16 17:58:50 -080068
Russ Coxaf5018f2020-03-09 23:54:35 -040069### Sans-serif
Rob Pikec1295682016-11-16 17:58:50 -080070
71Go proportional fonts are sans-serif, like several popular fonts
Russ Cox7fd29cb2020-03-09 23:23:49 -040072for screen displays. There is some evidence that some sans-serif
73faces at small sizes and low resolutions on screens are slightly
74more legible than their seriffed counterparts, while at large sizes,
75there is not a significant difference in legibility between sans and
Rob Pikec1295682016-11-16 17:58:50 -080076seriffed faces, at least in the pair tested. [1] (The bracketed numbers
77refer to the references listed at the end of this article.)
78
Russ Coxaf5018f2020-03-09 23:54:35 -040079### Style
Rob Pikec1295682016-11-16 17:58:50 -080080
81Go sans-serif fonts are "humanist" rather than "grotesque" in
Russ Cox7fd29cb2020-03-09 23:23:49 -040082style. This is an historical distinction, not an aesthetic judgment.
83Widely used sans-serif fonts like Helvetica and Arial are called
84grotesque because an early 19th century sans-serif typeface
85was named "Grotesque," and the name became generic.
Rob Pikec1295682016-11-16 17:58:50 -080086
Russ Cox7fd29cb2020-03-09 23:23:49 -040087The shapes of modern grotesque fonts like Helvetica are sculpted,
88with smooth, assimilated forms.
Rob Pikec1295682016-11-16 17:58:50 -080089
Russ Cox7fd29cb2020-03-09 23:23:49 -040090Humanist sans-serifs are derived from Humanist handwriting
91and early fonts of the Italian Renaissance and still show subtle
Rob Pikec1295682016-11-16 17:58:50 -080092traces of pen-written calligraphy. There is some evidence that
Russ Cox7fd29cb2020-03-09 23:23:49 -040093humanist fonts are more legible than grotesque fonts. [2]
Rob Pikec1295682016-11-16 17:58:50 -080094
Russ Coxaf5018f2020-03-09 23:54:35 -040095### Italics
Rob Pikec1295682016-11-16 17:58:50 -080096
Russ Cox7fd29cb2020-03-09 23:23:49 -040097Go proportional italics have the same width metrics as the roman
Rob Pikec1295682016-11-16 17:58:50 -080098fonts. Go italics are oblique versions of the romans, with one
Russ Cox7fd29cb2020-03-09 23:23:49 -040099noticeable exception: the italic lowercase 'a' is redesigned as a
100cursive single-story form to harmonize with the bowl shapes of
Rob Pikec1295682016-11-16 17:58:50 -0800101the b d g p q set, in which the upright forms also adapt well to
Russ Cox7fd29cb2020-03-09 23:23:49 -0400102slanting, The addition of cursive 'a' makes the italics appear more
103lively than a simply slanted roman. Some typographers believe that
Rob Pikec1295682016-11-16 17:58:50 -0800104slanted roman sans-serif italics are preferable to truly "cursive" sans
105Italics, in part because of history and design. [3]
106
107.image go-fonts/abdgpq-proportional.png
108
Russ Coxaf5018f2020-03-09 23:54:35 -0400109### The x-height
Rob Pikec1295682016-11-16 17:58:50 -0800110
Russ Cox7fd29cb2020-03-09 23:23:49 -0400111The x-height of a typeface is the height of the lowercase 'x' relative
Rob Pikec1295682016-11-16 17:58:50 -0800112to the body size. The x-height of Go fonts is 53.0% of body size, a
113bit larger than the x-heights of Helvetica (52.3%) or Arial (51.9%),
Russ Cox7fd29cb2020-03-09 23:23:49 -0400114but the difference is usually unnoticeable at normal reading sizes.
115Typographers believe that larger x-heights contribute to greater
Rob Pikec1295682016-11-16 17:58:50 -0800116legibility in small sizes and on screens. A study of "print size"
Russ Cox7fd29cb2020-03-09 23:23:49 -0400117(particularly x-height) and reading noted that types for reading on
Rob Pikec1295682016-11-16 17:58:50 -0800118screens and for small sizes tend to have large x-heights. [4]
119
Russ Coxaf5018f2020-03-09 23:54:35 -0400120### DIN Legibility Standard
Rob Pikec1295682016-11-16 17:58:50 -0800121
122The recent German DIN 1450 legibility standard recommends
123several features for font legibility, including differentiation of
Russ Cox7fd29cb2020-03-09 23:23:49 -0400124letter shapes to reduce confusion. The Go fonts conform to the
Rob Pikec1295682016-11-16 17:58:50 -08001251450 standard by carefully differentiating zero from capital O;
Russ Cox7fd29cb2020-03-09 23:23:49 -0400126numeral 1 from capital I (eye) and lowercase l (ell); numeral 5 from
Rob Pikec1295682016-11-16 17:58:50 -0800127capital S; and numeral 8 from capital B. The shapes of bowls of
Russ Cox7fd29cb2020-03-09 23:23:49 -0400128b d p q follow the natural asymmetries of legible Renaissance
Rob Pikec1295682016-11-16 17:58:50 -0800129handwriting, aiding differentiation to reduce confusion. [5]
130
Russ Coxaf5018f2020-03-09 23:54:35 -0400131### Weights
Rob Pikec1295682016-11-16 17:58:50 -0800132
Russ Cox7fd29cb2020-03-09 23:23:49 -0400133The Go proportional fonts come in three weights: Normal, Medium,
134and Bold. The Normal weight is strong enough that it maintains
135clarity on backlit screens, which often tend to erode letter features
136and thickness. The Medium weight has stem thickness 1.25 times
Rob Pikec1295682016-11-16 17:58:50 -0800137the Normal, for greater sturdiness on bright screens or for users
Russ Cox7fd29cb2020-03-09 23:23:49 -0400138who prefer a sturdy font. The Bold weight has stem thickness
Rob Pikec1295682016-11-16 17:58:50 -08001391.5 times the Normal, bold enough to be distinct from the normal
Russ Cox7fd29cb2020-03-09 23:23:49 -0400140weight. These Go fonts have CSS numerical weights of 400, 500,
141and 600. Although CSS specifies "Bold" as a 700 weight and 600
142as Semibold or Demibold, the Go numerical weights match the
143actual progression of the ratios of stem thicknesses:
Rob Pikec1295682016-11-16 17:58:50 -0800144Normal:Medium = 400:500; Normal:Bold = 400:600. The Bold
145weight name matches the use of Bold as the usual corresponding
146bold weight of a normal font. More discussion of the relationship of
147stem thicknesses, weight names, and CSS numbering is in [6].
148
Russ Coxaf5018f2020-03-09 23:54:35 -0400149### WGL4 character set
Rob Pikec1295682016-11-16 17:58:50 -0800150
151The WGL4 character set, originally developed by Microsoft, is often
Russ Cox7fd29cb2020-03-09 23:23:49 -0400152used as an informal standard character set. WGL4 includes Western
153and Eastern European Latin characters plus Modern Greek and
Rob Pikec1295682016-11-16 17:58:50 -0800154Cyrillic, with additional symbols, signs, and graphical characters,
Russ Cox7fd29cb2020-03-09 23:23:49 -0400155totalling more than 650 characters in all. The Go WGL4 fonts can
Rob Pikec1295682016-11-16 17:58:50 -0800156be used to compose a wide range of languages. [7]
157
Russ Coxaf5018f2020-03-09 23:54:35 -0400158### Metric compatibility with Arial and Helvetica
Rob Pikec1295682016-11-16 17:58:50 -0800159
Russ Cox7fd29cb2020-03-09 23:23:49 -0400160The Go sans-serif fonts are nearly metrically compatible with
Rob Pikec1295682016-11-16 17:58:50 -0800161standard Helvetica or Arial characters. Texts set in Go occupy
Russ Cox7fd29cb2020-03-09 23:23:49 -0400162nearly the same space as texts in Helvetica or Arial (at the same
Rob Pikec1295682016-11-16 17:58:50 -0800163size), but Go has a different look and texture because of its
Russ Cox7fd29cb2020-03-09 23:23:49 -0400164humanist style. Some Go letters with DIN legibility features are
165wider than corresponding letters in Helvetica or Arial, so some
166texts set in Go may take slightly more space.
Rob Pikec1295682016-11-16 17:58:50 -0800167
Russ Coxaf5018f2020-03-09 23:54:35 -0400168## Go Mono fonts
Rob Pikec1295682016-11-16 17:58:50 -0800169
Russ Coxaf5018f2020-03-09 23:54:35 -0400170### Monospaced
Rob Pikec1295682016-11-16 17:58:50 -0800171
172Go Mono fonts are monospacedeach letter has the same width as
Russ Cox7fd29cb2020-03-09 23:23:49 -0400173the other letters. Monospaced fonts have been used in programming
Rob Pikec1295682016-11-16 17:58:50 -0800174since the beginning of computing and are still widely used because the
Russ Cox7fd29cb2020-03-09 23:23:49 -0400175typewriter regularity of their spacing makes text align in columns and
176rows, a style also found in Greek inscriptions of the 5th century BC.
177(The ancient Greeks didn't have typewriters or computer keyboards,
Rob Pikec1295682016-11-16 17:58:50 -0800178but they did have great mathematicians and a great sense of symmetry
179and pattern that shaped their alphabet.)
180
Russ Coxaf5018f2020-03-09 23:54:35 -0400181### Slab-serif
Rob Pikec1295682016-11-16 17:58:50 -0800182
Russ Cox7fd29cb2020-03-09 23:23:49 -0400183The Go Mono fonts have slab-shaped serifs, giving them a sturdy
184appearance.
Rob Pikec1295682016-11-16 17:58:50 -0800185
Russ Coxaf5018f2020-03-09 23:54:35 -0400186### Style
Rob Pikec1295682016-11-16 17:58:50 -0800187
Russ Cox7fd29cb2020-03-09 23:23:49 -0400188The underlying letter shapes of Go Mono are, like the Go sans-serif fonts,
189derived from humanist handwriting, but the monospacing and slab serifs
190tend to obscure the historical and stylistic connections.
Rob Pikec1295682016-11-16 17:58:50 -0800191
Russ Coxaf5018f2020-03-09 23:54:35 -0400192### Italics
Rob Pikec1295682016-11-16 17:58:50 -0800193
194Go Mono Italics are oblique versions of the romans, with the exception
Russ Cox7fd29cb2020-03-09 23:23:49 -0400195that the italic lowercase 'a' is redesigned as a cursive single-story form
196to harmonize with the bowl shapes of the b d g p q. The cursive 'a' makes
Rob Pikec1295682016-11-16 17:58:50 -0800197the italics appear more lively than a simply slanted roman. As with many
198sans-serif fonts, it is believed that slanted roman slab-serifs fonts may
199be more legible than truly "cursive" italics.
200
201.image go-fonts/abdgpq-mono.png
202
Russ Coxaf5018f2020-03-09 23:54:35 -0400203### The x-height
Rob Pikec1295682016-11-16 17:58:50 -0800204
205Go Mono fonts have the same x-height as Go sans-serif fonts, 53% of
Russ Cox7fd29cb2020-03-09 23:23:49 -0400206the body size. Go Mono looks almost 18% bigger than Courier, which
Rob Pikec1295682016-11-16 17:58:50 -0800207has an x-height 45% of body size. Yet Go Mono has the same width
208as Courier, so the bigger look is gained with no loss of economy in
Russ Cox7fd29cb2020-03-09 23:23:49 -0400209characters per line.
Rob Pikec1295682016-11-16 17:58:50 -0800210
Russ Coxaf5018f2020-03-09 23:54:35 -0400211### DIN Legibility Standard
Rob Pikec1295682016-11-16 17:58:50 -0800212
Russ Cox7fd29cb2020-03-09 23:23:49 -0400213Go Mono fonts conform to the DIN 1450 standard by differentiating
214zero from capital O; numeral 1 from capital I (eye) and lowercase l (ell);
215numeral 5 from capital S; and numeral 8 from capital B. The shapes of
216bowls of b d p q follow the natural asymmetries of legible Renaissance
217handwriting, aiding differentiation and reducing confusion.
Rob Pikec1295682016-11-16 17:58:50 -0800218
Russ Coxaf5018f2020-03-09 23:54:35 -0400219### Weights
Rob Pikec1295682016-11-16 17:58:50 -0800220
Russ Cox7fd29cb2020-03-09 23:23:49 -0400221Go Mono fonts have two weights: Normal and Bold. The normal weight
222stem is the same as in Go Normal and thus maintains clarity on backlit
Rob Pikec1295682016-11-16 17:58:50 -0800223screens, which tend to erode letter features and stem thickness. The
224bold stem thickness is 1.5 times thicker than the normal weight, hence
Russ Cox7fd29cb2020-03-09 23:23:49 -0400225the Bold Mono has the same stem thickness as Bold Go proportional.
226Because the letter width of monospaced bold is identical to the width of
227monospaced normal, the bold Mono appears slightly bolder than the
Rob Pikec1295682016-11-16 17:58:50 -0800228proportional Go Bold, as more black pixels are put into the same area.)
229
Russ Coxaf5018f2020-03-09 23:54:35 -0400230### Metric compatibility with popular monospaced fonts
Rob Pikec1295682016-11-16 17:58:50 -0800231
232Go Mono is metrically compatible with Courier and other monospaced
Russ Cox7fd29cb2020-03-09 23:23:49 -0400233fonts that match the "Pica" typewriter type widths of 10 characters per
234linear inch at 12 point. At 10 point, Go Mono fonts set 12 characters
Rob Pikec1295682016-11-16 17:58:50 -0800235per inch. The TrueType fonts are scalable, of course, so Go Mono can
Russ Cox7fd29cb2020-03-09 23:23:49 -0400236be set at any size.
Rob Pikec1295682016-11-16 17:58:50 -0800237
Russ Coxaf5018f2020-03-09 23:54:35 -0400238### WGL4 character set
Rob Pikec1295682016-11-16 17:58:50 -0800239
240The Go Mono fonts offer the WGL4 character set often used as an
Russ Cox7fd29cb2020-03-09 23:23:49 -0400241informal standard character set. WGL4 includes Western and Eastern
242European Latin characters plus Modern Greek and Cyrillic, with
243additional symbols, signs, and graphical characters. The 650+ characters
Rob Pikec1295682016-11-16 17:58:50 -0800244of the Go WGL4 sets can be used for a wide range of languages.
245
Russ Coxaf5018f2020-03-09 23:54:35 -0400246## References
Rob Pikec1295682016-11-16 17:58:50 -0800247
Russ Cox482079d2020-03-09 22:11:04 -0400248[1] Morris, R. A., Aquilante, K., Yager, D., & Bigelow, C.
249(2002, May). P‐13: Serifs Slow RSVP Reading at Very Small Sizes,
250but Don't Matter at Larger Sizes.
251In SID Symposium Digest of Technical Papers (Vol.
25233, No. 1, pp. 244-247). Blackwell Publishing Ltd.
Rob Pikec1295682016-11-16 17:58:50 -0800253
Russ Cox482079d2020-03-09 22:11:04 -0400254[2] Bryan Reimer et al. (2014) Assessing the impact of typeface design
255in a text-rich automotive user interface”,
256Ergonomics, 57:11, 1643-1658.
Rob Pikec1295682016-11-16 17:58:50 -0800257http://www.tandfonline.com/doi/abs/10.1080/00140139.2014.940000
258
Russ Cox482079d2020-03-09 22:11:04 -0400259[3] Adrian Frutiger - Typefaces: The Complete Works.
260H. Osterer and P. Stamm, editors. Birkhäuser,
261Basel, 2009, page 257.
Rob Pikec1295682016-11-16 17:58:50 -0800262
Russ Cox482079d2020-03-09 22:11:04 -0400263[4] Legge, G. E., & Bigelow, C. A. (2011).
264Does print size matter for reading? A review of findings from vision science and typography.
265Journal of Vision, 11(5), 8-8. http://jov.arvojournals.org/article.aspx?articleid=2191906
Rob Pikec1295682016-11-16 17:58:50 -0800266
Russ Cox7fd29cb2020-03-09 23:23:49 -0400267[5] Charles Bigelow. "Oh, oh, zero!" TUGboat, Volume 34 (2013), No. 2.
Rob Pikec1295682016-11-16 17:58:50 -0800268https://tug.org/TUGboat/tb34-2/tb107bigelow-zero.pdf
269https://tug.org/TUGboat/tb34-2/tb107bigelow-wang.pdf
270
Rob Pikec1295682016-11-16 17:58:50 -0800271[6] "Lucida Basic Font Weights" Bigelow & Holmes.
272http://lucidafonts.com/pages/facts
273
Rob Pikeeef58282016-11-16 23:22:49 -0800274[7] WGL4 language coverage: Afrikaans, Albanian, Asu, Basque,
275Belarusian, Bemba, Bena, Bosnian, Bulgarian, Catalan, Chiga,
276Colognian, Cornish, Croatian, Czech, Danish, Embu, English, Esperanto,
277Estonian, Faroese, Filipino, Finnish, French, Friulian, Galician,
278Ganda, German, Greek, Gusii, Hungarian, Icelandic, Inari Sami,
279Indonesian, Irish, Italian, Jola-Fonyi, Kabuverdianu, Kalaallisut,
280Kalenjin, Kamba, Kikuyu, Kinyarwanda, Latvian, Lithuanian, Lower
281Sorbian, Luo, Luxembourgish, Luyia, Macedonian, Machame, Makhuwa-Meetto,
282Makonde, Malagasy, Malay, Maltese, Manx, Meru, Morisyen, North
283Ndebele, Northern Sami, Norwegian Bokmål, Norwegian Nynorsk, Nyankole,
284Oromo, Polish, Portuguese, Romanian, Romansh, Rombo, Rundi, Russian,
285Rwa, Samburu, Sango, Sangu, Scottish Gaelic, Sena, Serbian, Shambala,
286Shona, Slovak, Slovenian, Soga, Somali, Spanish, Swahili, Swedish,
287Swiss German, Taita, Teso, Turkish, Turkmen, Upper Sorbian, Vunjo,
288Walser, Welsh, Zulu
Rob Pikec1295682016-11-16 17:58:50 -0800289
Russ Coxaf5018f2020-03-09 23:54:35 -0400290## Jabberwocky in Go Regular
Rob Pikec1295682016-11-16 17:58:50 -0800291
Russ Coxaf5018f2020-03-09 23:54:35 -0400292From [en.wikipedia.org/wiki/Jabberwocky](https://en.wikipedia.org/wiki/Jabberwocky):
Rob Pikec1295682016-11-16 17:58:50 -0800293
294.image go-fonts/go-font-jabberwocky.png _ 500
295
Russ Coxaf5018f2020-03-09 23:54:35 -0400296There is no Greek version listed. Instead, a pangram from [clagnut.com/blog/2380/#Greek](http://clagnut.com/blog/2380/#Greek):
Rob Pikec1295682016-11-16 17:58:50 -0800297
298.image go-fonts/go-font-greek.png _ 530