Announcement

Collapse
No announcement yet.

.fonts.conf font order, substitution, fallback setup in Karmic

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    .fonts.conf font order, substitution, fallback setup in Karmic

    Has anyone managed to get their .fonts.conf configuration working properly Karmic? It seems X isn't interpreting the file in the same way as before.

    See an example at the bottom of the original post at http://kubuntuforums.net/forums/index.php?topic=3099856. Normal options like embeddedbitmap and various hinting settings still work, but (edited) the font order thing seems to only work if you supply *one* font, as opposed to having a huge list.

    FWIW, I recommend those font replacements.
    KDE, I heart thee.

    #2
    Re: .fonts.conf font order, substitution, fallback setup in Karmic

    Example:
    Code:
    <?xml version='1.0'?>
    <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
    
    
    <!-- GENERAL OPTIONS -->
    <fontconfig>
     <match target="font" >
      <edit mode="assign" name="embeddedbitmap" >
       <bool>true</bool>
      </edit>
     </match>
     <match target="font" >
      <edit mode="assign" name="rgba" >
       <const>rgb</const>
      </edit>
     </match>
     <match target="font" >
      <edit mode="assign" name="autohint" >
       <bool>false</bool>
      </edit>
     </match>
     <match target="font" >
      <edit mode="assign" name="hinting" >
       <bool>true</bool>
      </edit>
     </match>
     <match target="font" >
      <edit mode="assign" name="hintstyle" >
       <const>hintfull</const>
      </edit>
     </match>
     <match target="font" >
      <edit mode="assign" name="antialias" >
       <bool>true</bool>
      </edit>
     </match>
    
    
     <!-- FONT REPLACEMENT -->
    
     <!-- monospace -->
     <match target="pattern">
      <test qual="any" name="family"><string>mono</string></test>
      <edit name="family" mode="assign"><string>monospace</string></edit>
     </match>
     <match target="pattern">
      <test qual="any" name="family"><string>monotype</string></test>
      <edit name="family" mode="assign"><string>monospace</string></edit>
     </match>
    
     <!-- DejaVu Sans -->
     <match target="pattern">
      <test qual="any" name="family"><string>Bitstream Vera</string></test>
      <edit name="family" mode="assign"><string>DejaVu Sans</string></edit>
     </match>
     <match target="pattern">
      <test qual="any" name="family"><string>Bitstream Vera Sans</string></test>
      <edit name="family" mode="assign"><string>DejaVu Sans</string></edit>
     </match>
     <match target="pattern">
      <test qual="any" name="family"><string>Helvetica</string></test>
      <edit name="family" mode="assign"><string>DejaVu Sans</string></edit>
     </match>
     <match target="pattern">
      <test qual="any" name="family"><string>Nimbus Sans L</string></test>
      <edit name="family" mode="assign"><string>DejaVu Sans</string></edit>
     </match>
    
     <!-- DejaVu Sans Mono -->
     <match target="pattern">
      <test qual="any" name="family"><string>Bitstream Vera Sans Mono</string></test>
      <edit name="family" mode="assign"><string>DejaVu Sans Mono</string></edit>
     </match>
     <match target="pattern">
      <test qual="any" name="family"><string>Courier</string></test>
      <edit name="family" mode="assign"><string>DejaVu Sans Mono</string></edit>
     </match>
     <match target="pattern">
      <test qual="any" name="family"><string>Nimbus Mono L</string></test>
      <edit name="family" mode="assign"><string>DejaVu Sans Mono</string></edit>
     </match>
    
     <!-- Times New Roman -->
     <match target="pattern">
      <test qual="any" name="family"><string>Times</string></test>
      <edit name="family" mode="assign"><string>Times New Roman</string></edit>
     </match>
     <match target="pattern">
      <test qual="any" name="family"><string>Nimbus Roman No9 L</string></test>
      <edit name="family" mode="assign"><string>Times New Roman</string></edit>
     </match>
    
    
     <!-- FALLBACKS
    	Only *one* entry per family seems to work. For several fallbacks you need one entry *each*.
    	So if A>B>C, then A and B needs separate entries as opposed to one big A entry. -->
    
     <!-- depth 1 -->
     <alias>
      <family>serif</family>
      <prefer><family>Times New Roman</family></prefer>
     </alias>
     <alias>
      <family>sans</family>
      <prefer><family>DejaVu Sans</family></prefer>
     </alias>
     <alias>
      <family>sans-serif</family>
      <prefer><family>DejaVu Sans</family></prefer>
     </alias>
     <alias>
      <family>monospace</family>
      <prefer><family>DejaVu Sans Mono</family></prefer>
     </alias>
    
     <!-- depth 2 -->
     <alias>
      <family>DejaVu Sans</family>
      <prefer><family>Kochi Gothic</family></prefer>
     </alias>
     <alias>
      <family>DejaVu Sans Mono</family>
      <prefer><family>Kochi Gothic</family></prefer>
     </alias>
     <alias>
      <family>Arial</family>
      <prefer><family>Kochi Gothic</family></prefer>
     </alias>
     <alias>
      <family>Times New Roman</family>
      <prefer><family>Kochi Mincho</family></prefer>
     </alias>
    
    </fontconfig>
    KDE, I heart thee.

    Comment

    Working...
    X