Broken fonts in Firefox after upgrade from Stretch to Buster

If none of the more specific forums is the right place to ask

Broken fonts in Firefox after upgrade from Stretch to Buster

Postby drasar » 2020-01-11 21:14

Hello,

After Debian upgrade from Stretch to Buster I can see troubles with font antialiasing in Firefox, but just on some specific web pages. Almost all other webs are fine.

Here is an example: https://www.checkpoint.com

Font appearance in Stretch:
Image

Font appearance in Buster:
Image

In the Firefox Developer tools I can see that the web uses remote font DIN WXX Regular placed at https://www.checkpoint.com/wp-content/themes/checkpoint-theme-v2/fonts/34CA47_6_0.woff2.

It seems to me that Firefox has a trouble just with some remote fonts. I've never seen an issue with a local font.

Here is my .config/fontconfig/fonts.conf, where I am disabling antialiasing for a specific fonts:
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<match target="font">
  <edit mode="assign" name="rgba">
    <const>none</const>
  </edit>
  <edit mode="assign" name="hinting">
    <bool>true</bool>
  </edit>
  <edit mode="assign" name="hintstyle">
    <const>hintmedium</const>
  </edit>
  <edit mode="assign" name="antialias">
    <bool>true</bool>
  </edit>
</match>

<!-- disable antialiasing for mentioned fonts -->
<match target="font">
  <test name="family"><string>Tahoma</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Arial</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Verdana</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Times New Roman</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Courier New</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Comic Sans MS</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Georgia</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Impact</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Trebuchet MS</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Arial Black</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Andale Mono</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Webdings</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Palatino Linotype</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family"><string>Ubuntu</string></test>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>

</fontconfig>

If I remove matching for Tahoma, Arial and Verdana, then antialiasing for DIN WXX Regular is fine. But how the font can match it?

I was using exactly the same fonts.conf in Stretch and there was no problem. So something must be different in Buster.

I have found that there were some changes in libfreetype6 and fontconfig packages so is it somehow related?

Firefox version is the same (68.3.0esr) for both Stretch and Buster, so it must be something in the system (I am using Xfce).

Any clue? Thanks.
drasar
 
Posts: 5
Joined: 2020-01-11 19:50

Re: Broken fonts in Firefox after upgrade from Stretch to Bu

Postby oswaldkelso » 2020-01-12 09:43

I suspect the fonts have not changed but something has changed with the graphics. Either settings or firmware.

edit. (reread your post!) I had the same issue with fonts displaying like that but not in firefox or on Debian but other applications. I have Identical dual screens and one worked fine the other not . At first I put this down to a DVI vs VGA issue but after going through the settings on the good screen and reproducing them on the broken one, it fixed it.

Obviously nothing to do with the fonts. So I guess I'm saying don't put all your eggs in the font basket
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
User avatar
oswaldkelso
 
Posts: 1207
Joined: 2005-07-26 23:20
Location: UK

Re: Broken fonts in Firefox after upgrade from Stretch to Bu

Postby Head_on_a_Stick » 2020-01-12 10:16

drasar wrote:If I remove matching for Tahoma, Arial and Verdana, then antialiasing for DIN WXX Regular is fine. But how the font can match it?

Why are you disabling anti-aliasing for the MS fonts? Unless you have installed the MS fonts package then those won't be displayed anyway, check
Code: Select all
for font in tahoma arial verdana ; do fc-match $font ; done

FWIW, my buster box displays your linked page perfectly with only some alias definitions in ~/.config/fontconfig/fonts.conf (I have the full Win10 set of fonts installed and they all look fine with anti-aliasing enabled).

drasar wrote:Firefox version is the same (68.3.0esr) for both Stretch and Buster

Not relevant for this problem but you should upgrade ASAP, that version of FF is vulnerable to some nasty exploits that are running around in the wild.
User avatar
Head_on_a_Stick
 
Posts: 11021
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Broken fonts in Firefox after upgrade from Stretch to Bu

Postby drasar » 2020-01-12 14:56

oswaldkelso wrote:I suspect the fonts have not changed but something has changed with the graphics. Either settings or firmware.

I don't think it is a graphics/firmware related. I have exactly the same issue on two different machines (desktop, laptop).

Also if I remove mentioned lines from fonts.conf, then antialiasing for DIN WXX Regular works fine. So it is rather fontconfig misconfiguration.

edit. (reread your post!) I had the same issue with fonts displaying like that but not in firefox or on Debian but other applications. I have Identical dual screens and one worked fine the other not . At first I put this down to a DVI vs VGA issue but after going through the settings on the good screen and reproducing them on the broken one, it fixed it.

Obviously nothing to do with the fonts. So I guess I'm saying don't put all your eggs in the font basket

