Label /var/cache/fontconfig with "System::Shared", transmutable
[platform/upstream/fontconfig.git] / conf.d / 10-scale-bitmap-fonts.conf
1 <?xml version="1.0"?>
2 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3 <fontconfig>
4
5 <match target="font">
6   <test name="scalable" compare="eq">
7     <bool>false</bool>
8   </test>
9   <edit name="pixelsizefixupfactor" mode="assign">
10     <divide>
11       <name target="pattern">pixelsize</name>
12       <name target="font"   >pixelsize</name>
13     </divide>
14   </edit>
15 </match>
16 <match target="font">
17   <test name="scalable" compare="eq">
18     <bool>false</bool>
19   </test>
20   <edit name="scalingnotneeded" mode="assign">
21     <and>
22       <less>
23         <name>pixelsizefixupfactor</name>
24         <double>1.2</double>
25       </less>
26       <more>
27         <name>pixelsizefixupfactor</name>
28         <double>0.8</double>
29       </more>
30     </and>
31   </edit>
32 </match>
33 <!--
34   So far we determined the scale factor.  Now, check and if
35   scaling is NOT desirable, just reset the scale factor to 1.0.
36   -->
37 <match target="font">
38   <test name="scalable" compare="eq">
39     <bool>false</bool>
40   </test>
41   <test name="pixelsize" target="pattern" compare="less">
42     <double>64</double>
43   </test>
44   <test name="hinting" compare="eq">
45     <bool>true</bool>
46   </test>
47   <test name="scalingnotneeded" compare="eq">
48     <bool>true</bool>
49   </test>
50   <edit name="pixelsizefixupfactor" mode="assign">
51     <double>1.0</double>
52   </edit>
53 </match>
54 <!--
55   If we *are* going to scale, go ahead and do it.
56   -->
57 <match target="font">
58   <test name="scalable" compare="eq">
59     <bool>false</bool>
60   </test>
61   <test name="pixelsizefixupfactor" compare="not_eq">
62     <double>1.0</double>
63   </test>
64   <edit name="matrix" mode="assign">
65     <times>
66       <name>matrix</name>
67       <matrix>
68         <name>pixelsizefixupfactor</name> <double>0</double>
69         <double>0</double> <name>pixelsizefixupfactor</name>
70        </matrix>
71     </times>
72   </edit>
73   <edit name="size" mode="assign">
74     <divide>
75       <name>size</name>
76       <name>pixelsizefixupfactor</name>
77     </divide>
78   </edit>
79 </match>
80
81 </fontconfig>