• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0"?>
2<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3<fontconfig>
4
5    <!-- Due to patent (http://freetype.sourceforge.net/patents.html)
6         issues hinting gives different results depending on the
7         freetype version of the linux distribution, avoiding hinting
8         gives more consistent results. When all the distributions
9         release freetype the 2.4, which enables by default the
10         hinting method that was patented, we could undo this change
11         and try the hinting again. -->
12    <match target="font">
13        <edit name="hinting" mode="assign">
14            <bool>false</bool>
15        </edit>
16    </match>
17
18    <!-- This system may have turned off selection of bitmap fonts, but
19         we must turn it on again, because we want to be able to test that
20         bitmap fonts with no valid encodings are *never* selected regardless
21         of the Fontconfig settings. So force Fontconfig to select our cruddy
22         bitmap font -->
23    <selectfont>
24        <acceptfont>
25            <pattern>
26                <patelt name="family">
27                    <string>FontWithNoValidEncoding</string>
28                </patelt>
29            </pattern>
30        </acceptfont>
31    </selectfont>
32
33    <!-- The sans-serif font should be Liberation Serif -->
34    <match target="pattern">
35        <test qual="any" name="family">
36            <string>serif</string>
37        </test>
38        <edit name="family" mode="assign">
39            <string>Liberation Serif</string>
40        </edit>
41    </match>
42    <match target="pattern">
43        <test qual="any" name="family">
44            <string>Times</string>
45        </test>
46        <edit name="family" mode="assign">
47            <string>Liberation Serif</string>
48        </edit>
49    </match>
50    <match target="pattern">
51        <test qual="any" name="family">
52            <string>Times New Roman</string>
53        </test>
54        <edit name="family" mode="assign">
55            <string>Liberation Serif</string>
56        </edit>
57    </match>
58
59    <!-- Until we find good fonts to use for cursive and fantasy
60         just use our serif font. -->
61    <match target="pattern">
62        <test qual="any" name="family">
63            <string>cursive</string>
64        </test>
65        <edit name="family" mode="assign">
66            <string>Liberation Serif</string>
67        </edit>
68    </match>
69    <match target="pattern">
70        <test qual="any" name="family">
71            <string>fantasy</string>
72        </test>
73        <edit name="family" mode="assign">
74            <string>Liberation Serif</string>
75        </edit>
76    </match>
77
78    <!-- The sans-serif font should be Liberation Sans -->
79    <match target="pattern">
80        <test qual="any" name="family">
81            <string>sans serif</string>
82        </test>
83        <edit name="family" mode="assign">
84            <string>Liberation Sans</string>
85        </edit>
86    </match>
87    <match target="pattern">
88        <test qual="any" name="family">
89            <string>sans</string>
90        </test>
91        <edit name="family" mode="assign">
92            <string>Liberation Sans</string>
93        </edit>
94    </match>
95    <!-- We need to ensure that layout tests that use "Helvetica" don't
96        fall back to the default serif font -->
97    <match target="pattern">
98      <test qual="any" name="family">
99        <string>Helvetica</string>
100      </test>
101      <edit name="family" mode="assign">
102        <string>Liberation Sans</string>
103      </edit>
104    </match>
105    <match target="pattern">
106      <test qual="any" name="family">
107        <string>Arial</string>
108      </test>
109      <edit name="family" mode="assign">
110        <string>Liberation Sans</string>
111      </edit>
112    </match>
113    <match target="pattern">
114      <test qual="any" name="family">
115        <string>Lucida Grande</string>
116      </test>
117      <edit name="family" mode="assign">
118        <string>Liberation Sans</string>
119      </edit>
120    </match>
121
122    <!-- The Monospace font should be Liberation Mono -->
123    <match target="pattern">
124        <test qual="any" name="family">
125            <string>monospace</string>
126        </test>
127        <edit name="family" mode="assign">
128            <string>Liberation Mono</string>
129        </edit>
130    </match>
131    <match target="pattern">
132        <test qual="any" name="family">
133            <string>mono</string>
134        </test>
135        <edit name="family" mode="assign">
136            <string>Liberation Mono</string>
137        </edit>
138    </match>
139    <!-- We need to ensure that layout tests that use "Courier", "Courier New",
140         and "Monaco" (all monospace fonts) don't fall back to the default
141         serif font -->
142    <match target="pattern">
143      <test qual="any" name="family">
144        <string>Courier</string>
145      </test>
146      <edit name="family" mode="assign">
147        <string>Liberation Mono</string>
148      </edit>
149    </match>
150    <match target="pattern">
151      <test qual="any" name="family">
152        <string>Courier New</string>
153      </test>
154      <edit name="family" mode="assign">
155        <string>Liberation Mono</string>
156      </edit>
157    </match>
158    <match target="pattern">
159      <test qual="any" name="family">
160        <string>Monaco</string>
161      </test>
162      <edit name="family" mode="assign">
163        <string>Liberation Mono</string>
164      </edit>
165    </match>
166
167    <!-- The following hinting specializations are adapted from those in the
168         Chromium test_shell.  We try to duplicate their incredibly thorough
169         testing here -->
170    <match target="pattern">
171        <test name="family" compare="eq">
172            <string>NonAntiAliasedSans</string>
173        </test>
174        <edit name="family" mode="assign">
175            <string>Liberation Sans</string>
176        </edit>
177        <edit name="antialias" mode="assign">
178            <bool>false</bool>
179        </edit>
180    </match>
181
182    <match target="pattern">
183        <test name="family" compare="eq">
184            <string>SlightHintedSerif</string>
185        </test>
186        <edit name="family" mode="assign">
187            <string>Liberation Serif</string>
188        </edit>
189        <edit name="hinting" mode="assign">
190            <bool>true</bool>
191        </edit>
192        <edit name="hintstyle" mode="assign">
193            <const>hintslight</const>
194        </edit>
195    </match>
196
197    <match target="pattern">
198        <test name="family" compare="eq">
199            <string>NonHintedSans</string>
200        </test>
201        <edit name="family" mode="assign">
202            <string>Liberation Sans</string>
203        </edit>
204        <!-- These deliberately contradict each other. The 'hinting' preference
205             should take priority -->
206        <edit name="hintstyle" mode="assign">
207            <const>hintfull</const>
208        </edit>
209        <edit name="hinting" mode="assign">
210            <bool>false</bool>
211        </edit>
212    </match>
213
214    <match target="pattern">
215        <test name="family" compare="eq">
216            <string>AutohintedSerif</string>
217        </test>
218        <edit name="family" mode="assign">
219            <string>Liberation Serif</string>
220        </edit>
221        <edit name="hinting" mode="assign">
222            <bool>true</bool>
223        </edit>
224        <edit name="autohint" mode="assign">
225            <bool>true</bool>
226        </edit>
227        <edit name="hintstyle" mode="assign">
228            <const>hintmedium</const>
229        </edit>
230    </match>
231
232    <match target="pattern">
233        <test name="family" compare="eq">
234            <string>HintedSerif</string>
235        </test>
236        <edit name="family" mode="assign">
237            <string>Liberation Serif</string>
238        </edit>
239        <edit name="hinting" mode="assign">
240            <bool>true</bool>
241        </edit>
242        <edit name="autohint" mode="assign">
243            <bool>false</bool>
244        </edit>
245        <edit name="hintstyle" mode="assign">
246            <const>hintmedium</const>
247        </edit>
248    </match>
249
250    <match target="pattern">
251        <test name="family" compare="eq">
252            <string>FullAndAutoHintedSerif</string>
253        </test>
254        <edit name="family" mode="assign">
255            <string>Liberation Serif</string>
256        </edit>
257        <edit name="hinting" mode="assign">
258            <bool>true</bool>
259        </edit>
260        <edit name="autohint" mode="assign">
261            <bool>true</bool>
262        </edit>
263        <edit name="hintstyle" mode="assign">
264            <const>hintfull</const>
265        </edit>
266    </match>
267
268    <match target="pattern">
269        <test name="family" compare="eq">
270            <string>SubpixelEnabledSans</string>
271        </test>
272        <edit name="family" mode="assign">
273            <string>Liberation Sans</string>
274        </edit>
275        <edit name="rgba" mode="assign">
276            <const>rgb</const>
277        </edit>
278    </match>
279
280    <match target="pattern">
281        <test name="family" compare="eq">
282            <string>SubpixelDisabledSans</string>
283        </test>
284        <edit name="family" mode="assign">
285            <string>Liberation Sans</string>
286        </edit>
287        <edit name="rgba" mode="assign">
288            <const>none</const>
289        </edit>
290    </match>
291
292    <!-- We need to enable simulated bold to for DejaVu Serif to ensure that we interpret
293         this property correctly in: platform/gtk/fonts/fontconfig-synthetic-bold.html -->
294    <match target="font">
295        <test qual="any" name="family">
296            <string>DejaVu Serif</string>
297        </test>
298        <test name="weight" compare="less_eq">
299            <const>medium</const>
300        </test>
301        <test target="pattern" name="weight" compare="more">
302            <const>medium</const>
303        </test>
304        <edit name="embolden" mode="assign">
305            <bool>true</bool>
306        </edit>
307        <edit name="weight" mode="assign">
308            <const>bold</const>
309        </edit>
310    </match>
311
312    <!-- We need to enable simulated oblique to for DejaVu Serif to ensure that we interpret
313         this property correctly in: platform/gtk/fonts/fontconfig-synthetic-oblique.html -->
314    <match target="font">
315        <test qual="any" name="family">
316            <string>DejaVu Serif</string>
317        </test>
318        <test name="slant">
319            <const>roman</const>
320        </test>
321        <test target="pattern" name="slant" compare="not_eq">
322            <const>roman</const>
323        </test>
324        <edit name="matrix" mode="assign">
325            <times>
326                <name>matrix</name>
327                <matrix><double>1</double><double>0.2</double>
328                    <double>0</double><double>1</double>
329                </matrix>
330            </times>
331        </edit>
332        <edit name="slant" mode="assign">
333            <const>oblique</const>
334        </edit>
335        <edit name="embeddedbitmap" mode="assign">
336            <bool>false</bool>
337        </edit>
338    </match>
339
340    <config>
341        <!-- These are the default Unicode chars that are expected to be blank
342             in fonts. All other blank chars are assumed to be broken and won't
343             appear in the resulting charsets -->
344        <blank>
345            <int>0x0020</int>    <!-- SPACE -->
346            <int>0x00A0</int>    <!-- NO-BREAK SPACE -->
347            <int>0x00AD</int>    <!-- SOFT HYPHEN -->
348            <int>0x034F</int>    <!-- COMBINING GRAPHEME JOINER -->
349            <int>0x0600</int>    <!-- ARABIC NUMBER SIGN -->
350            <int>0x0601</int>    <!-- ARABIC SIGN SANAH -->
351            <int>0x0602</int>    <!-- ARABIC FOOTNOTE MARKER -->
352            <int>0x0603</int>    <!-- ARABIC SIGN SAFHA -->
353            <int>0x06DD</int>    <!-- ARABIC END OF AYAH -->
354            <int>0x070F</int>    <!-- SYRIAC ABBREVIATION MARK -->
355            <int>0x115F</int>    <!-- HANGUL CHOSEONG FILLER -->
356            <int>0x1160</int>    <!-- HANGUL JUNGSEONG FILLER -->
357            <int>0x1680</int>    <!-- OGHAM SPACE MARK -->
358            <int>0x17B4</int>    <!-- KHMER VOWEL INHERENT AQ -->
359            <int>0x17B5</int>    <!-- KHMER VOWEL INHERENT AA -->
360            <int>0x180E</int>    <!-- MONGOLIAN VOWEL SEPARATOR -->
361            <int>0x2000</int>    <!-- EN QUAD -->
362            <int>0x2001</int>    <!-- EM QUAD -->
363            <int>0x2002</int>    <!-- EN SPACE -->
364            <int>0x2003</int>    <!-- EM SPACE -->
365            <int>0x2004</int>    <!-- THREE-PER-EM SPACE -->
366            <int>0x2005</int>    <!-- FOUR-PER-EM SPACE -->
367            <int>0x2006</int>    <!-- SIX-PER-EM SPACE -->
368            <int>0x2007</int>    <!-- FIGURE SPACE -->
369            <int>0x2008</int>    <!-- PUNCTUATION SPACE -->
370            <int>0x2009</int>    <!-- THIN SPACE -->
371            <int>0x200A</int>    <!-- HAIR SPACE -->
372            <int>0x200B</int>    <!-- ZERO WIDTH SPACE -->
373            <int>0x200C</int>    <!-- ZERO WIDTH NON-JOINER -->
374            <int>0x200D</int>    <!-- ZERO WIDTH JOINER -->
375            <int>0x200E</int>    <!-- LEFT-TO-RIGHT MARK -->
376            <int>0x200F</int>    <!-- RIGHT-TO-LEFT MARK -->
377            <int>0x2028</int>    <!-- LINE SEPARATOR -->
378            <int>0x2029</int>    <!-- PARAGRAPH SEPARATOR -->
379            <int>0x202A</int>    <!-- LEFT-TO-RIGHT EMBEDDING -->
380            <int>0x202B</int>    <!-- RIGHT-TO-LEFT EMBEDDING -->
381            <int>0x202C</int>    <!-- POP DIRECTIONAL FORMATTING -->
382            <int>0x202D</int>    <!-- LEFT-TO-RIGHT OVERRIDE -->
383            <int>0x202E</int>    <!-- RIGHT-TO-LEFT OVERRIDE -->
384            <int>0x202F</int>    <!-- NARROW NO-BREAK SPACE -->
385            <int>0x205F</int>    <!-- MEDIUM MATHEMATICAL SPACE -->
386            <int>0x2060</int>    <!-- WORD JOINER -->
387            <int>0x2061</int>    <!-- FUNCTION APPLICATION -->
388            <int>0x2062</int>    <!-- INVISIBLE TIMES -->
389            <int>0x2063</int>    <!-- INVISIBLE SEPARATOR -->
390            <int>0x206A</int>    <!-- INHIBIT SYMMETRIC SWAPPING -->
391            <int>0x206B</int>    <!-- ACTIVATE SYMMETRIC SWAPPING -->
392            <int>0x206C</int>    <!-- INHIBIT ARABIC FORM SHAPING -->
393            <int>0x206D</int>    <!-- ACTIVATE ARABIC FORM SHAPING -->
394            <int>0x206E</int>    <!-- NATIONAL DIGIT SHAPES -->
395            <int>0x206F</int>    <!-- NOMINAL DIGIT SHAPES -->
396            <int>0x3000</int>    <!-- IDEOGRAPHIC SPACE -->
397            <int>0x3164</int>    <!-- HANGUL FILLER -->
398            <int>0xFEFF</int>    <!-- ZERO WIDTH NO-BREAK SPACE -->
399            <int>0xFFA0</int>    <!-- HALFWIDTH HANGUL FILLER -->
400            <int>0xFFF9</int>    <!-- INTERLINEAR ANNOTATION ANCHOR -->
401            <int>0xFFFA</int>    <!-- INTERLINEAR ANNOTATION SEPARATOR -->
402            <int>0xFFFB</int>    <!-- INTERLINEAR ANNOTATION TERMINATOR -->
403        </blank>
404    </config>
405</fontconfig>
406