Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
Usage:
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
2. Run `fc-cache`
3. Set Konsole to use "Noto Mono" as the font.
4. Restart Konsole.
-->
<fontconfig>
<match>
<test name="family"><string>Noto Mono</string></test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Color Emoji</string>
</edit>
</match>
</fontconfig>
@gysi

This comment has been minimized.

Copy link

commented Feb 28, 2019

I love you, finally it works for me! 👍

@kmahyyg

This comment has been minimized.

Copy link

commented Mar 5, 2019

Worked fine for me, use font Noto Mono for Powerline, so I can use wttr.in now

@gsfordham

This comment has been minimized.

Copy link

commented May 8, 2019

Excellent! Saved me a lot of diggin', ya did!
I'm surprised this was needed, considering xterm didn't require anything special

@magiblot

This comment has been minimized.

Copy link

commented May 17, 2019

The following seems to work for any font:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

    <match target="pattern">
        <test qual="any" name="family"><string>monospace</string></test>
        <edit name="family" mode="append" binding="weak"><string>Noto Color Emoji</string></edit>
    </match>
    <match target="pattern">
        <test qual="any" name="family"><string>serif</string></test>
        <edit name="family" mode="append" binding="strong"><string>Noto Color Emoji</string></edit>
    </match>
    <match target="pattern">
        <test qual="any" name="family"><string>sans-serif</string></test>
        <edit name="family" mode="append" binding="strong"><string>Noto Color Emoji</string></edit>
    </match>

</fontconfig>

I'm not sure about the difference between append and prepend, though.
Inspired by: https://github.com/AndydeCleyre/dotfiles/blob/master/.config/fontconfig/fonts.conf

@figiel

This comment has been minimized.

Copy link

commented Jul 1, 2019

Found with google search. Thanks for sharing this!

@jospoortvliet

This comment has been minimized.

Copy link

commented Jul 24, 2019

The first one works, and an adjustment to noto-sans worked. I haven't tested the line from magiblot but I guess it'll work, too - this is really nice, took me forever to find out! Thanks a lot.

@rickysarraf

This comment has been minimized.

Copy link

commented Aug 21, 2019

THank you. Worked perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.