You are not logged in.

#1 2026-07-04 14:41:33

thetareefarz
Member
Registered: 2024-03-05
Posts: 35

Font aliasing not working on chromium based browsers

Hello.

I am using the following configuration to alias/substitute some certain font to another one as per my preference:

~/.config/fontconfig/conf.d/10-metric-aliases.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
  <match target="pattern">
    <test qual="any" name="family"><string>Arial</string></test>
    <edit name="family" mode="assign" binding="same"><string>Inter</string></edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family"><string>ui-monospace</string></test>
    <edit name="family" mode="assign" binding="same"><string>JetBrains Mono</string></edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family"><string>Segoe UI</string></test>
    <edit name="family" mode="assign" binding="same"><string>Inter</string></edit>
  </match>
</fontconfig>

Note: I've tried using binding="strong" as well with no success either.

The provided fontconfig configuration seems to work on every other application except for a chromium based browser. I've tried to make this work with Helium and Brave.
For Arial substitution, Fonts such as Liberation Sans, Source Sans and Adwaita Sans seems to work perfectly fine on chromium except for Inter and JetBrains Mono (including the nerd font variant) (i havent tried any other fonts for testing). I wanted to use Inter to begin with (I do know that Adwaita Sans is a fork of inter) but I am choosing to move forward with Inter. Now the thing is the inter-font package provided in the arch repos provide a .ttc file which can cause some issues (according to the internet) so ive been using .otf  and .ttf variants for it instead which both seems to doesnt work either (Note, everything still works on firefox). JetBrains Mono substitution doesn't work for Arial either.

Now for Segoe UI, Font substitution doesn't even work to begin with. I've tried tirelessly for Segoe UI to atleast use Adwaita Sans but any configuration with Segoe UI doesn't seem to work whereas Arial atleast had a range of option.

I'd genuinely appreciate it if someone could shed some light on this matter

Note: The reason why I am deciding to use these substitutions is because that I believe that the original source fonts are ugly (imo) and /etc/fonts/conf.d/30-metric-aliases.conf do not contain any better aliases either. Also, following the syntax on this specific file doesn't change anything either. It's not as if brave can't render inter font either, using chrome devtools or sites using css with font-family: Inter; does work.

Last edited by thetareefarz (2026-07-04 14:59:39)


i like unix

Offline

#2 2026-07-04 15:11:12

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

Re: Font aliasing not working on chromium based browsers

chromium based browser. I've tried to make this work with Helium and Brave.

Does is work on chromium itself?
Is this about the GUI or the css resolution of webpages?

For Arial substitution, Fonts such as Liberation Sans, Source Sans and Adwaita Sans seems to work perfectly fine on chromium except for Inter and JetBrains Mono

fc-list | grep -iE 'inter|jetbrains|segoe' # afaiu electron, like mozilla, uses an internal fc parser which might be pickier about font name matching

Offline

#3 2026-07-05 08:18:52

thetareefarz
Member
Registered: 2024-03-05
Posts: 35

Re: Font aliasing not working on chromium based browsers

Hello seth, thank you for your response.

seth wrote:

Does is work on chromium itself?

I apologize that I do not get what you mean by this. This issue occurs only on a chromium based browser. (Brave, in my case).

seth wrote:

Is this about the GUI or the css resolution of webpages?

It is about GUI. Im trying to substitute Arial for Inter (as I don't like Arial). Sites like google and a lot other use Arial quite a lot and I'd like every instance of Arial to be replaced with Inter.

seth wrote:
fc-list | grep -iE 'inter|jetbrains|segoe' # afaiu electron, like mozilla, uses an internal fc parser which might be pickier about font name matching

This returns a long list of the specified pattern for grep. I assure you that all the fonts are as valid and they exist.


i like unix

Offline

#4 2026-07-05 08:29:56

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

Re: Font aliasing not working on chromium based browsers

I apologize that I do not get what you mean by this.

https://archlinux.org/packages/extra/x86_64/chromium/ - not some 3rd party binary build/flatschpak etc.

It is about GUI.

=> https://bbs.archlinux.org/viewtopic.php … 1#p2244491
https://wiki.archlinux.org/title/Chromi … _too_large
https://wiki.archlinux.org/title/GTK#Configuration

Otherwise

This returns a long list of the specified pattern for grep. I assure you that all the fonts are as valid and they exist.

please don't paraphrase and post the output, https://bbs.archlinux.org/viewtopic.php?id=57855

Offline

Board footer

Powered by FluxBB