In which, due to my advanced age, I depend on the kindness of strangers
My latest adventure involves fonts. Big, big fonts, for use with my old, old eyes. As I age, I find I need larger and larger print to be comfortable. My eyes get tired easily, and the fix is large, dark print on light backgrounds.
When I boot my Plan 9 VM, I log in as glenda, and the file file /urs/glenda/lib/profile is run as an rc script. It does all kinds of neat stuff, stuff that I’m sure I will one day understand and cherish. For today, there is really only one line I’m interested in:
font=/lib/font/bit/vga/unicode.font
This line stands alone, setting an environment variable with the path to a font. A chunky, old-school, and above all tiny font. This will not stand.
My adventures with…
In which, due to my advanced age, I depend on the kindness of strangers
My latest adventure involves fonts. Big, big fonts, for use with my old, old eyes. As I age, I find I need larger and larger print to be comfortable. My eyes get tired easily, and the fix is large, dark print on light backgrounds.
When I boot my Plan 9 VM, I log in as glenda, and the file file /urs/glenda/lib/profile is run as an rc script. It does all kinds of neat stuff, stuff that I’m sure I will one day understand and cherish. For today, there is really only one line I’m interested in:
font=/lib/font/bit/vga/unicode.font
This line stands alone, setting an environment variable with the path to a font. A chunky, old-school, and above all tiny font. This will not stand.
My adventures with Plan 9 have already taken me far enough out of my comfort zones (in fact, it’s just possible that this whole “change the fonts” detour is due to my frustration at trying to navigate a source tree in acme and not emacs) I’m frustrated, and my eyes are tired. I want a big font. I want a readable, smooth font. I want a familiar font. I want Inconsolata.
Inconsolata is a terrific, easy reading monospaced font, designed for coding on modern displays and made freely available to the culture by its designer. It looks great in emacs, it’ll look great in acme or a Plan 9 terminal. I can download a truetype version of Inconsolata from the creator’s web site (or really an “otf”/opentype font, which seems to be the same thing unless it’s different. I dunno.) I just need to get it installed.
A quick Google later and I’m at ttf2subf, which not only describes what I need to do to get things going (transform the vector ttf font into a fixed size pre-rendered font in some plan 9 native format) but provides me with software to do it. And apologizes for that software not being production grade quality. That is, the author apologizes, while solving my problem, in a clear and well documented way, for free.
There was actually only one hitch getting the whole thing built. Here are the instructions that the author of tty2subf provided (the line with hget I added myself, to get the package onto my file system)
% hget http://mirtchovski.com/p9/freetype/freetype-plan9.tgz > freetype-plan9.tgz
% gunzip < freetype-plan9.tgz | tar xv
% cd freetype-2.1.4
% mk
% mk install
It turns out that before this would work, I had to open up the mkfile in the distribution and uncomment this line
# cp $LIB /$objtype/lib
That line (when uncommented) copies the truetype library to a place on the filesystem where the linker can get to it. It’s a reasonable line to comment (I may want to install the library in my home directory, or may not have access to the system library directory). The takeaway is I should read mkfiles before I execute them from here on out. The good news is that if this mkfile is any indicator, they’re typically much simpler than the autoconf+Makefile combos I’m used to dealing with.
And that was the only hitch! Once I had ttf2subf built and installed, I was able to aquire and build my giant font with
% hget http://levien.com/type/myfonts/Inconsolata.otf > Inconsolata.otf
% cd /lib/font/bit
% ttf2subf -s 18 -f $home/Inconsolata.otf -n Inconsolata -m antialias
That incantation chatters a bit, and generates a bunch of files in /lib/font/bit/Inconsolata, including one particularly interesting file at /lib/font/bit/Inconsolata/Inconsolata.18.font.
Now all I have to do is open up that file at $home/lib/profile in sam or acme, edit the path of the font variable, and reboot! Now I’ve got nice, big legible fonts!
Of course, it’s a bigger deal that just the fonts. It seems like a new OS is all about patterns, and “random people being kind to you via Internet” seems like it’s becoming a pattern. While I’m sure I will continue to get grumpy about the fact that I have to use the mouse, and be annoyed that I don’t know how to spell find . -name \*.c | xargs grep, when I get frustrated I plan to look at this beautiful font, that somebody made for me, and somebody else made work for me, on this operating system full of little surprises and delights. I’m not here to be comfortable, and certainly nobody involved with this has any reason to make me comfortable. It’s nothing but kindness that gets that font into my screen- the kindness of people I’ve never met, helping me out just because.
I’ll try to keep that in mind the next time I’m tempted to wander off.