The only application where I can see the issue is Firefox. Everything else (Xfce desktop, Chromium, ...) is fine.
drasar
 
Posts: 5
Joined: 2020-01-11 19:50

Re: Broken fonts in Firefox after upgrade from Stretch to Bu

Postby drasar » 2020-01-12 15:17

Head_on_a_Stick wrote:
drasar wrote:If I remove matching for Tahoma, Arial and Verdana, then antialiasing for DIN WXX Regular is fine. But how the font can match it?

Why are you disabling anti-aliasing for the MS fonts? Unless you have installed the MS fonts package then those won't be displayed anyway, check
Code: Select all
for font in tahoma arial verdana ; do fc-match $font ; done

Because I am using MS fonts in the system and don't like antialiasing for them, so I am disabling it in the fonts.conf.
Code: Select all
$ for font in tahoma arial verdana ; do fc-match $font ; done
tahoma.ttf: "Tahoma" "Regular"
Arial.ttf: "Arial" "Regular"
Verdana.ttf: "Verdana" "Regular"

FWIW, my buster box displays your linked page perfectly with only some alias definitions in ~/.config/fontconfig/fonts.conf (I have the full Win10 set of fonts installed and they all look fine with anti-aliasing enabled).

If I enable antialiasing for MS fonts, then it fixes the mentioned problem with DIN WXX Regular font in the Firefox. But I want to have antialiasing for MS fonts disabled.
I don't understand how those MS fonts are related as their antialiasing configuration influences the specific web fonts antialiasing (DIN WXX Regular in this case).

drasar wrote:Firefox version is the same (68.3.0esr) for both Stretch and Buster

Not relevant for this problem but you should upgrade ASAP, that version of FF is vulnerable to some nasty exploits that are running around in the wild.

Done, thanks.
drasar
 
Posts: 5
Joined: 2020-01-11 19:50

Re: Broken fonts in Firefox after upgrade from Stretch to Bu

Postby Head_on_a_Stick » 2020-01-12 15:55

drasar wrote:I don't understand how those MS fonts are related as their antialiasing configuration influences the specific web fonts antialiasing (DIN WXX Regular in this case).

DIN must be substituted in place of the MS fonts, try
Code: Select all
fc-match 'DIN WXX'

But it's probably called something else, this might find it
Code: Select all
fc-match -a | grep -i din

Once you have the name you can specify aliasing for it in fonts.conf.
User avatar
Head_on_a_Stick
 
Posts: 11021
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Broken fonts in Firefox after upgrade from Stretch to Bu

Postby drasar » 2020-01-12 16:57

Head_on_a_Stick wrote:DIN must be substituted in place of the MS fonts, try
Code: Select all
fc-match 'DIN WXX'

Code: Select all
$ fc-match 'DIN WXX'
DejaVuSans.ttf: "DejaVu Sans" "Book"

That is what I don't understand. I don't have disabled antialiasing for DejaVu Sans font.

But it's probably called something else, this might find it
Code: Select all
fc-match -a | grep -i din

Once you have the name you can specify aliasing for it in fonts.conf.

Code: Select all
$ fc-match -a | grep -i din
d050000l.pfb: "Dingbats" "Regular"
d050000l.pfb: "Dingbats" "Regular"
Webdings.ttf: "Webdings" "Regular"
webdings.ttf: "Webdings" "Regular"

Does fc-match make sense for a remote fonts downloaded from the web?
drasar
 
Posts: 5
Joined: 2020-01-11 19:50

Re: Broken fonts in Firefox after upgrade from Stretch to Bu

Postby Head_on_a_Stick » 2020-01-12 17:03

drasar wrote:
Code: Select all
$ fc-match 'DIN WXX'
DejaVuSans.ttf: "DejaVu Sans" "Book"

That is what I don't understand. I don't have disabled antialiasing for DejaVu Sans font.

That just means fontconfig doesn't understand 'DIN WXX' and so is falling back to whatever is aliased to "sans-serif".

drasar wrote:Does fc-match make sense for a remote fonts downloaded from the web?

Not really but it was all I could think of.
User avatar
Head_on_a_Stick
 
Posts: 11021
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Broken fonts in Firefox after upgrade from Stretch to Bu

Postby drasar » 2020-01-14 12:08

I have a solution finally. I have enabled antialiasing for sans-serif and now it works fine.

I have added the following at the end of the fonts.conf:
Code: Select all
<match target="font">
  <test name="family"><string>sans-serif</string></test>
  <edit mode="assign" name="antialias"><bool>true</bool></edit>
</match>

Thanks for help, guys!
drasar
 
Posts: 5
Joined: 2020-01-11 19:50


Return to General Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable