One of the first things I noticed after boot­ing into Ubuntu 9.04, Jaunty Jack­a­lope, is that Google Reader and Gmail looked a bit off. I quickly real­ized they were both using dif­fer­ent sans-serif fonts than they had pre­vi­ously (Nim­bus Sans), despite Firefox’s pref­er­ences hav­ing Nim­bus set as the default sans.

I knew that Google isn’t so great with their stylesheets, in some cases declar­ing a font-family of just “Arial,” with no “sans-serif” backup in the font-stack (which would, of course, let Fire­fox sub­sti­tute in whichever default sans the user had set – in my case, Nimbus).

I also knew through play­ing around with ~/fonts.conf that Linux allows you to define sub­sti­tu­tions for dif­fer­ent font names. It was my hunch that there was some­thing new about Jaunty (which has been praised for its bet­ter pre­sen­ta­tion of text) that defined Lib­er­a­tion Sans – the font I deter­mined I was look­ing at – as the prefer­able sub­sti­tute for Arial.

After look­ing around a bit I found the cul­prit in /etc/fonts/conf.avail/30-metric-aliases.conf. Around line 182 you should see the begin­ning of a sec­tion devoted to the Microsoft type­faces, and shortly under that (around line 186), the line:

<family>Liberation Sans</family>

Just above that, insert the fol­low­ing line:

<family>Nimbus Sans L</family>

Reboot your sys­tem, and when you’re back up, Ubuntu should now replace any calls for Arial with Nim­bus Sans.

Of course, this should only be done if you pre­fer Nim­bus Sans. It’s been claimed that Lib­er­a­tion Sans is bet­ter hinted than either Nim­bus or FreeSans, and from the looks of things, it is. Still, I just pre­fer Nim­bus. That serif on the upper-case ‘J’ in Lib­er­tine espe­cially both­ers me.

I still love Linux Lib­er­tine as a Times sub­sti­tute, however.

Come to think… Most of this “Lib­er­a­tion” are just the URW fonts renamed… We’ve always had them… Font­con­fig change so many things that you won­der why it doesn’t sub­sti­tute pop­u­lar fonts like Arial Black, Tre­buchet, Geneva, Franklin, Tahoma, Lucida,All Segoe(s), Ca-libri/ndara/mbria etc… They all default to Helvetica/Times.

Marco · 11 Nov 2011

Leave a Comment or Subscribe