Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Broken fonts in Firefox after upgrade from Stretch to Buster

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
drasar
Posts: 12
Joined: 2020-01-11 19:50

Broken fonts in Firefox after upgrade from Stretch to Buster

#1 Post by drasar »

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/t ... _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.

User avatar
oswaldkelso
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1494
Joined: 2005-07-26 23:20
Location: UK
Has thanked: 1 time
Been thanked: 59 times

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

#2 Post by oswaldkelso »

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
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
My oldest used PC: 1999 imac 333Mhz 256MB PPC abandoned by Debian

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#3 Post by Head_on_a_Stick »

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.
deadbang

drasar
Posts: 12
Joined: 2020-01-11 19:50

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

#4 Post by drasar »

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: 12
Joined: 2020-01-11 19:50

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

#5 Post by drasar »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#6 Post by Head_on_a_Stick »

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.
deadbang

drasar
Posts: 12
Joined: 2020-01-11 19:50

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

#7 Post by drasar »

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?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#8 Post by Head_on_a_Stick »

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.
deadbang

drasar
Posts: 12
Joined: 2020-01-11 19:50

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

#9 Post by drasar »

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!

Post Reply