Skip to content

Instantly share code, notes, and snippets.

@ongun-kanat
Last active April 11, 2024 13:12
Show Gist options
  • Save ongun-kanat/65a2ba1835d58ef118b8a3b9f2bb29f3 to your computer and use it in GitHub Desktop.
Save ongun-kanat/65a2ba1835d58ef118b8a3b9f2bb29f3 to your computer and use it in GitHub Desktop.
Make ~~cancer~~ emoji work on Linux
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>Arial</family>
<prefer>
<family>Arial</family>
<family>Liberation Sans</family>
<family>sans-serif</family>
</prefer>
</alias>
<!-- <alias>
<family>Helvetica</family>
<prefer>
<family>sans-serif</family>
</prefer>
</alias>-->
<match target="font">
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit name="hintstyle" mode="assign">
<const>hintslight</const>
</edit>
</match>
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
</match>
</fontconfig>
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<!-- by default fontconfig assumes any unrecognized font is sans-serif, so -->
<!-- the fonts above now have /both/ families. fix this. -->
<!-- note that "delete" applies to the first match -->
<fontconfig>
<match>
<test compare="eq" name="family">
<string>sans-serif</string>
</test>
<test compare="eq" name="family">
<string>monospace</string>
</test>
<edit name="family" mode="delete"/>
</match>
<match>
<test compare="eq" name="family">
<string>sans-serif</string>
</test>
<test compare="eq" name="family">
<string>serif</string>
</test>
<edit name="family" mode="delete"/>
</match>
<match>
<test compare="eq" name="family">
<string>serif</string>
</test>
<test compare="eq" name="family">
<string>monospace</string>
</test>
<edit name="family" mode="delete"/>
</match>
<match>
<test compare="eq" name="family">
<string>sans</string>
</test>
<test compare="eq" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="delete"/>
</match>
</fontconfig>
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>Noto Sans Armenian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Chakma</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Myanmar</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Adlam</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Anatolian Hieroglyphs</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Arabic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Avestan</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Bamum</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Bassa Vah</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Batak</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Bengali</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Bhaiksuki</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Brahmi</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Buginese</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Buhid</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Carian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Caucasian Albanian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Cham</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Cherokee</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Coptic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Cuneiform</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Cypriot</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Devanagari</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Duployan</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Egyptian Hieroglyphs</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Elbasan</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Ethiopic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Georgian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Glagolitic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Grantha</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Hatran</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Imperial Aramaic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Inscriptional Pahlavi</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Inscriptional Parthian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Kaithi</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Kharoshthi</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Khudawadi</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Lao</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Lepcha</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Limbu</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Linear A</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Linear B</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Lycian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Lydian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Mahajani</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Malayalam</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Mandaic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Manichaean</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Marchen</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Meetei Mayek</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Mende Kikakui</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Meroitic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Miao</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Modi</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Mro</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Multani</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Nabataean</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Newa</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Ol Chiki</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Old Hungarian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Old Italic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Old North Arabian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Old Permic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Old South Arabian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Old Turkic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Osage</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Pahawh Hmong</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Palmyrene</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Pau Cin Hau</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Psalter Pahlavi</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Rejang</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Runic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Samaritan</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Saurashtra</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Sharada</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Shavian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Sora Sompeng</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Sundanese</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Syloti Nagri</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Tagalog</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Tagbanwa</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Tai Viet</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Takri</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Tifinagh</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Tirhuta</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Warang Citi</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Javanese</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Mongolian</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans Tai Tham</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans CJK</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
<family>Noto Sans</family>
<prefer>
<family>Noto Sans</family>
<family>Noto Sans Armenian</family>
<family>Noto Sans Chakma</family>
<family>Noto Sans Myanmar</family>
<family>Noto Sans Adlam</family>
<family>Noto Sans Anatolian Hieroglyphs</family>
<family>Noto Sans Arabic</family>
<family>Noto Sans Avestan</family>
<family>Noto Sans Bamum</family>
<family>Noto Sans Bassa Vah</family>
<family>Noto Sans Batak</family>
<family>Noto Sans Bengali</family>
<family>Noto Sans Bhaiksuki</family>
<family>Noto Sans Brahmi</family>
<family>Noto Sans Buginese</family>
<family>Noto Sans Buhid</family>
<family>Noto Sans Carian</family>
<family>Noto Sans Caucasian Albanian</family>
<family>Noto Sans Cham</family>
<family>Noto Sans Cherokee</family>
<family>Noto Sans Coptic</family>
<family>Noto Sans Cuneiform</family>
<family>Noto Sans Cypriot</family>
<family>Noto Sans Devanagari</family>
<family>Noto Sans Duployan</family>
<family>Noto Sans Egyptian Hieroglyphs</family>
<family>Noto Sans Elbasan</family>
<family>Noto Sans Ethiopic</family>
<family>Noto Sans Georgian</family>
<family>Noto Sans Glagolitic</family>
<family>Noto Sans Grantha</family>
<family>Noto Sans Hatran</family>
<family>Noto Sans Imperial Aramaic</family>
<family>Noto Sans Inscriptional Pahlavi</family>
<family>Noto Sans Inscriptional Parthian</family>
<family>Noto Sans Kaithi</family>
<family>Noto Sans Kharoshthi</family>
<family>Noto Sans Khudawadi</family>
<family>Noto Sans Lao</family>
<family>Noto Sans Lepcha</family>
<family>Noto Sans Limbu</family>
<family>Noto Sans Linear A</family>
<family>Noto Sans Linear B</family>
<family>Noto Sans Lycian</family>
<family>Noto Sans Lydian</family>
<family>Noto Sans Mahajani</family>
<family>Noto Sans Malayalam</family>
<family>Noto Sans Mandaic</family>
<family>Noto Sans Manichaean</family>
<family>Noto Sans Marchen</family>
<family>Noto Sans Meetei Mayek</family>
<family>Noto Sans Mende Kikakui</family>
<family>Noto Sans Meroitic</family>
<family>Noto Sans Miao</family>
<family>Noto Sans Modi</family>
<family>Noto Sans Mro</family>
<family>Noto Sans Multani</family>
<family>Noto Sans Nabataean</family>
<family>Noto Sans Newa</family>
<family>Noto Sans Ol Chiki</family>
<family>Noto Sans Old Hungarian</family>
<family>Noto Sans Old Italic</family>
<family>Noto Sans Old North Arabian</family>
<family>Noto Sans Old Permic</family>
<family>Noto Sans Old South Arabian</family>
<family>Noto Sans Old Turkic</family>
<family>Noto Sans Osage</family>
<family>Noto Sans Pahawh Hmong</family>
<family>Noto Sans Palmyrene</family>
<family>Noto Sans Pau Cin Hau</family>
<family>Noto Sans Psalter Pahlavi</family>
<family>Noto Sans Rejang</family>
<family>Noto Sans Runic</family>
<family>Noto Sans Samaritan</family>
<family>Noto Sans Saurashtra</family>
<family>Noto Sans Sharada</family>
<family>Noto Sans Shavian</family>
<family>Noto Sans Sora Sompeng</family>
<family>Noto Sans Sundanese</family>
<family>Noto Sans Syloti Nagri</family>
<family>Noto Sans Tagalog</family>
<family>Noto Sans Tagbanwa</family>
<family>Noto Sans Tai Viet</family>
<family>Noto Sans Takri</family>
<family>Noto Sans Tifinagh</family>
<family>Noto Sans Tirhuta</family>
<family>Noto Sans Warang Citi</family>
<family>Noto Sans Javanese</family>
<family>Noto Sans Mongolian</family>
<family>Noto Sans Tai Tham</family>
<family>Noto Sans CJK</family>
<family>Noto Sans CJK JP</family>
<family>Noto Sans CJK KR</family>
<family>Noto Sans CJK SC</family>
<family>Noto Sans CJK TC</family>
<family>emojifallback</family>
</prefer>
</alias>
</fontconfig>
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<selectfont>
<rejectfont>
<pattern>
<patelt name="family">
<string>Symbola</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
<match target="pattern">
<test name="family"><string>sans</string></test>
<edit name="family" mode="prepend"><string>emojifallback</string></edit>
</match>
<match target="pattern">
<test name="family"><string>serif</string></test>
<edit name="family" mode="prepend"><string>emojifallback</string></edit>
</match>
<match target="pattern">
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend"><string>emojifallback</string></edit>
</match>
<match target="pattern">
<test name="family"><string>monospace</string></test>
<edit name="family" mode="prepend"><string>emojifallback</string></edit>
</match>
<!-- Use Noto Color Emoji when other popular fonts are being specifically requested. -->
<match target="pattern">
<test qual="any" name="family"><string>Apple Color Emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Segoe UI Emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Segoe UI Symbol</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Android Emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Twitter Color Emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Twemoji</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Twemoji Mozilla</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>TwemojiMozilla</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>EmojiTwo</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Emoji Two</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>EmojiSymbols</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Symbola</string></test>
<edit name="family" mode="assign" binding="same"><string>emojifont</string></edit>
</match>
<alias>
<family>emojifallback</family>
<prefer>
<family>Noto Sans Math</family>
<family>Noto Sans Symbols</family>
<family>Noto Sans CJK</family>
<family>Noto Color Emoji</family>
<!-- <family>Twitter Color Emoji</family>-->
</prefer>
</alias>
<alias>
<family>emojifont</family>
<prefer>
<family>Noto Color Emoji</family>
<!-- <family>Twitter Color Emoji</family> -->
</prefer>
</alias>
</fontconfig>
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<test qual="any" name="prgname" compare="eq"><string>firefox</string></test>
<test qual="all" name="family" compare="eq"><string>Noto Color Emoji</string></test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>
</fontconfig>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment