summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2013-01-07 17:59:17 -0600
committerBehdad Esfahbod <behdad@behdad.org>2013-01-07 17:59:17 -0600
commit1c4c4978adb0fa59767ac7d8c7f98a86928b2fdc (patch)
tree5aeecc7d304aa04015254a98a65f727592071cc2
parentdc11dd581f228623f0f14b3a6a1e4beaa659266b (diff)
Oops, add the actual file
-rw-r--r--conf.d/10-scale-bitmap-fonts.conf81
1 files changed, 81 insertions, 0 deletions
diff --git a/conf.d/10-scale-bitmap-fonts.conf b/conf.d/10-scale-bitmap-fonts.conf
new file mode 100644
index 0000000..e3bcd46
--- /dev/null
+++ b/conf.d/10-scale-bitmap-fonts.conf
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+
+<match target="font">
+ <test name="scalable" compare="eq">
+ <bool>false</bool>
+ </test>
+ <edit name="pixelsizefixupfactor" mode="assign">
+ <divide>
+ <name target="pattern">pixelsize</name>
+ <name target="font" >pixelsize</name>
+ </divide>
+ </edit>
+</match>
+<match target="font">
+ <test name="scalable" compare="eq">
+ <bool>false</bool>
+ </test>
+ <edit name="scalingnotneeded" mode="assign">
+ <and>
+ <less>
+ <name>pixelsizefixupfactor</name>
+ <double>1.2</double>
+ </less>
+ <more>
+ <name>pixelsizefixupfactor</name>
+ <double>0.8</double>
+ </more>
+ </and>
+ </edit>
+</match>
+<!--
+ So far we determined the scale factor. Now, check and if
+ scaling is NOT desirable, just reset the scale factor to 1.0.
+ -->
+<match target="font">
+ <test name="scalable" compare="eq">
+ <bool>false</bool>
+ </test>
+ <test name="pixelsize" target="pattern" compare="less">
+ <double>64</double>
+ </test>
+ <test name="hinting" compare="eq">
+ <bool>true</bool>
+ </test>
+ <test name="scalingnotneeded" compare="eq">
+ <bool>true</bool>
+ </test>
+ <edit name="pixelsizefixupfactor" mode="assign">
+ <double>1.0</double>
+ </edit>
+</match>
+<!--
+ If we *are* going to scale, go ahead and do it.
+ -->
+<match target="font">
+ <test name="scalable" compare="eq">
+ <bool>false</bool>
+ </test>
+ <test name="pixelsizefixupfactor" compare="not_eq">
+ <double>1.0</double>
+ </test>
+ <edit name="matrix" mode="assign">
+ <times>
+ <name>matrix</name>
+ <matrix>
+ <name>pixelsizefixupfactor</name> <double>0</double>
+ <double>0</double> <name>pixelsizefixupfactor</name>
+ </matrix>
+ </times>
+ </edit>
+ <edit name="size" mode="assign">
+ <divide>
+ <name>size</name>
+ <name>pixelsizefixupfactor</name>
+ </divide>
+ </edit>
+</match>
+
+</fontconfig>