4

I'm using Arch Linux and one thing I just can't seem to get right is the Unicode fonts.

I'll give you an example of what goes wrong. Here's a screenshot of gucharmap: gucharmap

The selected glyph in the top left renders as it should, but then the Text to copy renders as a completely different icon, from another font presumably.

Then here's a screenshot of urxvt showing the same icon:

urxvt

As you can see, it just renders some boxes. This is the most common behavior across most of my applications.

Also here is the output of fc-list (it's in a paste-bin because it was too long), maybe it's useful, I don't know.

So what I think is happening is that I have another font installed of which the Unicode area overlaps with the one from Material icons. My question is then, how do I fix this? And is this even the thing that's going wrong?

UPDATE

changing my fontconfig to:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
    <family>serif</family>
    <prefer><family>Noto Sans</family></prefer>
    <default><family>Material Icons</family></default>
</alias>
<alias>
    <family>sans-serif</family>
    <prefer><family>Noto Sans</family></prefer>
    <default><family>Material Icons</family></default>
</alias>
<alias>
    <family>sans</family>
    <prefer><family>Linux Libertine</family></prefer>
    <default><family>Material Icons</family></default>
</alias>
<alias>
    <family>monospace</family>
    <prefer><family>Hack</family></prefer>
    <default><family>Material Icons</family></default>
</alias>
</fontconfig

has fixed the issue of gucharmap glyphs not matching the Text to copy however, the issue of applications not rendering the glyphs still remains.

This makes me think the issue is with the applications not using the correct font for rendering the glyphs. I assumed setting the default tags for the aliases would make it so they would be used as a fallback if the preferred font does not contain the unicode character. I feel like this is wrong though, but the docs don't really make it clear.

UPDATE

Someone asked for the output of locale, so here it is:

LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=
4
  • 1
    Leaving a comment since I don't know if this will solve the issue for you, but I have fixed most of my unicode problems by installing the Noto fonts bundle: sudo pacman -S noto-fonts noto-fonts-extra noto-fonts-emoji. Does that help? Then there's also the question of whether the terminal emulator you are using supports such fonts and whether the font you are using in the emulator has the relevant glyphs. Does it work better if you copy/paste into libreoffice or gedit or anything other than a terminal?
    – terdon
    Feb 16, 2020 at 14:21
  • Thanks for replying! I had these fonts installed before, but removed them because i suspected them of interfering with Material Icons, so that's not the issue. also, my terminal supports unicode, and the same happens in other applications like firefox, vscode, etc.. I'm sure i have the right glyphs installed, because editing my fontconfig to use Material icons as the default for all major font types made the gucharmap glyphs and 'text to copy' match up. The problem now seems to be with other apps not using Material icons
    – sevbesau
    Feb 16, 2020 at 14:57
  • Not sure if this could be related to locale settings. What is the output of locale?
    – user391836
    Feb 17, 2020 at 1:28
  • updated my post!
    – sevbesau
    Feb 17, 2020 at 11:34

1 Answer 1

1

I want to help you understand how things work so you can troubleshoot those kind of problems yourself. what's happening with you is a very normal behavior.

however, the issue of applications not rendering the glyphs still remains

You didn't mention which application fail. You need to go to each application and set the fonts which contain your glyphs. e.g. LibreOffice, you go to Tools -> Options -> LibreOffice Writer -> Basic Fonts (Western), or Basic Fonts (CTL) and set the fonts for Default, Heading, List, Caption, Index". You shouldn't expect your config file to control that.

Then you might ask:

why is this fontconfig? What is the prefer, default, ... and all that's mentioned in man fonts-conf doing?

One use is if the application has no way of setting its fonts and just obey fontconfig, anther is if you configure your application with generic family name terms like serif, sans-serif, monospace, ... Here, your application would consult fontconfig for your preferred fonts.

Again, every application has its way of setting its fonts. For each one of them you need to configure it the way its meant to be. There is no way you can force all the applications globally to use the fonts you want.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .