You are not logged in.

#1 2022-04-06 21:07:02

sleeping
Member
Registered: 2016-01-09
Posts: 53

[SOLVED] Browsers use Noto Sans as default monospace font

Firefox  and Chromium use Noto Sans as default monospace fallback font.

I have no idea, why, fc-match reports Noto Sans Mono as default font:

$ fc-match monospace
NotoSansMono-Regular.ttf: "Noto Sans Mono" "Regular"

https://i.imgur.com/PxghGyZ.png

Last edited by sleeping (2022-04-07 08:08:33)

Offline

#2 2022-04-06 21:10:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: [SOLVED] Browsers use Noto Sans as default monospace font

Please don't embed huge images directly.

Browsers have their own settings for what to use here, what is configured there? If they are not set to literally monospace as well they won't use your monospace font.

Last edited by V1del (2022-04-06 21:14:36)

Offline

#3 2022-04-06 21:16:47

sleeping
Member
Registered: 2016-01-09
Posts: 53

Re: [SOLVED] Browsers use Noto Sans as default monospace font

It's set to Noto Sans Mono.

https://i.imgur.com/ApjEW7A.png

And yes, noto-fonts is installed.

Last edited by sleeping (2022-04-06 21:20:04)

Offline

#4 2022-04-06 21:32:11

schan
Member
Registered: 2019-07-25
Posts: 6

Re: [SOLVED] Browsers use Noto Sans as default monospace font

Some websites have a bad habit of overriding your font choices. I see in the image you provided that you have checked the 'allow pages to choose their own font' option. Have you tried disabling that?
If the option is still somehow not respected, you can try and start chromium and friends with the following flag:

 --disable-remote-fonts 

Last edited by schan (2022-04-06 21:34:17)

Offline

#5 2022-04-06 21:37:25

sleeping
Member
Registered: 2016-01-09
Posts: 53

Re: [SOLVED] Browsers use Noto Sans as default monospace font

@schan In that case (I checked the CSS) the font is actually 'monospace'. So it should fall back to the default font.

> overriding your font choices

I am a web developer, so I am guilty of that, and disabling all custom fonts is not an option for me.

Offline

#6 2022-04-06 23:10:40

schan
Member
Registered: 2019-07-25
Posts: 6

Re: [SOLVED] Browsers use Noto Sans as default monospace font

Mind posting your /etc/fonts/local.conf and $XDG_CONFIG_HOME/fontconfig/fonts.conf?

Last edited by schan (2022-04-06 23:19:06)

Offline

#7 2022-04-06 23:18:40

loqs
Member
Registered: 2014-03-06
Posts: 18,970

Re: [SOLVED] Browsers use Noto Sans as default monospace font

If you right click->examine a monospace element in firefox what is the final fontlist calculated for that element and what font has that been resolved to?

Offline

#8 2022-04-07 07:02:22

sleeping
Member
Registered: 2016-01-09
Posts: 53

Re: [SOLVED] Browsers use Noto Sans as default monospace font

Oh my God, I had this in /etc/fonts/local.conf... Deleting it solved the issue. No idea why the browser resolved Noto Sans but fc-match resolved Noto Sans Mono though.

<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
   <match>
      <edit mode="prepend" name="family">
         <string>Noto Sans</string>
      </edit>
   </match>
   <match target="pattern">
      <test qual="any" name="family">
         <string>serif</string>
      </test>
      <edit name="family" mode="assign" binding="same">
         <string>Noto Serif</string>
      </edit>
   </match>
   <match target="pattern">
      <test qual="any" name="family">
         <string>sans-serif</string>
      </test>
      <edit name="family" mode="assign" binding="same">
         <string>Noto Sans</string>
      </edit>
   </match>
   <match target="pattern">
      <test qual="any" name="family">
         <string>monospace</string>
      </test>
      <edit name="family" mode="assign" binding="same">
         <string>Noto Sans Mono</string>
      </edit>
   </match>
</fontconfig>

Offline

#9 2022-04-07 07:34:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,696

Re: [SOLVED] Browsers use Noto Sans as default monospace font

Because NSM is still your monospace, you just ask fc to unconditionally first look at NS for any glyph of every font - and NS can resolve all those glyphs.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#10 2022-04-07 08:10:18

sleeping
Member
Registered: 2016-01-09
Posts: 53

Re: [SOLVED] Browsers use Noto Sans as default monospace font

@seth: That makes sense seth. Thank you so much for your explanation, I've marked the thread as SOLVED.

Offline

Board footer

Powered by FluxBB