You are not logged in.

#1 2021-12-08 09:17:05

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

[SOLVED] Ugly Fonts in Firefox

Firefox has quite ugly fonts and I searched these forums, searched google but no solution works. I can uncheck Allow pages to choose their own fonts, instead of your selections above setting but then there are other sites where fonts will not be displayed. Chrome has fine fonts, click on the pics to get larger image. So it's not an OS problem but browser problem:

Fonts-Firefox.png
..
Fonts-Chrome.png

Last edited by arnuld (2021-12-12 06:25:33)

Offline

#2 2021-12-08 09:21:22

seth
Member
Registered: 2012-09-03
Posts: 51,864

Re: [SOLVED] Ugly Fonts in Firefox

You're either using a bitmap font or disabled antialiasing and chromium simply ignores your fontconfig for the most part, https://wiki.archlinux.org/title/Font_configuration

fc-match sans

Offline

#3 2021-12-08 09:48:22

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

Re: [SOLVED] Ugly Fonts in Firefox

I did not change any settings. It's default settings for both  Firefox and Chrome:

[arnuld@arch64 ~]$ fc-match sans
DejaVuSans.ttf: "DejaVu Sans" "Book"
[arnuld@arch64 ~]$ 

[arnuld@arch64 ~]$ fc-match serif
DejaVuSerif.ttf: "DejaVu Serif" "Book"
[arnuld@arch64 ~]$ 

Just did this and it solved half of the the problem:


Firefox has a setting which determines how many replacements it will allow from Fontconfig. To allow it to use all your replacement rules, change gfx.font_rendering.fontconfig.max_generic_substitutions to 127 (the highest possible value).

Firefox ships with the Twemoji Mozilla font. To use the system emoji font, set font.name-list.emoji to emoji in about:config. Additionally, to prevent the Mozilla font interfering with your system emoji font, change gfx.font_rendering.opentype_svg.enabled to false or remove /usr/lib/firefox/fonts/TwemojiMozilla.ttf


Source: https://wiki.archlinux.org/title/Firefo … leshooting

Now I can see gmail fonts are fine but some other sites still don't have good fonts, like this: https://clincalc.com/DrugStats/Drugs/Lorazepam

Firefox-fonts-clinic-calc.png

Last edited by arnuld (2021-12-08 10:53:03)

Offline

#4 2021-12-08 11:05:02

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

Re: [SOLVED] Ugly Fonts in Firefox

seth wrote:

You're either using a bitmap font or disabled antialiasing and chromium simply ignores your fontconfig for the most part, https://wiki.archlinux.org/title/Font_configuration

fc-match sans

I am using whatever the defaults are. By default anti-aliasing is enabled.  I disabled bitmap fonts  as described in the link you sent but no change since my last post.

  • created /etc/fonts/conf.d/20-no-embedded.conf with the contents mentioned

  • ran fc-cache

  • logged out and logged back in too.

No change.

Last edited by arnuld (2021-12-08 11:05:55)

Offline

#5 2021-12-08 13:10:36

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: [SOLVED] Ugly Fonts in Firefox

Firefox might be somewhat bound to the desktop environment settings. Have you disabled anti-aliasing there?


sys2064

Offline

#6 2021-12-08 15:04:51

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

Re: [SOLVED] Ugly Fonts in Firefox

Maniaxx wrote:

Firefox might be somewhat bound to the desktop environment settings. Have you disabled anti-aliasing there?

Nope, I don't touch fonts settings of anything. I don't even have any gnome extensions installed. Somethings I keep default, font settings and gnome desktop are two of them

Offline

#7 2021-12-08 15:19:55

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 460

Re: [SOLVED] Ugly Fonts in Firefox

Are you using Wayland while Firefox is using X through Xwayland?

Offline

#8 2021-12-08 15:27:59

seth
Member
Registered: 2012-09-03
Posts: 51,864

Re: [SOLVED] Ugly Fonts in Firefox

Check the ugly™ font w/ the webinspector (ctrl+alt+i or rmb menu) and the computed style for the font.
The ugly™ link uses a lot of

"Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif

so try

