You are not logged in.

#1 2024-02-25 19:19:11

readf0x
Member
Registered: 2023-08-24
Posts: 7
Website

Noto emoji font is always overridden

I just recently added the Noto Emoji font to my system. I've added it specifically for use with design and to replace the colored emojis in specific instances in my obsidian setup (done via css). The font will be overridden by whatever other emoji font is available on my system, whether I install it from the available aur package or manually from google fonts. This is definitely a fontconfig issue, but I have no idea what is causing this. My font config is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "/usr/share/xml/fontconfig/fonts.dtd">

<fontconfig>
  <alias binding="strong">
    <family>Noto Emoji</family>
    <prefer><family>Noto Emoji</family></prefer>
    <default><family>emoji</family></default>
  </alias>
  <match>
    <test name="family"><string>sans-serif</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Ubuntu Nerd Font</string>
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>serif</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Times New Roman</string>
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>monospace</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Fira Code Nerd Font</string>
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>Apple Color Emoji</string></test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
  <match>
    <test name="family"><string>Calibri</string></test>
    <edit name="embeddedbitmap" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
  <alias binding="strong">
    <family>Ubuntu</family>
    <prefer><family>Ubuntu Nerd Font</family></prefer>
    <default><family>Ubuntu</family></default>
  </alias>
  <alias binding="strong">
    <family>Ubuntu Mono</family>
    <prefer><family>UbuntuMono Nerd Font</family></prefer>
    <default><family>Ubuntu Mono</family></default>
  </alias>
  <alias binding="strong">
    <family>Fira Code</family>
    <prefer><family>FiraCode Nerd Font</family></prefer>
    <default><family>Fira Code</family></default>
  </alias>
</fontconfig>

I have the following font packages/groups installed:
noto-fonts
noto-fonts-emoji
noto-fonts-extra
nerd-fonts
I have no clue why this happens, but I did some digging in /etc/fonts/ and found a couple references. It's in the list of emoji fonts in /etc/fonts/conf.d/60-generic.conf, and is substituted with the list in /etc/fonts/conf.d/45-generic.conf, but the substitutions don't break other fonts the way that it's been broken. I have all of the windows 11 fonts on my system, and the Segoe UI Emoji displays the windows style emojis like you would expect, even though it's one of the fonts being substituted. I tried removing Noto Color Emoji, but it was just overridden by Segoe UI Emoji instead. Needless to say, neither a reboot nor fc-cache fix the problem. Has anyone else had this issue?

Offline

#2 2024-02-25 21:34:49

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

Re: Noto emoji font is always overridden

The font will be overridden by whatever other emoji font is available on my system

By what metric?

FC_DEBUG=4 pango-view --font="sans-serif" -t '?' | grep family:
fc-match -s :charset=1F4A9

Offline

#3 2024-02-28 02:33:47

readf0x
Member
Registered: 2023-08-24
Posts: 7
Website

Re: Noto emoji font is always overridden

Apologies for the late reply, the arch forum decided not to email me.

Here's the output from that.
The amount of duplicate rules in that is astonishing.

Anyways, to explain what exactly my statement meant, here's some images to demonstrate.

Offline

#4 2024-02-28 08:11:03

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

Re: Noto emoji font is always overridden

The poop emoji was resolved by

family: "Ubuntu Nerd Font"(s)

which is the dominant font in your config.
You'll have to reverse that order.

Is your testcase that font configuration GUI and do you use that to write the configs?

Offline

#5 2024-02-28 14:44:44

readf0x
Member
Registered: 2023-08-24
Posts: 7
Website

Re: Noto emoji font is always overridden

Even with my font config disabled, the issue still occurs.

As for my test case, I'm using Font Manager. It takes a lot less time to view font changes than restarting my browser and finding a site that uses emojis. It's not technically a configuration GUI, since all you can actually change is whether or not a font is "disabled," which just changes the file extension to .bak or something. The issue is not with font manager, as the issue occurs globally, and it's not an issue with the font file, since it appears as expected in FontForge

It works as expected if I remove the other two fonts from my system. The only problem is that I have both for a reason, I only want to use the "Noto Emoji" font in a specific application, and "Noto Color Emoji" everywhere else.

Last edited by readf0x (2024-02-28 14:58:01)

Offline

#6 2024-02-28 15:22:51

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

Re: Noto emoji font is always overridden

No, the issue is with your configuration.
Where does that come from?
There's as strong binding, but no lang match - so that's pointless. Did you copy and paste that from somewhere?
Just prefer "Noto Color Emoji" for all fonts and prefer it *first*.

https://wiki.archlinux.org/title/Font_c … tion#Alias

...
<alias>
    <family>sans-serif</family>
    <prefer>
        <family>Noto Color Emoji</family>
        <family>Ubuntu Nerd Font</family>
    </prefer>
</alias>
...

You could also

...
<alias>
    <family>Ubuntu Nerd Font</family>
    <prefer>
        <family>Noto Color Emoji</family>
        <family>Ubuntu Nerd Font</family>
    </prefer>
</alias>
...

Otherwise, if eg. Ubuntu Nerd Font provides a glyph (emoji or whatever) it will be resolved from there if the font is used.

Offline

#7 2024-02-28 15:30:54

readf0x
Member
Registered: 2023-08-24
Posts: 7
Website

Re: Noto emoji font is always overridden

Did you even read the first line of my message?

Even with my font config disabled, the issue still occurs.

I have deleted my font config, and still have the issue. Also the nerd font symbols exist in the private Unicode block, so it's impossible for it to override my emojis, since the Ubuntu source font does not contain emojis.

The issue is not that Noto Color Emoji doesn't work, it's that the non-colored Noto Emoji font doesn't work. It is rendered as another emoji font on my system.

Last edited by readf0x (2024-02-28 15:32:26)

Offline

#8 2024-02-28 15:34:07

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

Re: Noto emoji font is always overridden

Yes, it will most certainly not work without *any* config, it's just that your config won't work either.
It doesn't matter whether the nerd font patched some private area, it *obviously* also at least resolves the poop emoji - what is not uncommon for many fonts.

Have you even read anything of my reply?

Edit:

The issue is not that Noto Color Emoji doesn't work, it's that the non-colored Noto Emoji font doesn't work. It is rendered as another emoji font on my system.

same thing, prefer the non-colored emoji font over everything else.

Last edited by seth (2024-02-28 15:35:00)

Offline

#9 2024-02-28 15:41:59

readf0x
Member
Registered: 2023-08-24
Posts: 7
Website

Re: Noto emoji font is always overridden

I want to have both, the issue is not that the default emoji font is wrong, it's that when specifying the "Noto Emoji" font it is somehow resolved as "Noto Color Emoji."

I'm trying to change the emoji font specifically within the Obsidian app, which supports custom css. I do not need to change my default emoji font, I need to make the "Noto Emoji" font actually appear as itself, rather than another font.

Last edited by readf0x (2024-02-28 15:42:23)

Offline

Board footer

Powered by FluxBB