How to fix Ubuntu font from Google Fonts on OS X

If you are Web site owner and would like to fix this for your site, repackage the Ubuntu font under a different name and serve it from your site. You’ll lose Google’s CDN, but your OS X users will be happier.

For about a year, a few sites would always display broken Š character on my Chrome in OS X. Example:

broken-s

Debugging this lead me to a rabbit hole of bugs in different upstream sources. My first reaction was that Google Fonts serves bad font. But that doesn’t explain why it appears only on OS X.

So I started thinking – what if broken font is coming from my computer. It turns out that it’s common for Open Source applications to install Ubuntu font. It also means that because the way web font rendering works, it will always try to use local version. This almost always makes sense, since local fonts can be much better then your web optimized subset.

So to fix this, disable Ubuntu font from Font Book Application. If you realise later that you need it, you can enable it again.

disable-ubuntu-font

But what’s the core reason for this breakage? OS X Font rendered has a problem with the way font is built. Some of the tables in the font are too large. Launchpad tracks this bug at #1334363. It will soon be one year old, with no resolution yet.

If you are Web site owner and would like to fix this for your site, repackage the Ubuntu font under a different name and serve it from your site. You’ll lose Google’s CDN, but your OS X users will be happier.

All solutions are bad, but I’m confident that in another year Apple can fix font renderer or that Ubuntu will repackage font.