Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fontconfig and color emoji
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jaskaran
n00b
n00b


Joined: 05 May 2021
Posts: 3

PostPosted: Tue Sep 14, 2021 10:03 am    Post subject: Fontconfig and color emoji Reply with quote

Following a recent update (I'm not sure to which package) I lost color emojis in my terminal. However, I know "Noto Color Emoji" is not broken as the emojis in my status bar still work:

(I have an image but don't know how to load it into the post...)


Quote:

OS: Gentoo Base System release 2.7 x86_64
Kernel: 5.10.17-gentoo
Packages: 724 (emerge)
Shell: zsh 5.8
Resolution: 2560x1440
WM: dwm
Theme: Adwaita [GTK2/3]
Icons: Adwaita [GTK2/3]
Terminal: alacritty
Terminal Font: CaskaydiaCove Nerd Font


The out put of `fc-match -s "CaskaydiaCove Nerd Font" | head -3`, is as how would expect (the output is the same for monospace, sans-serif and serif):

Quote:

Caskaydia Cove Nerd Font Complete.ttf: "CaskaydiaCove Nerd Font" "Book"
FiraCode-Regular.ttf: "Fira Code" "Regular"
NotoColorEmoji.ttf: "Noto Color Emoji" "Regular"



Here's my fontconfig `eselect fontconfig list`settings (I have been experimenting so there's a few custom configs in there but none are turned on):

Quote:

Available fontconfig .conf files (* is enabled):
[1] 02-CaskaydiaCoveNerdFont.conf
[2] 02-emoji-hack.conf
[3] 10-autohint.conf *
[4] 10-hinting-full.conf
[5] 10-hinting-medium.conf
[6] 10-hinting-none.conf
[7] 10-hinting-slight.conf
[8] 10-no-sub-pixel.conf
[9] 10-powerline-symbols.conf *
[10] 10-scale-bitmap-fonts.conf *
[11] 10-sub-pixel-bgr.conf *
[12] 10-sub-pixel-rgb.conf *
[13] 10-sub-pixel-vbgr.conf
[14] 10-sub-pixel-vrgb.conf
[15] 10-unhinted.conf
[16] 11-lcdfilter-default.conf *
[17] 11-lcdfilter-legacy.conf
[18] 11-lcdfilter-light.conf
[19] 20-unhint-small-dejavu-sans.conf
[20] 20-unhint-small-dejavu-sans-mono.conf
[21] 20-unhint-small-dejavu-serif.conf
[22] 20-unhint-small-vera.conf
[23] 25-unhint-nonlatin.conf
[24] 30-metric-aliases.conf
[25] 40-nonlatin.conf
[26] 45-generic.conf *
[27] 45-latin.conf *
[28] 49-sansserif.conf
[29] 50-user.conf
[30] 51-local.conf *
[31] 57-dejavu-sans.conf
[32] 57-dejavu-sans-mono.conf
[33] 57-dejavu-serif.conf
[34] 60-generic.conf *
[35] 60-latin.conf *
[36] 60-liberation.conf
[37] 65-fonts-persian.conf
[38] 65-khmer.conf
[39] 65-nonlatin.conf
[40] 68-emoji-prepend.conf
[41] 69-emoji.conf
[42] 69-unifont.conf *
[43] 70-no-bitmaps.conf
[44] 70-no-dejavu.conf
[45] 70-yes-bitmaps.conf *
[46] 80-delicious.conf *
[47] 90-synthetic.conf *
[48] 99-CaskaydiaNerdFont.conf
[49] 99-Hack.conf



Finally, here is my `/etc/fonts/local.conf` (again it's a little unorthodox as I've been battling with different permutations over the past few days, am happy to reset this to blank -- when I do there is still no emojis)

To summarise what this file is currently doing, it's blacklisting DejuVa* fonts as they supply _some_ glyphs for _some_ emojis. Then I set "Noto Color Emoji" as the default emoji font and finally I explicitly white list the fonts I want so that fc-match is ordered correctly for (monospace, sans-serif, serif and CaskaydiaCove Nerd Font):

Code:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <selectfont>
    <rejectfont>
      <pattern>
        <patelt name="family">
          <string>DejaVu Sans</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>DejaVu Serif</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>DejaVu Sans Mono</string>
        </patelt>
      </pattern>
    </rejectfont>
  </selectfont>
          <match target="pattern">
    <test name="family"><string>emoji</string></test>
    <edit name="family" mode="prepend" binding="strong"><string>Noto Color Emoji</string></edit>
</match>

<match target="pattern">
    <test name="family"><string>sans-serif</string></test>
    <edit name="family" mode="prepend"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
    <test name="family"><string>serif</string></test>
    <edit name="family" mode="prepend"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
    <test name="family"><string>monospace</string></test>
    <edit name="family" mode="prepend"><string>Noto Color Emoji</string></edit>
</match>

<match target="pattern">
    <test name="family"><string>Segoe Ui Emoji</string></test>
    <edit name="family" mode="assign" binding="strong"><string>Noto Color Emoji</string></edit>
</match>

    <alias binding="same">
        <family>monospace</family>
        <accept>
            <family>CaskaydiaCove Nerd Font</family>
            <family>Fira Code</family>
            <family>Noto Color Emoji</family>
        </accept>
    </alias>
    <alias binding="same">
        <family>sans-serif</family>
        <accept>
            <family>CaskaydiaCove Nerd Font</family>
            <family>Fira Code</family>
            <family>Noto Color Emoji</family>
        </accept>
    </alias>
    <alias binding="same">
        <family>serif</family>
        <accept>
            <family>CaskaydiaCove Nerd Font</family>
            <family>Fira Code</family>
            <family>Noto Color Emoji</family>
        </accept>
    </alias>
    <alias binding="same">
        <family>CaskaydiaCove Nerd Font</family>
        <accept>
            <family>CaskaydiaCove Nerd Font</family>
            <family>Fira Code</family>
            <family>Noto Color Emoji</family>
        </accept>
    </alias>
</fontconfig>


I'm at a loss of what to try next, emojis work in my dwm bar using Noto Color Emoji and also I have emojis in my browsers (firefox, chrome, chromium), I'm not sure if that's coming from the fonts in my system or somewhere else though. I'd greatly appreciate any insight, ideas or suggestions. Thanks.

p.s this is my first Gentoo forum post and I'm loving Gentoo so far been using it for the last 6 months or so :D
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1343
Location: Sweden

PostPosted: Wed Sep 22, 2021 10:51 am    Post subject: Reply with quote

bump
Back to top
View user's profile Send private message
Krog
Guru
Guru


Joined: 26 Jun 2007
Posts: 339
Location: Roma, Italy

PostPosted: Tue Aug 16, 2022 6:49 am    Post subject: Reply with quote

same here
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1430
Location: Earth

PostPosted: Tue Aug 16, 2022 7:24 pm    Post subject: Reply with quote

welcome to Gentoo,
Quote:
(I have an image but don't know how to load it into the post...)

https://0x0.st/ >>> upload via first example :)

todo so, you'll get a link like this https://0x0.st/ojZb.png which you can include in your post.
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum