fontconfig: Branch 'master'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 conf.d/10-scale-bitmap-fonts.conf |   32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

New commits:
commit 4a6f5efd5f6a468e1872d58e589bcf30ba88e2fd
Author: Behdad Esfahbod <behdad@xxxxxxxxxx>
Date:   Thu Apr 30 11:25:59 2015 -0400

    Fix bitmap scaling
    
    Was broken by 66db69a6d991945f96feb1da683a2e04ea396842.  Ouch!

diff --git a/conf.d/10-scale-bitmap-fonts.conf b/conf.d/10-scale-bitmap-fonts.conf
index e3bcd46..b4e9cb4 100644
--- a/conf.d/10-scale-bitmap-fonts.conf
+++ b/conf.d/10-scale-bitmap-fonts.conf
@@ -2,8 +2,13 @@
 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
 <fontconfig>
 
+<!--
+  If font is bitmap, calculate scale factor.
+  Note that color bitmap fonts have scalable=true, while
+  non-color ones have scalable=false.  Both groups have outline=false.
+  -->
 <match target="font">
-  <test name="scalable" compare="eq">
+  <test name="outline" compare="eq">
     <bool>false</bool>
   </test>
   <edit name="pixelsizefixupfactor" mode="assign">
@@ -13,10 +18,20 @@
     </divide>
   </edit>
 </match>
+<!--
+  For non-scalable bitmap fonts (ie. non-color), skip
+  minor scaling if hinting is enabled.
+  -->
 <match target="font">
+  <test name="outline" compare="eq">
+    <bool>false</bool>
+  </test>
   <test name="scalable" compare="eq">
     <bool>false</bool>
   </test>
+  <test name="hinting" compare="eq">
+    <bool>true</bool>
+  </test>
   <edit name="scalingnotneeded" mode="assign">
     <and>
       <less>
@@ -30,20 +45,7 @@
     </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>
@@ -55,7 +57,7 @@
   If we *are* going to scale, go ahead and do it.
   -->
 <match target="font">
-  <test name="scalable" compare="eq">
+  <test name="outline" compare="eq">
     <bool>false</bool>
   </test>
   <test name="pixelsizefixupfactor" compare="not_eq">
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig





[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux