You are not logged in.

#1 2017-06-23 15:16:46

andriii25
Member
Registered: 2017-06-23
Posts: 5

[SOLVED] Chromium UI font changed after installing a font

Hello!

So, not long after having a fresh install of Arch, I wanted to change the font in Termite, so I installed "Hack" font, with the ttf-hack package with pacman, and edited the config file, and worked.
After that I noticed that in Chromium the UI font also changed to Hack. (at UI font I mean, tab titles, bookmarks, any text on the settings drop-down etc. not the text on webpages).

Removing the package solves the problem, but I mean I want to use it in Termite.

Probably I screwed up/forgot to do some font configuration but even after reading the related wiki page, I'm not quite sure where do I need to edit it.
Any ideas how to resolve this?

Last edited by andriii25 (2017-06-24 17:40:50)

Offline

#2 2017-06-23 19:20:29

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [SOLVED] Chromium UI font changed after installing a font

Does Chromium have any settings that would allow you to choose the font?  I've never used it so I really don't know.  As a last resort, you can configure your default fonts in ~/.config/fontconfig/fonts.conf

Offline

#3 2017-06-23 19:39:22

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

Re: [SOLVED] Chromium UI font changed after installing a font

You edited what config file how?

Offline

#4 2017-06-23 20:09:37

andriii25
Member
Registered: 2017-06-23
Posts: 5

Re: [SOLVED] Chromium UI font changed after installing a font

circleface wrote:

Does Chromium have any settings that would allow you to choose the font?  I've never used it so I really don't know.  As a last resort, you can configure your default fonts in ~/.config/fontconfig/fonts.conf

Chromium has some settings, but I made sure so that they are definitely not using the Hack font.
Now I tried replacing Hack font with a fonts.conf, which now looks like this, but even after a reboot nothing has changed.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<match target="pattern">
		<test qual="any" name="family"><string>hack</string></test>
		<edit name="family" mode="assign" binding="same"><string>Noto</string></edit>
	</match>
</fontconfig>

Also, launching Chromium from command-line logs nothing that'd even remotely relate to font issues.

seth wrote:

You edited what config file how?

Ah, sorry there I was referring to Termite's config, meaning that changing the font for Termite and in the terminal emulator it worked fine. Probably not that related to Chromium.

Offline

#5 2017-06-23 20:17:24

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [SOLVED] Chromium UI font changed after installing a font

Try using an alias instead of a match.  I'm not sure it will help, but that is how I have it set up on my computer.

    <alias>
	<family>sans-serif</family>
	    <prefer>
                <family>Noto Sans</family>
	    </prefer>
    </alias>

Offline

#6 2017-06-23 20:19:21

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

Re: [SOLVED] Chromium UI font changed after installing a font

Assuming the chromium UI uses the "Sans" font for its gui, what does "fc-match Sans" tell you?

Edit: this is basically same idea as circleface had.

Last edited by seth (2017-06-23 20:20:21)

Offline

#7 2017-06-24 17:40:35

andriii25
Member
Registered: 2017-06-23
Posts: 5

Re: [SOLVED] Chromium UI font changed after installing a font

circleface wrote:

Try using an alias instead of a match.  I'm not sure it will help, but that is how I have it set up on my computer.

    <alias>
	<family>sans-serif</family>
	    <prefer>
                <family>Noto Sans</family>
	    </prefer>
    </alias>

Thanks, that worked wonderfully, and I think now I also have a better understanding on how fonts.conf works.

Offline

Board footer

Powered by FluxBB