This repository has been archived by the owner on Nov 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
/
user-bitstream-vera-fonts.conf
144 lines (132 loc) · 4.6 KB
/
user-bitstream-vera-fonts.conf
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Emoji One Color SVGinOT Font
Fontconfig fonts.conf for a Bitstream Vera default
https://github.com/eosrei/emojione-color-font
The DejaVu font family is based on the Bitstream Vera font family to provide
greater unicode coverage. The only way to override the emoji it includes is
to make the emoji font the primary system font. This shouldn't be a problem,
but a number of programs do not correctly use font fallback resulting in font
rendering errors everywhere.
This font.conf makes Bitstream Vera the default font for Serif, Sans-Serif,
and Monospace font requests since it does not contain any Unicode Emoji
characters. Emoji One Color font is the first fallback, followed by DejaVu
to provide everything else.
Install required fonts with:
sudo apt-get install ttf-bitstream-vera
Test with:
fc-match -s serif
fc-match -s sans-serif
fc-match -s monospace
-->
<fontconfig>
<match target="font">
<!-- If the requested font is Bitstream Vera Serif -->
<test name="family" compare="eq">
<string>Bitstream Vera Serif</string>
</test>
<!-- Replace the entire match list with Bitstream Vera Serif alone -->
<edit name="family" mode="assign_replace">
<string>Bitstream Vera Serif</string>
</edit>
<!-- Assign the serif family -->
<edit name="family" mode="append_last">
<string>serif</string>
</edit>
</match>
<match>
<!-- If the requested font is serif -->
<test qual="any" name="family">
<string>serif</string>
</test>
<!-- Make Bitstream Vera Serif the first result -->
<edit name="family" mode="prepend_first">
<string>Bitstream Vera Serif</string>
</edit>
<!-- Followed by Emoji One Color -->
<edit name="family" mode="prepend_first">
<string>Emoji One Color</string>
</edit>
</match>
<match target="font">
<!-- If the requested font is Bitstream Vera Sans -->
<test name="family" compare="eq">
<string>Bitstream Vera Sans</string>
</test>
<!-- Replace the entire match list with Bitstream Vera Sans alone -->
<edit name="family" mode="assign_replace">
<string>Bitstream Vera Sans</string>
</edit>
<!-- Assign the sans-serif family -->
<edit name="family" mode="append_last">
<string>sans-serif</string>
</edit>
</match>
<match target="pattern">
<!-- If the requested font is sans-serif -->
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<!-- Make Bitstream Vera Sans the first result -->
<edit name="family" mode="prepend_first">
<string>Bitstream Vera Sans</string>
</edit>
<!-- Followed by Emoji One Color -->
<edit name="family" mode="prepend_first">
<string>Emoji One Color</string>
</edit>
</match>
<match target="font">
<!-- If the requested font is Bitstream Vera Sans Mono -->
<test name="family" compare="eq">
<string>Bitstream Vera Sans Mono</string>
</test>
<!-- Replace the entire match list with Bitstream Vera Sans Mono alone -->
<edit name="family" mode="assign_replace">
<string>Bitstream Vera Sans Mono</string>
</edit>
<!-- Assign the monospace family last -->
<edit name="family" mode="append_last">
<string>monospace</string>
</edit>
</match>
<match target="pattern">
<!-- If the requested font is monospace -->
<test qual="any" name="family">
<string>monospace</string>
</test>
<!--
Make Bitstream Vera Sans Mono the first result
Note: If you want a different monospace font, this is where you change it.
-->
<edit name="family" mode="prepend_first">
<string>Bitstream Vera Sans Mono</string>
</edit>
<!-- Followed by Emoji One Color -->
<edit name="family" mode="prepend_first">
<string>Emoji One Color</string>
</edit>
</match>
<!-- Add emoji generic family -->
<alias binding="strong">
<family>emoji</family>
<default><family>Emoji One Color</family></default>
</alias>
<!-- Alias requests for the other emoji fonts -->
<alias binding="strong">
<family>Apple Color Emoji</family>
<prefer><family>Emoji One Color</family></prefer>
<default><family>sans-serif</family></default>
</alias>
<alias binding="strong">
<family>Segoe UI Emoji</family>
<prefer><family>Emoji One Color</family></prefer>
<default><family>sans-serif</family></default>
</alias>
<alias binding="strong">
<family>Noto Color Emoji</family>
<prefer><family>Emoji One Color</family></prefer>
<default><family>sans-serif</family></default>
</alias>
</fontconfig>