2 <!DOCTYPE fontconfig SYSTEM
"fonts.dtd">
4 <!-- configure CJK font access -->
8 Enable sub-pixel rendering.
9 If you are using CRT, set rgb -> none
11 <match target=
"font" >
12 <edit name=
"rgba" mode=
"assign" >
18 default : smoothed and hinted
20 <match target=
"font" >
21 <edit name=
"rgba" mode=
"assign"><const>rgb
</const></edit>
22 <edit name=
"antialias" mode=
"assign" ><bool>true
</bool></edit>
23 <edit name=
"autohint" mode=
"assign" ><bool>true
</bool></edit>
24 <edit name=
"hinting" mode=
"assign" ><bool>false
</bool></edit>
25 <edit name=
"hintstyle" mode=
"assign" ><const>hintslight
</const></edit>
26 <!-- <edit name="embeddedbitmap" ><bool>false</bool></edit> -->
30 For point size less equal than 6 : only smoothed
32 <match target=
"font" >
33 <test name=
"size" compare=
"less_eq" ><double>6</double></test>
34 <edit name=
"antialias" mode=
"assign" ><bool>true
</bool></edit>
35 <edit name=
"autohint" mode=
"assign" ><bool>false
</bool></edit>
36 <edit name=
"hinting" mode=
"assign" ><bool>false
</bool></edit>
40 Don't use embedded bitmap glyph to simulate italic style,
41 tell xft to use vector data to simulate it
44 <test target=
"pattern" name=
"slant"><const>roman
</const></test>
45 <test target=
"font" name=
"slant" compare=
"not_eq"><const>roman
</const></test>
46 <edit name=
"embeddedbitmap" mode=
"assign" ><bool>false
</bool></edit>
50 Synthetic emboldening for Chinese fonts that do not have bold face available
52 <match target=
"font" >
53 <test name=
"family" compare=
"contains" >
59 <test target=
"pattern" name=
"weight" compare=
"more_eq">
62 <edit name=
"embolden" mode=
"assign" >
68 The dual-width Asian fonts (spacing=dual) are not rendered correctly,
69 apparently FreeType forces all widths to match. Trying to disable the
70 width forcing code by setting globaladvance=false alone doesn't help.
71 As a brute force workaround, also set spacing=proportional, i.e. handle
72 them as proportional fonts: CJK 双宽度纠正
74 <match target=
"font" >
75 <test target=
"pattern" name=
"lang" compare=
"contains" >
80 <test name=
"spacing" compare=
"eq"><const>dual
</const></test>
81 <edit name=
"spacing" mode=
"assign" ><const>proportional
</const></edit>
82 <edit name=
"globaladvance" mode=
"assign" ><bool>false
</bool></edit>
86 There is a similar problem with dual width bitmap fonts. They don't
87 have spacing=dual, therefore they are not handled by the above rule
88 and still display as charcell fonts. For example "Efont Biwidth"
89 has spacing=mono and "Misc Fixed Wide" has spacing=charcell.
90 Force handling of these fonts as proportional fonts as well:
93 <test name=
"lang" compare=
"contains">
98 <test name=
"outline" compare=
"eq"><bool>false
</bool></test>
99 <test name=
"spacing" compare=
"eq">
101 <const>charcell
</const>
103 <edit name=
"spacing"><const>proportional
</const></edit>
104 <edit name=
"globaladvance" binding=
"strong"><bool>false
</bool></edit>
107 Synthetic emboldening for Chinese fonts that do not have bold face available
110 <match target=
"font" >
111 <!-- check to see if the font is just regular -->
112 <test name=
"weight" compare=
"less_eq"><const>medium
</const></test>
113 <!-- check to see if the pattern requests bold -->
114 <test target=
"pattern" name=
"weight" compare=
"more"><const>medium
</const></test>
116 set the embolden flag
117 needed for applications using cairo, e.g. gucharmap, gedit, ...
119 <edit name=
"embolden" mode=
"assign" ><bool>true
</bool></edit>
122 needed for applications using Xft directly, e.g. Firefox, ...
124 <edit name=
"weight" mode=
"assign"><const>bold
</const></edit>