-
Notifications
You must be signed in to change notification settings - Fork 1
/
lowdpi.conf
244 lines (208 loc) · 8.92 KB
/
lowdpi.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<description>Settings and aliases for low DPI screens</description>
<!-- Force a DPI of 96, even on devices with a lower DPI. Manual TrueType
hinting for small sizes is usually done at this standard DPI value. -->
<match target="pattern" >
<edit mode="assign" name="dpi" >
<double>96</double>
</edit>
</match>
<!-- Some fonts embed bitmaps for certain sizes. They are desirable on loDPI
screens, but enabling them here can break fonts, e.g. Anonymous Pro.
One solution is to set this as 'false', then disable AA for those sizes
in pixelperfect.conf, but Firefox/Chrome break Wine's Tahoma. -->
<match target="font" >
<edit name="embeddedbitmap" mode="assign">
<bool>true</bool>
</edit>
</match>
<!-- Keep autohinter off, well-hinted fonts are used. Also, FreeType's
autohinter is incompatible with sub-pixel rendering. -->
<match target="font">
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
</match>
<!-- Aliases for the generic W3C font families. Ideally should match the
metrics of the main OS'es generics: Helvetica / Courier / Times on
macOS and Arial / Times New Roman / Courier New on Windows. -->
<alias binding="strong">
<family>serif</family>
<prefer>
<family>Liberation Serif</family>
<family>PT Serif</family>
<family>DejaVu Serif</family>
</prefer>
</alias>
<alias binding="strong">
<family>sans-serif</family>
<prefer>
<family>Liberation Sans</family>
<family>PT Sans</family>
<family>Ubuntu</family>
</prefer>
</alias>
<alias binding="strong">
<family>monospace</family>
<prefer>
<!-- Liberation Mono's metrics match Courier / Courier New, and it
also has italics, but its default line spacing is bad. -->
<family>PT Mono</family>
<family>Liberation Mono</family>
<family>Ubuntu Mono</family>
</prefer>
</alias>
<!-- Chrome picks Cursive and Fantasy aliases by itself. FIXME#5
Cursive and Fantasy aliases are ignored by WebKitGTK. FIXME#6 -->
<alias binding="strong">
<family>cursive</family>
<prefer>
<family>Kaushan Script</family>
</prefer>
</alias>
<alias binding="strong">
<family>fantasy</family>
<prefer>
<family>Lobster Two</family>
</prefer>
</alias>
<!-- Aliases for the CSS 4 font families.
This also shows the recommended typefaces for the UI interface.
Recommended sizes for sans / serif / mono: 11 / 12 / 10. -->
<alias binding="strong">
<family>system-ui</family>
<prefer>
<family>PT Sans</family>
</prefer>
</alias>
<alias binding="strong">
<family>ui-sans-serif</family>
<prefer>
<family>PT Sans</family>
</prefer>
</alias>
<alias binding="strong">
<family>ui-serif</family>
<prefer>
<family>PT Serif</family>
</prefer>
</alias>
<alias binding="strong">
<family>ui-monospace</family>
<prefer>
<family>Luculent</family>
</prefer>
</alias>
<alias binding="strong">
<family>ui-rounded</family>
<prefer>
<family>Varela Round</family>
</prefer>
</alias>
<!-- Aliases used to target the macOS UI font. Hijacked for our UI font. -->
<alias binding="strong">
<family>-apple-system</family>
<prefer>
<family>PT Sans</family>
</prefer>
</alias>
<alias binding="strong">
<family>-webkit-system-font</family>
<prefer>
<family>PT Sans</family>
</prefer>
</alias>
<alias binding="strong">
<family>BlinkMacSystemFont</family>
<prefer>
<family>PT Sans</family>
</prefer>
</alias>
<!-- Metrically-identical replacements. -->
<!-- Andale Mono, Source Code Pro, Droid Sans Mono, Noto Sans Mono.
Andale Mono used on https://theintercept.com (fallback).
Source Code Pro used on https://www.vice.com. -->
<include prefix="xdg">fontconfig/lowdpi/noto-mono.conf</include>
<!-- Bitstream Vera Serif, DejaVu Serif. -->
<include prefix="xdg">fontconfig/lowdpi/dejavu-serif.conf</include>
<!-- Courier, Courier New/Std. Not the greatest match, but Wine's Courier
is far from good enough. Liberation Mono is even less of a match. -->
<include prefix="xdg">fontconfig/lowdpi/pt-mono.conf</include>
<!-- Helvetica, MS Sans Serif, Arimo, and other missing aliases.
Arial used on many sites, e.g. https://www.google.com.
Helvetica used on many sites, e.g. https://www.facebook.com.
Helvetica Neue used on many sites, e.g. https://www.yahoo.com.
Arimo used on https://www.anandtech.com. -->
<include prefix="xdg">fontconfig/lowdpi/liberation-sans.conf</include>
<!-- Liberation Mono, Menlo, Lucida Console, Lucida Sans Typewriter. -->
<include prefix="xdg">fontconfig/lowdpi/liberation-mono.conf</include>
<!-- Times New Roman, Times, MS Serif, Tinos, and other missing aliases.
Times New Roman used on https://www.nlm.nih.gov/,
https://www.latimes.com (fallback).
Times used on https://www.thetimes.co.uk. -->
<include prefix="xdg">fontconfig/lowdpi/liberation-serif.conf</include>
<!-- End of metrically-identical replacements -->
<!-- From here on, matches are not that great,
but it's better to differentiate these typefaces. -->
<!-- Arial Narrow and friends (Liberation Narrow is poorly hinted.)
Other (even less similar) options: Cabin Condensed, Ubuntu Condensed.
Arial Narrow used on: https://www.nbcnews.com (fallback),
https://time.com (fallback). -->
<include prefix="xdg">fontconfig/lowdpi/pt-sans-narrow.conf</include>
<!-- Georgia, PT Serif. Similar metrics, with a slightly higher x-height for
the latter. PT Serif is a much better alias for Georgia compared to
Liberation/DejaVu Serif. None have Georgia's old-style figures though.
Georgia used on many sites, e.g. https://www.washingtonpost.com.
PT Serif used on https://time.com. -->
<include prefix="xdg">fontconfig/lowdpi/pt-serif.conf</include>
<!-- Geneva, Tahoma. This is Wine's Tahoma. Some Bold bitmaps are wrong.
Tahoma used on many sites, e.g. https://web.telegram.org.
Geneva used on https://news.ycombinator.com/ (fallback). -->
<include prefix="xdg">fontconfig/lowdpi/tahoma.conf</include>
<!-- Lucida Bright. -->
<include prefix="xdg">fontconfig/lowdpi/pt-serif-caption.conf</include>
<!-- Monotype Corsiva, Corsiva. -->
<include prefix="xdg">fontconfig/lowdpi/felipa.conf</include>
<!-- Proxima Nova. Most successful commercial font on the web. There's no
open-source font with perfect hinting to replace it. To avoid falling
back to default sans-serif, let's give Cabin a bit more use...
Proxima Nova used on: https://www.cnbc.com, https://duckduckgo.com.
Proxima Nova Cond used on https://gizmodo.com. -->
<include prefix="xdg">fontconfig/lowdpi/cabin.conf</include>
<!-- Segoe UI, Segoe, Lucida Sans/Grande, PT Sans, Cantarell.
Segoe UI used on https://www.microsoft.com, https://msn.com, etc.
Segoe used on https://outlook.live.com.
Lucida Grande used on https://telegram.org, https://arxiv.org.
Lucida Sans Unicode used on https://telegram.org (fallback). -->
<include prefix="xdg">fontconfig/lowdpi/pt-sans.conf</include>
<!-- Verdana, DejaVu Sans. Not that far away. Unfortunately, no italics.
Verdana used on: https://www.imdb.com, https://news.ycombinator.com.-->
<include prefix="xdg">fontconfig/lowdpi/pt-sans-caption.conf</include>
<!-- Extra rules -->
<!-- Recommended font for consoles/terminals. -->
<include prefix="xdg">fontconfig/lowdpi/luculent.conf</include>
<!-- Fonts frequently used w/o any fallbacks. Aliased to avoid serif. -->
<!-- On https://arstechnica.com (the desktop site). -->
<alias binding="same">
<family>OpenSans</family>
<prefer>
<family>Liberation Sans</family>
</prefer>
</alias>
<!-- On https://mashable.com. -->
<alias binding="same">
<family>LatoRegular</family>
<prefer>
<family>Liberation Sans</family>
</prefer>
</alias>
<!-- Fix GitHub code font for WebKitGTK browsers. FIXME#3-->
<alias binding="same">
<family>SFMono-Regular</family>
<prefer>
<family>Luculent</family>
</prefer>
</alias>
</fontconfig>