aboutsummaryrefslogtreecommitdiff
path: root/fonts/dot-config/fontconfig/conf.d/66-emoji.conf
blob: 139d78abf2d405445945e5669767f47744767eb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
  <!--
  This adds a generic family 'emoji',
  aimed for apps that don't specify specific font family for rendering emojis.
  -->
  <match target="pattern">
    <test qual="any" name="family"><string>emoji</string></test>
    <edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
  </match>
  <!--
  If other fonts contain emoji glyphs, they could interfere and make some emojis rendered in wrong font (often in black-and-white).
  For example, DejaVu Sans contains black-and-white emojis, which we can remove using the following trick:
  -->
  <match target="scan">
    <test name="family" compare="contains">
      <string>Hack</string>
    </test>
    <test name="family" compare="contains">
      <string>Comic Code</string>
    </test>
    <test name="family" compare="contains">
      <string>IosevkaInput</string>
    </test>
    <test name="family" compare="contains">
      <string>Dejavu Sans Mono</string>
    </test>
    <edit name="charset" mode="assign" binding="same">
      <minus>
        <name>charset</name>
        <charset>
          <range>
            <int>0x2763</int>
            <int>0x2764</int>
          </range>
          <range>
            <int>0x1f600</int>
            <int>0x1f640</int>
          </range>
        </charset>
      </minus>
    </edit>
  </match>
</fontconfig>