fc-match "Helvetica Neue"
fc-match "Helvetica"
fc-match "Arial"

Chances are that helvetica is resolved to some bitmap font from gsfonts or xorg-fonts-* or maybe Nimbus

Offline

#9 2021-12-08 15:33:23

Stewart Little
Member
From: England, UK
Registered: 2017-01-18
Posts: 120

Re: [SOLVED] Ugly Fonts in Firefox

What about using this command?

fc-cache --really-force

This is what I use, maybe the fonts haven't properly been synced or detected yet if its been inserted in the font system folder.


“Great minds discuss ideas; average minds discuss events; small minds discuss people.” -Eleanor Roosevelt
“It is our choices, that show what we truly are, far more than our abilities.” -J. K Rowling
-----
How to Ask Questions the Smart Way

Offline

#10 2021-12-08 15:34:55

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

Re: [SOLVED] Ugly Fonts in Firefox

icar wrote:

Are you using Wayland while Firefox is using X through Xwayland?

Yes, I am using Wayland. That's what by default GNOME runs on

Offline

#11 2021-12-08 15:39:52

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

Re: [SOLVED] Ugly Fonts in Firefox

seth wrote:

Check the ugly™ font w/ the webinspector (ctrl+alt+i or rmb menu) and the computed style for the font.
The ugly™ link uses a lot of

"Helvetica Neue", Helvetica, Helvetica, Arial, sans-serif

so try

fc-match "Helvetica Neue"
fc-match "Helvetica"
fc-match "Arial"

Yeah, it's F12, direct key-pres for web inspector. And yes, lots of Helvetica I see. 

[arnuld@arch64 ~]$ fc-match "Helvetica Neue"
DejaVuSans.ttf: "DejaVu Sans" "Book"

[arnuld@arch64 ~]$ fc-match "Helvetica"
helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular"

[arnuld@arch64 ~]$ fc-match "Arial"
Arimo-Regular.ttf: "Arimo" "Regular"
[arnuld@arch64 ~]$ 
seth wrote:

Chances are that helvetica is resolved to some bitmap font from gsfonts or xorg-fonts-* or maybe Nimbus

okay, then I need to to resolve it to some non-bitmap font.

Offline

#12 2021-12-08 15:42:47

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

Re: [SOLVED] Ugly Fonts in Firefox

Stewart Little wrote:

What about using this command?

fc-cache --really-force

This is what I use, maybe the fonts haven't properly been synced or detected yet if its been inserted in the font system folder.

This did the trick. I did this and then logged-out and logged back in. And everything looks fine now :-)

Firefox-fonts-clinic-calc-after-FC-Cashe-really-force.png


I will still wait a while (for few restarts) before I mark this thread resolved.

Last edited by arnuld (2021-12-08 15:43:46)

Offline

#13 2021-12-08 15:48:08

seth
Member
Registered: 2012-09-03
Posts: 51,864

Re: [SOLVED] Ugly Fonts in Firefox

helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular" is from some xorg-fonts-*dpi package - and it's not pretty.
The only reason you're not running into this is because pango dropped pcf support, but in most cases you want to drop the xorg-fonts-* packages.

Offline

#14 2021-12-08 16:29:55

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

Re: [SOLVED] Ugly Fonts in Firefox

seth wrote:

helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular" is from some xorg-fonts-*dpi package - and it's not pretty.
The only reason you're not running into this is because pango dropped pcf support, but in most cases you want to drop the xorg-fonts-* packages.

Remove all of these you mean? You sure? For this removes some other pacakges too.


[arnuld@arch64 ~]$ sudo pacman -Ss xorg-fonts-* | grep -i installed
extra/xorg-font-util 1.3.2-2 (xorg-fonts xorg) [installed]
extra/xorg-fonts-100dpi 1.0.3-7 (xorg) [installed]
extra/xorg-fonts-75dpi 1.0.3-7 (xorg) [installed]
extra/xorg-fonts-alias-100dpi 1.0.4-1 [installed]
extra/xorg-fonts-alias-75dpi 1.0.4-1 [installed]
extra/xorg-fonts-encodings 1.0.5-2 (xorg-fonts xorg) [installed]
extra/xorg-fonts-type1 7.7-6 [installed]
[arnuld@arch64 ~]$ 

