Friday, November 23, 2007

Typophile Temper Tantrum

Leopard has a bunch of neat new APIs that us developers can have fun with. There are also some nice performance improvements under the hood.

When it comes to usability though Apple has either moved every last person with even a smidgeon of design sense to the iPhone or the programmers took the designers out back, shot them, turned around and found these new, shiny APIs much like a child finds a mother's jewelry and makeup case for the first time.

Click me! - image originally from:

In particular, the built-in dictionary has a nice addition - searching of Wikipedia. I've wanted this for a long time so there was much rejoicing when my office mate clued me in. Whoever worked on this did at least 2 things right. The first is actually including Wikipedia search. The second I'm saving for the punch line.

There are a couple technical issues (like doing the search on the main UI thread) but the main issue that essentially made this feature unusable for me was the choice of typeface. Baskerville! Seriously whoever chose Baskerville should be taken out back with the rest of the designers. If it wasn't consciously chosen then shame on you - you should always choose your fonts with care. Baskerville is cool for the first few seconds, giving the dictionary and thesaurus parts of the app that old, leather-bound book feel. I put up with it because there were never large amounts of reading to do when grabbing a definition now and again so there wasn't much of an effect on my reading speed. For Wikipedia-length articles, Baskerville enough to make the feature unusable for me (1).

This needed to be fixed!

After a bit of poking around though I discovered thing-that-was-done-right # 2. renders its content using WebKit and simply grabs the Wikipedia results and applies an XML transform on them.

Bingo! It was only a matter of time before I found the right switch (2).

Turns out everything I needed was in 1 css file. Also turns out I was waiting for something of just the right size to attack with my new Python skills (3). Enter grotesque!

> open /Applications/ > grotesque > grotesque --revert

The script is pretty straight forward, well documented, and should be non-destructive (4). The script is also written in a way that if you wanted to not use 10pt Verdana you could parameterize that.

1) For those that don't know I have slow visual processing speed so I normally read much slower than the average person (I'm in the 4th percentile). When displays are visually cluttered others might slow down by a constant factor whereas I'll slow down by an order of magnitude.
2) And since I new it was Baskerville from the minute I looked at the thing grep was my friend. I must admit I even went as far as patching the binary but it seems the 2 instances of 'Baskerville' in the binary now control nothing at all.
3) Yes, yes I know, I'm late to get on this Python train and Ruby is the new cool kid now.

4) I've tested it well on my machine but if you're really paranoid you can make a backup of