How to diagnose a font rendering problem

fonts

I recently updated my Fedora Rawhide system, and after doing so, fonts in Firefox (now 31) are ugly. But… not all of them. I traced it down to some fonts being rendered as "Helvetica" (the element inspector in Firefox tells me so), and this being rendered with no anti-aliasing.

I don't think there is an open-source Helvetica, so something is being substituted. How can I:

  1. figure out what font is actually being used,
  2. discover why it isn't rendered nicely, and
  3. fix the problem?

Best Answer

I had the same problem with Helvetica bitmap fonts. To avoid it, I have a file ~/.config/fontconfig/fonts.conf with:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias binding="same">
  <family>Helvetica</family>
  <prefer>
    <family>Arial</family>
  </prefer>
</alias>
</fontconfig>

EDIT: to find which font corresponds to Helvetica:

$ fc-match Helvetica
helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular"

This is a bitmap font. After the change in ~/.config/fontconfig/fonts.conf, I get:

$ fc-match Helvetica
Arial.ttf: "Arial" "Normal"

a TrueType font, i.e. antialiased.

Related Question