You are not logged in.

#1 2025-05-29 09:38:16

nahso
Member
Registered: 2022-11-27
Posts: 15

[Solved]Chromium based applications use wrong fonts

I configed the global sans font to Noto Sans CJK SC in ~/.config/fontconfig/fonts.conf. But the font of the chrome/vscode tab changed to another fonts, which was not Noto Sans CJK SC at least. It seems happen in this month, after I upgrade the system some day. The fonts in the webpage are fine, only fonts in the application itsetlf are broken.

Chrome Version: Version 136.0.7103.113 (Official Build) (64-bit)
VsCode Version:
Version: 1.100.2
Commit: 848b80aeb52026648a8ff9f7c45a9b0a80641e2e
Date: 2025-05-14T21:47:40.416Z
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Linux x64 6.14.6-arch1-1

~/.config/fontconfig/fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>

  <!-- Default system-ui fonts -->
  <match target="pattern">
    <test name="family">
      <string>system-ui</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>sans-serif</string>
    </edit>
  </match>

  <!-- Default sans-serif fonts-->
  <match target="pattern">
    <test name="family">
      <string>sans-serif</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>Noto Sans CJK SC</string>
      <string>Noto Sans</string>
      <string>Twemoji</string>
    </edit>
  </match>

  <!-- Default serif fonts-->
  <match target="pattern">
    <test name="family">
      <string>serif</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Serif CJK SC</string>
      <string>Noto Serif</string>
      <string>Symbols Nerd Font</string>
      <string>Twemoji</string>
    </edit>
  </match>

  <!-- Default monospace fonts-->
  <match target="pattern">
    <test name="family">
      <string>monospace</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>JetBrains Mono</string>
      <string>Source Code Pro</string>
      <string>Twemoji</string>
    </edit>
  </match>
</fontconfig>

Last edited by nahso (2025-06-03 10:44:58)

Offline

#2 2025-05-29 09:49:33

nahso
Member
Registered: 2022-11-27
Posts: 15

Re: [Solved]Chromium based applications use wrong fonts

Here is the screenshot in chrome: https://imgur.com/2IPM6Rp

The text should be like this: https://imgur.com/a/bhU01Qz

The most significant different is the 'G' letter.

Offline

#3 2025-05-29 17:53:37

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 66,989

Re: [Solved]Chromium based applications use wrong fonts

https://wiki.archlinux.org/title/Chromi … _too_large - ignore the symptom, chromium defaults to the gtk configuration so you have to configure that.
This is software from the repos, no containers (flatpak, snap, appimage - all the same)?
Can you render Noto if you explicitly select it as default font for webpages?

Offline

#4 2025-06-03 10:43:22

nahso
Member
Registered: 2022-11-27
Posts: 15

Re: [Solved]Chromium based applications use wrong fonts

Solved by adding a `gtk-font-name` field in `~/.config/gtk-3.0/settings.ini`. Thank you.

Offline

Board footer

Powered by FluxBB