Roboto font comes from Android and Google designed it really well. It looks awesome on desktops and laptops. But getting it working as a default system font in Linux is quite a task because the font package of Roboto available has multiple font forms declaring same type of text style.

The standard Roboto package consists of following fonts:

  • Roboto-BlackItalic
  • Roboto-Black
  • Roboto-BoldCondensedItalic
  • Roboto-BoldCondensed
  • Roboto-BoldItalic
  • Roboto-Bold
  • Roboto-CondensedItalic
  • Roboto-Condensed
  • Roboto-Italic
  • Roboto-LightItalic
  • Roboto-Light
  • Roboto-MediumItalic
  • Roboto-Medium
  • Roboto-Regular
  • Roboto-ThinItalic
  • Roboto-Thin

Now the problem is, Roboto Black, Roboto Regular and Roboto Medium, are selected as candidates for the standard font. See the output below:

Read the style field of each font in the above output, you’ll see “Regular” in the field for Roboto-Regular.ttf and Roboto-Medium.ttf. But note another parameter, the weight of font. Robot-Black and Regular declare it as 80 while Medium declares it as 100.

Font selection happens in the alphabetical order first matching weight and then style. The weight for “Regular” size is 80. So the first font selected would be Roboto-Black, since it declares weight as 80 and appears before Roboto-Regular and Roboto-Medium in alphabetical order.
If you delete Roboto-Black, it will match Roboto-Medium which declares a weight of 100, but has “Regular” in the style specification.

The problem is, both these fonts Black and Medium are just too bold for daily use. You just can’t distinguish between bold and normal text and this causes ridiculous amount of confusion in applications like Thunderbird which use bold text to mark unread message and normal text otherwise.

To deal with this, a slight modification is needed in your font configuration file as follows –

If you add the above configuration to your fontconfig, it will blacklist Roboto Lt font with weight 100 (which is Medium) and Roboto Bk font which is Roboto Black. See the earlier fc-query output if you’re interested in how I got these values.

And here’s my /etc/fonts/local.conf:

Just ensure that this configuration is not overridden in any file /etc/fonts/conf.d. A simple way would be to clean up /etc/fonts/conf.d and keep the bare minimum you need.

Some screenshots for Roboto font as requested by Zachary Potter:

Process Monitor