aboutsummaryrefslogtreecommitdiffstats
path: root/_config/fontconfig/conf.d/50-user.conf
blob: fda01a0f36f3532d27a218c3dfcd6463a310945d (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!--
User-wide font configurations

Configuration file ordering (prefix & description):
50 : User overrides
51 : Local system overrides
55-59 : High priority LGC (latin greek cyrillic) fonts
        (distribution general-purpose default fonts)
60 : Main LGC font list
61-64 : Low priority LGC fonts
65-69 : Fonts with less common encodings, ending with fonts that
        provide coverage of exotic unicode blocks at the expense of
        drawing quality.

References:
[1] https://freedesktop.org/software/fontconfig/fontconfig-user.html
    See also `fonts.conf(5)'
[2] https://fedoraproject.org/wiki/Fontconfig_packaging_tips
[3] https://wiki.archlinux.org/index.php/font_configuration
[4] https://wiki.gentoo.org/wiki/Fontconfig
[5] https://eev.ee/blog/2015/05/20/i-stared-into-the-fontconfig-and-the-fontconfig-stared-back-at-me/


Aaron LI
Created: 2014-04-06
-->

  <!--
      Set correct common families for custom "serif" and "monospace" fonts,
      otherwise fontconfig assumes any /unrecognized/ font is "sans-serif",
      thus cause *wrong fallback* fonts being found.
  -->
  <!-- "serif" faces -->
  <alias>
    <family>Source Serif Pro</family>
    <default><family>serif</family></default>
  </alias>
  <!-- "monospace" faces -->
  <alias>
    <family>Source Code Pro</family>
    <default><family>monospace</family></default>
  </alias>
  <alias>
    <family>Fira Code</family>
    <default><family>monospace</family></default>
  </alias>

  <!-- Font families preferences -->
  <!--
      <alias> elements provide a shorthand notation for the set of common
      match operations needed to substitute one font family for another.
      They contain a <family> element followed by optional <prefer>,
      <accept> and <default> elements.
  -->
  <!-- "serif" font family -->
  <alias>
    <family>serif</family>
    <prefer>
      <family>Source Serif Pro</family>
      <family>Noto Serif</family>
    </prefer>
  </alias>
  <!-- "sans-serif" font family -->
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>Source Sans Pro</family>
      <family>Noto Sans</family>
      <!-- Also ordering the Noto CJK fonts for "zh-cn"-->
      <family>Noto Sans CJK SC</family>
      <family>Noto Sans CJK TC</family>
      <family>Noto Sans CJK JP</family>
      <family>Noto Sans CJK KR</family>
    </prefer>
  </alias>
  <!-- "monospace" font family -->
  <alias>
    <family>monospace</family>
    <prefer>
      <family>Source Code Pro</family>
      <family>Fira Code</family>
      <family>Noto Mono</family>
      <!-- Also ordering the Noto CJK fonts for "zh-cn"-->
      <family>Noto Sans Mono CJK SC</family>
      <family>Noto Sans Mono CJK TC</family>
      <family>Noto Sans Mono CJK JP</family>
      <family>Noto Sans Mono CJK KR</family>
    </prefer>
  </alias>

  <!-- Substitute Helvetica and Arial -->
  <match>
    <test name="family">
      <string>Helvetica</string>
    </test>
    <edit binding="same" mode="assign" name="family">
      <string>Source Sans Pro</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>Arial</string>
    </test>
    <edit binding="same" mode="assign" name="family">
      <string>Source Sans Pro</string>
    </edit>
  </match>
</fontconfig>