On theme typography and language detection

As both a font geek and a theme geek, I was of course happy to see Drew’s update on typography in Twenty Twelve. But the part that really made me happy was this bit:

I had some concerns about the default web font settings. What about non-western languages? Those users would be out of luck if we had Open Sans turned on by default. They would see a bunch of empty space and garbled characters when they switched to Twenty Twelve. Not a very accessible or friendly experience.

So what to do? I proposed turning Open Sans off by default, and allowing users to switch it back on from the Theme Options menu. Nacin jumped in and suggested we use language detection to turn the font on or off. Non-supported languages would have the font turned off by default and supported languages would have it turned on. Nacin’s idea represented the best of both worlds — awesome!

I spent an entire past career worrying a whole lot about multi-language computing: encoding conflicts, crappy character rendering, input methods, and everything else that comes with it. And as much as I love the brave new world of web fonts and play with them on any project where I can find a reasonable excuse, it distresses me to see how many widely-used web fonts don’t even bother to support the extended-latin range, let alone any other alphabets.

(Open sans has extensive Greek and Cyrillic — not just Russian — support, in the condensed variant as well as the text. I’m such a hopeless sucker for a good condensed.)

The detection/default trick is even cooler, and I’d love to see a similar approach to smart default-setting become a common practice. The option to change it is there, even if the average English-speaking user never stops to think that it’s for anything other than aesthetics or load time: but the theme is making a reasonably intelligent stab at rendering the site without ugly mystery characters from the very first load.