Linux – Why does firefox not use Consolas font while fc-match consolas shows it

arch linuxfirefoxfontconfigfonts

Visiting a pages that use the Consolas monospace font (e.g. [1], minimal example at [3]) instead renders Nimbus Mono.

I installed the Microsoft fonts according to the arch wiki[1] using the ttf-ms-win8 package and font files from a windows 8.1 install on the same machine. Chromium correctly uses Consolas, while Firefox didn't change.

Using fc-match, I get the following results:

fc-match consolas
  consola.ttf: "Consolas" "Regular"
fc-match Courier
  n022003l.pfb: "Nimbus Mono" "Regular"
fc-match 'Consolas,"Liberation Mono",Menlo,Courier,monospace'
  consola.ttf: "Consolas" "Regular"

The third example is the font-family line from the site's css. I assume firefox doesn't just pass this to fc-match, but short of reading the code, I am out of ideas.

The question is: Why doesn't firefox use the consolas font when specified?


Software versions:

  • Chromium 48.0.2564.103
  • Firefox 44.0
  • fontconfig 2.11.1-2
  • Arch testing

Notes

  • [4] is a similar question, but consolas is a truetype font, so the quoted fact that firefox doesn't support bitmap fonts isn't relevant here.

References

  1. https://github.com/necolas/idiomatic-css
  2. https://wiki.archlinux.org/index.php/Microsoft_fonts
  3. http://absolute.fail/consolas_problem.html
  4. Firefox 30 not recognizing font

Best Answer

I had the same problem for quite some time and GitHub was a pain to watch. I finally installed fontconfig-ttf-ms-fonts today and problem solved!

Related Question