....

[arnuld@arch64 ~]$ sudo pacman -Rcs xorg-fonts-100dpi xorg-fonts-75dpi xorg-fonts-alias-100dpi xorg-fonts-alias-75dpi xorg-fonts-type1
[sudo] password for arnuld: 
checking dependencies...

Packages (5) xorg-fonts-100dpi-1.0.3-7  xorg-fonts-75dpi-1.0.3-7  xorg-fonts-alias-100dpi-1.0.4-1  xorg-fonts-alias-75dpi-1.0.4-1  xorg-fonts-type1-7.7-6

Total Removed Size:  25.50 MiB

:: Do you want to remove these packages? [Y/n] n

 

Maybe I should leave out font-utils and encodings?

[arnuld@arch64 ~]$ sudo pacman -Rcs xorg-fonts-100dpi xorg-fonts-75dpi xorg-fonts-alias-100dpi xorg-fonts-alias-75dpi xorg-fonts-type1 xorg-fonts-encodings xorg-font-util
checking dependencies...
:: lxqt-session optionally requires sddm: The recommended display manager
:: pipewire optionally requires gst-plugin-pipewire: GStreamer plugin

Packages (27) gdm-41.0+r15+g23ebe617-1  gnome-shell-1:41.1-1  gnome-shell-extensions-41.0-1  gst-plugin-pipewire-1:0.3.40-1  libfontenc-1.1.4-3  libxcvt-0.1.1-1  libxfont2-2.0.5-1  luit-20210218-1  mutter-41.1+r20+ge3931f7b8-1  sddm-0.19.0-7  sx-2.1.7-2  ttf-anonymous-pro-1.003-5
              xorg-font-utils-7.6-6  xorg-mkfontscale-1.2.1-2  xorg-server-21.1.1-3  xorg-server-common-21.1.1-3  xorg-server-xephyr-21.1.1-3  xorg-server-xnest-21.1.1-3  xorg-server-xvfb-21.1.1-3  xorg-xwayland-21.1.3-1  xorg-font-util-1.3.2-2  xorg-fonts-100dpi-1.0.3-7
              xorg-fonts-75dpi-1.0.3-7  xorg-fonts-alias-100dpi-1.0.4-1  xorg-fonts-alias-75dpi-1.0.4-1  xorg-fonts-encodings-1.0.5-2  xorg-fonts-type1-7.7-6

Total Removed Size:  73.75 MiB

:: Do you want to remove these packages? [Y/n] n
[arnuld@arch64 ~]$ 

Last edited by arnuld (2021-12-08 16:44:00)

Offline

#15 2021-12-08 17:20:24

seth
Member
Registered: 2012-09-03
Posts: 51,864

Re: [SOLVED] Ugly Fonts in Firefox

Maybe I should leave out font-utils and encodings?

Yes. (I'll point out that it's not "fonts-utils" ;-P )

Offline

#16 2021-12-08 17:52:17

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

Re: [SOLVED] Ugly Fonts in Firefox

seth wrote:

Maybe I should leave out font-utils and encodings?

Yes. (I'll point out that it's not "fonts-utils" ;-P )

Yeah, I was expecting that :-)

Removing xorg-fonts-encodings still interfers with gdm and gnome-shell. So I  am gonna leave this out too. Will report back what happens.

UPDATE: It's been 4 days now and fonts are looking great. So, I am marking this thread as resolved.

Last edited by arnuld (2021-12-12 06:25:21)

Offline

#17 2023-06-02 18:42:28

blegh
Member
Registered: 2023-06-02
Posts: 1

Re: [SOLVED] Ugly Fonts in Firefox

Here how I fixed the ugly font problem in firefox: settings >> scroll down to fonts >> advanced >> uncheck "allow pages to choose their own fonts..."

Offline

#18 2023-06-02 18:47:43

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] Ugly Fonts in Firefox

This thread is almost two years old and marked solved. Please do not necrobump.

Closing.

Offline

Board footer

Powered by FluxBB