Bug 92585

Summary: Ignores /etc/fonts/local.conf fontconfig data
Product: [Applications] konqueror Reporter: jgoerzen
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description jgoerzen 2004-11-02 16:12:15 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Debian testing/unstable Packages
OS:                Linux

I noticed that KDE systems without msttcorefonts installed made some sites look ugly -- use non-antialiased fonts, despite my choice of Bitstream Vera antialiased fonts as the standard.  Examples of these sites include cnn.com and theregister.co.uk.

After some consideration, I set up an /etc/fonts/local.conf file to replace Arial, Helvetica, Verdana, and sans-serif faces with the Bitstream Vera Sans face.  This works *perfectly* in Firefox.  But Konqeuror appears to completely ignore this file.  I'm perplexed by that, especially since /usr/bin/konqueror is linked against libfontconfig.so.1.

Here's my /etc/fonts/local.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <include ignore_missing="yes">/var/lib/defoma/fontconfig.d/fonts.conf</include>
  <dir>/usr/X11R6/lib/X11/fonts</dir>
  <match target="font">
    <test qual="all" name="rgba">
      <const>unknown</const>
    </test>
    <edit name="rgba" mode="assign"><const>rgb</const></edit>
  </match>
  <match target="font">
    <edit name="autohint" mode="assign">
      <bool>true</bool>
    </edit>
  </match>

 <match target="pattern">
   <test name="family">
     <string>Arial</string>
   </test>
   <edit name="family" mode="prepend" binding="same">
      <string>Bitstream Vera Sans</string>
   </edit>
 </match>

 <match target="pattern">
   <test name="family">
     <string>Times New Roman</string>
   </test>
   <edit name="family" mode="prepend" binding="same">
      <string>Bitstream Vera Serif</string>
   </edit>
 </match>

 <match target="pattern">
   <test name="family">
     <string>Courier New</string>
   </test>
   <edit name="family" mode="prepend" binding="same">
      <string>Bitstream Vera Sans Mono</string>
   </edit>
 </match>
 <match target="pattern">
   <test name="family">
     <string>Verdana</string>
   </test>
   <edit name="family" mode="prepend" binding="same">
      <string>Bitstream Vera Sans</string>
   </edit>
 </match>
 <match target="pattern">
   <test name="family">
     <string>Helvetica</string>
   </test>
   <edit name="family" mode="prepend" binding="same">
      <string>Bitstream Vera Sans</string>
   </edit>
 </match>
 <match target="pattern">
   <test name="family">
     <string>sans-serif</string>
   </test>
   <edit name="family" mode="prepend" binding="same">
      <string>Bitstream Vera Sans</string>
   </edit>
 </match>



</fontconfig>
Comment 1 Stephan Kulow 2004-11-02 22:28:24 UTC
KDE uses Qt and Qt uses fontconfig and libXft. Please note that web sites often request Helvetica and get the non antialiased Helvetica. Qt doesn't know about aliases when you look for Verdana without having it installed. So it will find the first really existant font and _then_ use aliases. 
'
Comment 2 jgoerzen 2004-11-02 22:41:20 UTC
Are you saying I should report a bug against Qt then?  According to my understanding of fontconfig, given my configuration, they should still use Bistream Vera Sans instead of Helvetica.  Mozilla Firefox does the right thing there.

Thanks,
John