-
-
Save IgnoredAmbience/7c99b6cf9a8b73c9312a71d1209d9bbb to your computer and use it in GitHub Desktop.
<?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> |
This works well for me (note the append_last
).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test name="family"><string>monospace</string></test>
<edit name="family" mode="append_last" binding="strong">
<string>Noto Color Emoji</string>
</edit>
</match>
</fontconfig>
Everyone that lands here and wonders why there config is not working:
It is probably overwritten because you forgot to prepend a high priority like 99. You probably want to name the config something like 99-color-emoji.conf
and place it under ~/.config/fontconfig/conf.d/99-color-emoji.conf
Thank you! I just switched Noto Sans for JetBrains Mono and it worked perfectly!
tried something similar that ended up breaking emacs, but using this config fixed it lol. thanks fam!
I think I got this to work on any monospace font without breaking code blocks. My fork is located here. The major change besides setting the font family to "Monospace" on line 17 as @magiblot did, is setting binding="weak"
on line 18 (22 in my fork). I also set mode="append_last"
as @grubersjoe did, but I'm not sure if its necessary (seems to work fine for me either with "append_last" or "prepend").
I'm not sure what happened, but @magiblot has finally fixed an issue I had with KDE emoji picker. π₯³π₯³π₯³
Perfect! thank you
The reason why some of the emojis don't work for abcfy2 is because it's not handling the multi-code emojis (called grapheme clusters, or zwj sequence). For example LGBT flag π³οΈβπ: looks like this in konsole: π³<fe0f><200d>π
The empty flag + <fe0f> the 16th 'variation selector' character (indicating color, I believe) + <200d> is the zero width joiner + rainbow
How to fix it, I don't know.
This distorted my terminal default font too, making it appear shorter and wider. Removing the binding="strong"
from the original example worked for me.
As noted in some comment above, I also swapped the Noto Mono
for my konsole's monospace
.
Thanks a bunch!
I'm pretty sure you can achieve your desired result with minimal effort. Check out https://www.freedesktop.org/software/fontconfig/fontconfig-user.html to see what you can actually do with your fontconfigs.