]> git.wh0rd.org - fontconfig.git/blame - conf.d/10-fonts-persian.conf
Use embeddedbitmap rather than rh_prefer_bitmap.
[fontconfig.git] / conf.d / 10-fonts-persian.conf
CommitLineData
2c6fead7
PL
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<!--
41 We don't want weak bindings. So got to use the syntactical expansion
42 of alias tag to do binding=same :(. Please support that in alias.
43 -->
44
45
46<!-- Deprecated fonts are discouraged -->
47
48 <!-- Nesf[2] is officially deprecated and has problematic tables -->
49 <match>
50 <test name="family">
51 <string>Nesf</string>
52 </test>
53 <edit name="family" mode="assign" binding="same">
54 <string>Nesf2</string>
55 </edit>
56 </match>
57 <match>
58 <test name="family">
59 <string>Nesf2</string>
60 </test>
61 <edit name="family" mode="assign" binding="same">
62 <string>Persian_sansserif_default</string>
63 </edit>
64 </match>
65
66 <!-- Tahoma looks awful (TURNED-OFF) -->
67 <!--match>
68 <test name="family">
69 <string>Tahoma</string>
70 </test>
71 <edit name="family" mode="prepend" binding="same">
72 <string>Persian_sansserif_default</string>
73 </edit>
74 </match-->
75
76<!-- Name changes and spelling variant aliases -->
77
78 <!-- Changed due to trademark problems -->
79 <match>
80 <test name="family">
81 <string>Nazanin</string>
82 </test>
83 <edit name="family" mode="assign" binding="same">
84 <string>Nazli</string>
85 </edit>
86 </match>
87 <match>
88 <test name="family">
89 <string>Lotus</string>
90 </test>
91 <edit name="family" mode="assign" binding="same">
92 <string>Lotoos</string>
93 </edit>
94 </match>
95
96 <!-- Changed due to transcription orthography -->
97 <match>
98 <test name="family">
99 <string>Yaqut</string>
100 </test>
101 <edit name="family" mode="assign" binding="same">
102 <string>Yaghoot</string>
103 </edit>
104 </match>
105 <match>
106 <test name="family">
107 <string>Yagut</string>
108 </test>
109 <edit name="family" mode="assign" binding="same">
110 <string>Yaghoot</string>
111 </edit>
112 </match>
113 <match>
114 <test name="family">
115 <string>Yaghut</string>
116 </test>
117 <edit name="family" mode="assign" binding="same">
118 <string>Yaghoot</string>
119 </edit>
120 </match>
121 <match>
122 <test name="family">
123 <string>Traffic</string>
124 </test>
125 <edit name="family" mode="assign" binding="same">
126 <string>Terafik</string>
127 </edit>
128 </match>
129 <match>
130 <test name="family">
131 <string>Ferdowsi</string>
132 </test>
133 <edit name="family" mode="assign" binding="same">
134 <string>Ferdosi</string>
135 </edit>
136 </match>
137 <match>
138 <test name="family">
139 <string>Fantezy</string>
140 </test>
141 <edit name="family" mode="assign" binding="same">
142 <string>Fantezi</string>
143 </edit>
144 </match>
145
146
147<!-- Classify fonts. -->
148
149 <!-- Persian_title class -->
150 <match>
151 <test name="family">
152 <string>Jadid</string>
153 </test>
154 <edit name="family" mode="append" binding="same">
155 <string>Persian_title</string>
156 </edit>
157 </match>
158 <match>
159 <test name="family">
160 <string>Titr</string>
161 </test>
162 <edit name="family" mode="append" binding="same">
163 <string>Persian_title</string>
164 </edit>
165 </match>
166
167 <!-- Persian_fantasy class -->
168 <match>
169 <test name="family">
170 <string>Kamran</string>
171 </test>
172 <edit name="family" mode="append" binding="same">
173 <string>Homa</string>
174 </edit>
175 <edit name="family" mode="append" binding="same">
176 <string>Persian_fantasy</string>
177 </edit>
178 </match>
179 <match>
180 <test name="family">
181 <string>Homa</string>
182 </test>
183 <edit name="family" mode="append" binding="same">
184 <string>Kamran</string>
185 </edit>
186 <edit name="family" mode="append" binding="same">
187 <string>Persian_fantasy</string>
188 </edit>
189 </match>
190 <match>
191 <test name="family">
192 <string>Fantezi</string>
193 </test>
194 <edit name="family" mode="append" binding="same">
195 <string>Persian_fantasy</string>
196 </edit>
197 </match>
198 <match>
199 <test name="family">
200 <string>Tabassom</string>
201 </test>
202 <edit name="family" mode="append" binding="same">
203 <string>Persian_fantasy</string>
204 </edit>
205 </match>
206
207 <!-- Persian_square class -->
208 <match>
209 <test name="family">
210 <string>Arshia</string>
211 </test>
212 <edit name="family" mode="append" binding="same">
213 <string>Persian_square</string>
214 </edit>
215 </match>
216 <match>
217 <test name="family">
218 <string>Nasim</string>
219 </test>
220 <edit name="family" mode="append" binding="same">
221 <string>Persian_square</string>
222 </edit>
223 </match>
224 <match>
225 <test name="family">
226 <string>Elham</string>
227 </test>
228 <edit name="family" mode="append" binding="same">
229 <string>Farnaz</string>
230 </edit>
231 <edit name="family" mode="append" binding="same">
232 <string>Persian_square</string>
233 </edit>
234 </match>
235 <match>
236 <test name="family">
237 <string>Farnaz</string>
238 </test>
239 <edit name="family" mode="append" binding="same">
240 <string>Elham</string>
241 </edit>
242 <edit name="family" mode="append" binding="same">
243 <string>Persian_square</string>
244 </edit>
245 </match>
246 <match>
247 <test name="family">
248 <string>Sina</string>
249 </test>
250 <edit name="family" mode="append" binding="same">
251 <string>Persian_square</string>
252 </edit>
253 </match>
254
255<!-- Font ordering per class -->
256
257 <!-- Persian_title class -->
258 <match>
259 <test name="family">
260 <string>Persian_title</string>
261 </test>
262 <edit name="family" mode="append" binding="same">
263 <string>Persian_serif</string>
264 </edit>
265 <edit name="family" mode="append" binding="same">
266 <string>Jadid</string>
267 </edit>
268 <edit name="family" mode="append" binding="same">
269 <string>Titr</string>
270 </edit>
271 </match>
272
273 <!-- Persian_fantasy class -->
274 <match>
275 <test name="family">
276 <string>Persian_fantasy</string>
277 </test>
278 <edit name="family" mode="append" binding="same">
279 <string>Persian_square</string>
280 </edit>
281 <edit name="family" mode="append" binding="same">
282 <string>Tabassom</string>
283 </edit>
284 <edit name="family" mode="append" binding="same">
285 <string>Fantezi</string>
286 </edit>
287 <edit name="family" mode="append" binding="same">
288 <string>Kamran</string>
289 </edit>
290 <edit name="family" mode="append" binding="same">
291 <string>Homa</string>
292 </edit>
293 </match>
294
295 <!-- Persian_square class -->
296 <match>
297 <test name="family">
298 <string>Persian_square</string>
299 </test>
300 <edit name="family" mode="append" binding="same">
301 <string>Persian_serif</string>
302 </edit>
303 <edit name="family" mode="append" binding="same">
304 <string>Sina</string>
305 </edit>
306 <edit name="family" mode="append" binding="same">
307 <string>Nasim</string>
308 </edit>
309 <edit name="family" mode="append" binding="same">
310 <string>Farnaz</string>
311 </edit>
312 <edit name="family" mode="append" binding="same">
313 <string>Elham</string>
314 </edit>
315 <edit name="family" mode="append" binding="same">
316 <string>Arshia</string>
317 </edit>
318 </match>
319
320<!-- Register the fonts that we actually do have -->
321
322 <match target="font">
323 <test name="family">
324 <string>Elham</string>
325 </test>
326 <edit name="foundry">
327 <string>farsiweb</string>
328 </edit>
329 </match>
330
331 <match target="font">
332 <test name="family">
333 <string>Homa</string>
334 </test>
335 <edit name="foundry">
336 <string>farsiweb</string>
337 </edit>
338 <edit name="embolden">
339 <bool>true</bool>
340 </edit>
341 </match>
342
343 <match target="font">
344 <test name="family">
345 <string>Koodak</string>
346 </test>
347 <edit name="foundry">
348 <string>farsiweb</string>
349 </edit>
350 <edit name="embolden">
351 <bool>true</bool>
352 </edit>
353 </match>
354
355 <match target="font">
356 <test name="family">
357 <string>Nazli</string>
358 </test>
359 <edit name="foundry">
360 <string>farsiweb</string>
361 </edit>
362 </match>
363
364 <match target="font">
365 <test name="family">
366 <string>Roya</string>
367 </test>
368 <edit name="foundry">
369 <string>farsiweb</string>
370 </edit>
371 </match>
372
373 <match target="font">
374 <test name="family">
375 <string>Terafik</string>
376 </test>
377 <edit name="foundry">
378 <string>farsiweb</string>
379 </edit>
380 </match>
381
382 <match target="font">
383 <test name="family">
384 <string>Titr</string>
385 </test>
386 <edit name="foundry">
387 <string>farsiweb</string>
388 </edit>
389 </match>
390
391
392<!-- Our fonts should oblique to the other side (TURNED-OFF) -->
393
394 <match target="font">
395 <test name="foundry">
396 <!--string>farsiweb</string-->
397 <string>TURNED-OFF</string>
398 </test>
399 <test name="foundry">
400 <string>farsiweb</string>
401 </test>
402 <!-- check to see if the font is roman -->
403 <test name="slant">
404 <const>roman</const>
405 </test>
406 <!-- check to see if the pattern requested non-roman -->
407 <test target="pattern" name="slant" compare="not_eq">
408 <const>roman</const>
409 </test>
410 <!-- multiply the matrix to slant the font -->
411 <edit name="matrix" mode="assign">
412 <times>
413 <name>matrix</name>
414 <matrix><double>1</double><double>-0.2</double>
415 <double>0</double><double>1</double>
416 </matrix>
417 </times>
418 </edit>
419 <!-- pretend the font is oblique now -->
420 <edit name="slant" mode="assign">
421 <const>oblique</const>
422 </edit>
423 </match>
424
425
426<!--
427 We can't hint our fonts well, so turn off hinting.
428 Moreover, the bitmaps we have designed (well, they
429 have designed), suck, so disable them too.
430 -->
431
432 <match target="font">
433 <test name="foundry">
434 <string>farsiweb</string>
435 </test>
436 <edit name="autohint">
437 <bool>false</bool>
438 </edit>
439 <edit name="hinting">
440 <bool>false</bool>
441 </edit>
9fb0e074 442 <edit name="embeddedbitmap">
2c6fead7
PL
443 <bool>false</bool>
444 </edit>
445 </match>
446
447
448<!-- Alias our fonts to common families -->
449
450 <!-- Persian serif fonts -->
451 <alias>
452 <family>serif</family>
453 <accept>
454 <family>Nazli</family>
455 <family>Lotoos</family>
456 <family>Mitra</family>
457 <family>Ferdosi</family>
458 <family>Badr</family>
459 <family>Zar</family>
460 </accept>
461 </alias>
462
463 <!-- Persian sans-serif fonts -->
464 <alias>
465 <family>sans-serif</family>
466 <accept>
467 <family>Roya</family>
468 <family>Koodak</family>
469 <family>Terafik</family>
470 </accept>
471 </alias>
472
473 <!-- Persian monospace fonts -->
474 <alias>
475 <family>monospace</family>
476 <accept>
477 <!-- Not really monospace -->
478 <family>Terafik</family>
479 </accept>
480 </alias>
481
482
483<!-- Use Titr in titles -->
484
485 <!-- Both serif... -->
486 <match>
487 <test name="family">
488 <string>serif</string>
489 </test>
490 <test name="weight" compare="more_eq">
491 <int>200</int>
492 </test>
493 <test name="size" compare="more_eq">
494 <double>24</double>
495 </test>
496 <edit name="family" mode="prepend">
497 <string>Titr</string>
498 </edit>
499 </match>
500
501 <!-- and sans-serif. -->
502 <match>
503 <test name="family">
504 <string>sans-serif</string>
505 </test>
506 <test name="weight" compare="more_eq">
507 <int>200</int>
508 </test>
509 <test name="size" compare="more_eq">
510 <double>24</double>
511 </test>
512 <edit name="family" mode="prepend">
513 <string>Titr</string>
514 </edit>
515 </match>
516
517 <!-- and more. -->
518 <match>
519 <test name="family">
520 <string>Persian_sansserif_default</string>
521 </test>
522 <test name="weight" compare="more_eq">
523 <int>200</int>
524 </test>
525 <test name="size" compare="more_eq">
526 <double>24</double>
527 </test>
528 <edit name="family" mode="prepend" binding="same">
529 <string>Titr</string>
530 </edit>
531 </match>
532
533
534<!-- Default substituted for deprecated sans-serif fonts -->
535
536 <match>
537 <test name="family">
538 <string>Persian_sansserif_default</string>
539 </test>
540 <edit name="family" mode="assign" binding="same">
541 <string>Roya</string>
542 </edit>
543 </match>
544
545</fontconfig>