]> git.wh0rd.org - fontconfig.git/blob - conf.d/65-fonts-persian.conf
Port fonts-persian.conf to new alias syntax with binding="same"
[fontconfig.git] / conf.d / 65-fonts-persian.conf
1 <?xml version="1.0"?>
2 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3 <!-- /etc/fonts/conf.d/10-fonts-persian.conf -->
4 <!--
5 fonts-persian.conf
6 To configure Persian fonts from The FarsiWeb Project.
7
8 Copyright (C) 2005 Sharif FarsiWeb, Inc. <license@farsiweb.info>
9
10 Permission to use, copy, modify, distribute, and sell this software and its
11 documentation for any purpose is hereby granted without fee, provided that
12 the above copyright notice appear in all copies and that both that
13 copyright notice and this permission notice appear in supporting
14 documentation, and that the name of Sharif FarsiWeb, Inc. not be used in
15 advertising or publicity pertaining to distribution of the software without
16 specific, written prior permission. Sharif FarsiWeb, Inc. makes no
17 representations about the suitability of this software for any purpose. It
18 is provided "as is" without express or implied warranty.
19
20 SHARIF FARSIWEB, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
21 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
22 EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
23 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
24 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
25 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
26 PERFORMANCE OF THIS SOFTWARE.
27
28 ChangeLog:
29 2005-04-03 Behdad Esfahbod: Initial revision.
30 2005-10-09 Behdad Esfahbod: Turned off back-slant and Tahoma sections.
31 2005-11-30 Behdad Esfahbod: Set Titr susbtitution size to 24 points.
32
33 Todo:
34 Add generic font "fantasy". Add some fonts into that category.
35 Maybe add a "cursive" generic font.
36 -->
37 <fontconfig>
38
39
40 <!-- Deprecated fonts are discouraged -->
41
42 <!-- Nesf[2] is officially deprecated and has problematic tables -->
43 <alias binding="same">
44 <family>Nesf</family>
45 <accept><family>Nesf2</family></accept>
46 </alias>
47 <alias binding="same">
48 <family>Nesf2</family>
49 <accept><family>Persian_sansserif_default</family></accept>
50 </alias>
51
52 <!-- Name changes and spelling variant aliases -->
53
54 <alias binding="same">
55 <family>Nazanin</family>
56 <accept><family>Nazli</family></accept>
57 </alias>
58 <alias binding="same">
59 <family>Lotus</family>
60 <accept><family>Lotoos</family></accept>
61 </alias>
62 <alias binding="same">
63 <family>Yaqut</family>
64 <accept><family>Yaghoot</family></accept>
65 </alias>
66 <alias binding="same">
67 <family>Yaghut</family>
68 <accept><family>Yaghoot</family></accept>
69 </alias>
70 <alias binding="same">
71 <family>Traffic</family>
72 <accept><family>Terafik</family></accept>
73 </alias>
74 <alias binding="same">
75 <family>Ferdowsi</family>
76 <accept><family>Ferdosi</family></accept>
77 </alias>
78 <alias binding="same">
79 <family>Fantezy</family>
80 <accept><family>Fantezi</family></accept>
81 </alias>
82
83
84 <!-- Classify fonts. -->
85
86 <!-- Persian_title class -->
87 <alias binding="same">
88 <family>Jadid</family>
89 <accept><family>Persian_title</family></accept>
90 </alias>
91 <alias binding="same">
92 <family>Titr</family>
93 <accept><family>Persian_title</family></accept>
94 </alias>
95
96 <!-- Persian_fantasy class -->
97 <alias binding="same">
98 <family>Kamran</family>
99 <accept>
100 <family>Persian_fantasy</family>
101 <family>Homa</family>
102 </accept>
103 </alias>
104 <alias binding="same">
105 <family>Homa</family>
106 <accept>
107 <family>Persian_fantasy</family>
108 <family>Kamran</family>
109 </accept>
110 </alias>
111 <alias binding="same">
112 <family>Fantezi</family>
113 <accept><family>Persian_fantasy</family></accept>
114 </alias>
115 <alias binding="same">
116 <family>Tabassom</family>
117 <accept><family>Persian_fantasy</family></accept>
118 </alias>
119
120 <!-- Persian_square class -->
121 <alias binding="same">
122 <family>Arshia</family>
123 <accept><family>Persian_square</family></accept>
124 </alias>
125 <alias binding="same">
126 <family>Nasim</family>
127 <accept><family>Persian_square</family></accept>
128 </alias>
129 <alias binding="same">
130 <family>Elham</family>
131 <accept>
132 <family>Persian_square</family>
133 <family>Farnaz</family>
134 </accept>
135 </alias>
136 <alias binding="same">
137 <family>Farnaz</family>
138 <accept>
139 <family>Persian_square</family>
140 <family>Elham</family>
141 </accept>
142 </alias>
143 <alias binding="same">
144 <family>Sina</family>
145 <accept><family>Persian_square</family></accept>
146 </alias>
147
148 <!-- Font ordering per class -->
149
150 <!-- Persian_title class -->
151 <alias binding="same">
152 <family>Persian_title</family>
153 <accept>
154 <family>Titr</family>
155 <family>Jadid</family>
156 <family>Persian_serif</family>
157 </accept>
158 </alias>
159
160 <!-- Persian_fantasy class -->
161 <alias binding="same">
162 <family>Persian_fantasy</family>
163 <accept>
164 <family>Homa</family>
165 <family>Kamran</family>
166 <family>Fantezi</family>
167 <family>Tabassom</family>
168 <family>Persian_square</family>
169 </accept>
170 </alias>
171
172 <!-- Persian_square class -->
173 <alias binding="same">
174 <family>Persian_square</family>
175 <accept>
176 <family>Arshia</family>
177 <family>Elham</family>
178 <family>Farnaz</family>
179 <family>Nasim</family>
180 <family>Sina</family>
181 <family>Persian_serif</family>
182 </accept>
183 </alias>
184
185 <!-- Register the fonts that we actually do have -->
186
187 <match target="font">
188 <test name="family">
189 <string>Elham</string>
190 </test>
191 <edit name="foundry">
192 <string>farsiweb</string>
193 </edit>
194 </match>
195
196 <match target="font">
197 <test name="family">
198 <string>Homa</string>
199 </test>
200 <edit name="foundry">
201 <string>farsiweb</string>
202 </edit>
203 </match>
204
205 <match target="font">
206 <test name="family">
207 <string>Koodak</string>
208 </test>
209 <edit name="foundry">
210 <string>farsiweb</string>
211 </edit>
212 </match>
213
214 <match target="font">
215 <test name="family">
216 <string>Nazli</string>
217 </test>
218 <edit name="foundry">
219 <string>farsiweb</string>
220 </edit>
221 </match>
222
223 <match target="font">
224 <test name="family">
225 <string>Roya</string>
226 </test>
227 <edit name="foundry">
228 <string>farsiweb</string>
229 </edit>
230 </match>
231
232 <match target="font">
233 <test name="family">
234 <string>Terafik</string>
235 </test>
236 <edit name="foundry">
237 <string>farsiweb</string>
238 </edit>
239 </match>
240
241 <match target="font">
242 <test name="family">
243 <string>Titr</string>
244 </test>
245 <edit name="foundry">
246 <string>farsiweb</string>
247 </edit>
248 </match>
249
250
251 <!-- Our fonts should oblique to the other side (TURNED-OFF) -->
252
253 <match target="font">
254 <test name="foundry">
255 <!--string>farsiweb</string-->
256 <string>TURNED-OFF</string>
257 </test>
258 <test name="foundry">
259 <string>farsiweb</string>
260 </test>
261 <!-- check to see if the font is roman -->
262 <test name="slant">
263 <const>roman</const>
264 </test>
265 <!-- check to see if the pattern requested non-roman -->
266 <test target="pattern" name="slant" compare="not_eq">
267 <const>roman</const>
268 </test>
269 <!-- multiply the matrix to slant the font -->
270 <edit name="matrix" mode="assign">
271 <times>
272 <name>matrix</name>
273 <matrix><double>1</double><double>-0.2</double>
274 <double>0</double><double>1</double>
275 </matrix>
276 </times>
277 </edit>
278 <!-- pretend the font is oblique now -->
279 <edit name="slant" mode="assign">
280 <const>oblique</const>
281 </edit>
282 </match>
283
284
285 <!--
286 We can't hint our fonts well, so turn off hinting.
287 Moreover, the bitmaps we have designed (well, they
288 have designed), suck, so disable them too.
289 -->
290
291 <match target="font">
292 <test name="foundry">
293 <string>farsiweb</string>
294 </test>
295 <edit name="autohint">
296 <bool>false</bool>
297 </edit>
298 <edit name="hinting">
299 <bool>false</bool>
300 </edit>
301 <edit name="embeddedbitmap">
302 <bool>false</bool>
303 </edit>
304 </match>
305
306
307 <!-- Alias our fonts to common families -->
308
309 <!-- Persian serif fonts -->
310 <alias>
311 <family>serif</family>
312 <accept>
313 <family>Nazli</family>
314 <family>Lotoos</family>
315 <family>Mitra</family>
316 <family>Ferdosi</family>
317 <family>Badr</family>
318 <family>Zar</family>
319 </accept>
320 </alias>
321
322 <!-- Persian sans-serif fonts -->
323 <alias>
324 <family>sans-serif</family>
325 <accept>
326 <family>Roya</family>
327 <family>Koodak</family>
328 <family>Terafik</family>
329 </accept>
330 </alias>
331
332 <!-- Persian monospace fonts -->
333 <alias>
334 <family>monospace</family>
335 <accept>
336 <!-- Not really monospace -->
337 <family>Terafik</family>
338 </accept>
339 </alias>
340
341
342 <!-- Use Titr in titles -->
343
344 <!-- Both serif... -->
345 <match>
346 <test name="family">
347 <string>serif</string>
348 </test>
349 <test name="weight" compare="more_eq">
350 <int>200</int>
351 </test>
352 <test name="size" compare="more_eq">
353 <double>24</double>
354 </test>
355 <edit name="family" mode="prepend">
356 <string>Titr</string>
357 </edit>
358 </match>
359
360 <!-- and sans-serif. -->
361 <match>
362 <test name="family">
363 <string>sans-serif</string>
364 </test>
365 <test name="weight" compare="more_eq">
366 <int>200</int>
367 </test>
368 <test name="size" compare="more_eq">
369 <double>24</double>
370 </test>
371 <edit name="family" mode="prepend">
372 <string>Titr</string>
373 </edit>
374 </match>
375
376 <!-- and more. -->
377 <match>
378 <test name="family">
379 <string>Persian_sansserif_default</string>
380 </test>
381 <test name="weight" compare="more_eq">
382 <int>200</int>
383 </test>
384 <test name="size" compare="more_eq">
385 <double>24</double>
386 </test>
387 <edit name="family" mode="prepend" binding="same">
388 <string>Titr</string>
389 </edit>
390 </match>
391
392
393 <!-- Default substituted for deprecated sans-serif fonts -->
394
395 <match>
396 <test name="family">
397 <string>Persian_sansserif_default</string>
398 </test>
399 <edit name="family" mode="assign" binding="same">
400 <string>Roya</string>
401 </edit>
402 </match>
403
404 </fontconfig>