Up to Main Index Up to Journal for December, 2016 JOURNAL FOR TUESDAY 6TH DECEMBER, 2016 ______________________________________________________________________________ SUBJECT: Site update DATE: Tue 6 Dec 23:35:06 GMT 2016 For ages I have been searching for a nice font for this site. My requirements were simple enough. Slashed zero, I personally hate plain zeros and I think a dot in the centre of a zero is ugly. A font needs to easy distinguish similar characters. For example 0Oo, 1il, 1IL, 5S$ and 8B. For this site it also needs to be monospaced. I award fonts bonus points as well! Large braces {} [] and () are nice. A middle asterisk that aligns with the plus and minus is nice *+-, or not in this case — oops :( Extra points also if there are the full compliment of superscript numbers. For use on a website the smaller the size of the font file the better. I’ve looked at so many ‘Top gazillion programmer fonts’ articles I was becoming quite discouraged and just left the browser to use whatever monospaced font the visitor had installed and mostly stuck to plain ASCII characters. But then the Go team published a blog article[1] about a new Go font. And it is nice. A little heavy — which I’ve tried to mitigate by lightening the font colour a little and increasing the line spacing — but very nice. It ticks a lot of my boxes for what I want in a font for this site. But why is a specific font important? There are times when I would like to use Unicode. However I have no idea if your browser on your machine would be able to display those characters. It may substitute characters from another font which usually looks peculiar when one character in many is suddenly different. I know adding a font to the site increases the amount of data people have to download. The Go font .ttf file is 157kb and the .woff is 70kb. Either should only be downloaded once and then cached, so I hope this is bearable ;) So what does the font look like? Here are some samples… Day to day ASCII characters: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz Some other useful, less frequently used characters: ‘…’ “…” • ¹²³ ⅛ ¼ ⅜ ½ ⅝ ¾ ⅞ ↑↓←→ ↔↕ †‡ ∑ ∆ ∞ — – £ € Some sample code: func (s *state) AddLock(i has.Inventory) { if i == nil || s.CanLock(i) { return } s.locks = append(s.locks, i) l := len(s.locks) if l == 1 { return } u := i.LockID() for x := 0; x < l; x++ { if s.locks[x].LockID() > u { copy(s.locks[x+1:l], s.locks[x:l-1]) s.locks[x] = i break } } } There are also box drawing and shading characters. As I’ve increased the default line height they don’t look very good and have gaps, so I won‛t include a sample of those :( While messing around with the look and feel of the site I’ve also changed the background to something a little softer than harsh bright white at the request of a few readers :) Now, is this post getting rather long or is it just the line spacing… -- Diddymus [1] Go blog article: https://blog.golang.org/go-fonts Up to Main Index Up to Journal for December, 2016