Disable anti-aliasing for small fonts.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 27 Jun 2012 01:09:20 +0300
changeset 462 e447159023b7
parent 461 39b14a1ba5c2
child 463 bcb0e7c32737
Disable anti-aliasing for small fonts. My all displays are LCD and with RGB pattern. Enable hinting for all fonts!
.fonts.conf
--- a/.fonts.conf	Wed Jun 27 00:45:16 2012 +0300
+++ b/.fonts.conf	Wed Jun 27 01:09:20 2012 +0300
@@ -7,9 +7,43 @@
   <!-- Private font directory -->
   <dir>~/.fonts</dir>
 
-  <!-- Disable anti-aliasing at all. -->
-  <match target="font">
-    <edit name="antialias" mode="assign"><bool>false</bool></edit>
+  <!-- My all displays are LCD and with RGB pattern.  -->
+  <match target="pattern">
+    <test qual="all" name="rgba">
+      <const>unknown</const>
+    </test>
+    <edit mode="assign" name="rgba">
+      <const>rgb</const>
+    </edit>
+  </match>
+
+  <!-- Disable anti-aliasing for small fonts. -->
+  <match target="pattern">
+    <test name="size" compare="less">
+      <double>14</double>
+    </test>
+    <edit name="antialias" mode="assign">
+      <bool>false</bool>
+    </edit>
+  </match>
+  <match target="pattern">
+    <test name="pixelsize" compare="less">
+      <double>14</double>
+    </test>
+    <edit name="antialias" mode="assign">
+      <bool>false</bool>
+    </edit>
+  </match>
+
+  <!-- Enable hinting for all fonts! -->
+  <match target="pattern">
+    <edit mode="assign" name="hinting">
+      <bool>true</bool>
+    </edit>
+    <edit mode="assign" name="hintstyle">
+      <const>hintslight</const>
+    </edit>
   </match>
 
 </fontconfig>
+