2

In Firefox only (LibreOffice and Chromium work fine), and starting fairly recently, I've noticed Helvetica is rendering weirdly. Curly quotes are broken, but straight ones are not. Some further testing shows Times has the problem as well. (I have TrueType versions of these fonts).

Broken rendering of Helvetica and Times

Also Helvetica and Times do not appear to be using subpixel rendering, unlike the other fonts (and like they do in e.g., Chromium).

The test file I used was:

<!DOCTYPE html>
<html>
  <meta charset="utf-8">
  <head><title>Test Fonts</title></head>
  <body>
    <p style="font-family: Helvetica; font-size: 12pt">“Curly” "Straight" Helvetica</p>
    <p style="font-family: DejaVu Sans; font-size: 12pt">“Curly” "Straight" DejaVu Sans</p>
    <p style="font-family: Times; font-size: 12pt">“Curly” "Straight" Times</p>
    <p style="font-family: Times New Roman; font-size: 12pt">“Curly” "Straight" Times New Roman</p>
    <p style="font-family: Helvetica; font-size: 24pt">“Curly” "Straight" Helvetica (Big)</p>
    <p style="font-family: Helvetica; font-size: 9pt">“Curly” "Straight" Helvetica (Small)</p>
  </body>
</html>

How can I at least get Firefox to stop displaying tiny quotes?

3

Checking fc-match Helvetica, it was indeed giving me the TrueType font I expected. However, fc-list also pointed to a bunch of the ancient X11 bitmap fonts in /usr/share/fonts/X11/100dpi and /usr/share/fonts/X11/75dpi. I have bitmap fonts turned on in Fontconfig, mainly for Neep, but they're not supposed to be preferred. Under the hypothesis that Firefox was, for some reason, preferring them, then refusing to scale them, and then for some reason substituting a curly quote from a smaller one, I disabled them:

Put this in /etc/fonts/conf.d/75-local-no-old-x-fonts.conf:

<?xml version="1.0" ?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
        <selectfont>
                <rejectfont>
                        <glob>/usr/share/fonts/X11/75dpi/*</glob>
                        <glob>/usr/share/fonts/X11/100dpi/*</glob>
                </rejectfont>
        </selectfont>
</fontconfig>

Possibly that's over-aggressive, but it worked:

Working rendering of Helvetica and Times

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.