LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 50-suse-pre-user.conf of Package fontconfig (Project openSUSE:Factory)

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>


<!--
   Bugzilla #52167 and bugzilla #246804:
   Some fonts like "Luxi Mono", and "Nimbus Mono L"
   which are intended to be monospace are not detected as 
   monospace because they have a few glyphs with wrong width. 
   That is of course a bug in the fonts but this is difficult
   to fix and sometimes even impossible because of license reasons.
   For most purposes it is useful to force these fonts to be 
   detected as monospace because it doesn't matter much if only
   a handful of rarely used glyphs has the wrong width.
-->

 <match target="scan" >
  <test compare="contains" name="family" ><string>Luxi Mono</string></test>
  <edit mode="assign_replace" name="spacing"><const>mono</const></edit>
 </match>

 <match target="scan" >
  <test compare="contains" name="family" ><string>Nimbus Mono L</string></test>
  <edit mode="assign_replace" name="spacing"><const>mono</const></edit>
 </match>
   
<!--
  The dual-width Asian fonts (spacing=dual) are not rendered correctly,
  apparently Xft forces all widths to match. Trying to disable the
  width forcing code by setting globaladvance=false alone doesn't  help.
  As a brute force workaround, also set spacing=proportional, i.e. handle
  them as proportional fonts:
-->

        <match target="font">
                <test name="lang" compare="contains"><string>ja</string></test>
                <test name="spacing" compare="eq"><const>dual</const></test>
                <edit name="spacing"><const>proportional</const></edit>
                <edit name="globaladvance" binding="strong"><bool>false</bool></edit>
        </match>

        <match target="font">
                <test name="lang" compare="contains"><string>zh</string></test>
                <test name="spacing" compare="eq"><const>dual</const></test>
                <edit name="spacing"><const>proportional</const></edit>
                <edit name="globaladvance" binding="strong"><bool>false</bool></edit>
        </match>

        <match target="font">
                <test name="lang" compare="contains"><string>ko</string></test>
                <test name="spacing" compare="eq"><const>dual</const></test>
                <edit name="spacing"><const>proportional</const></edit>
                <edit name="globaladvance" binding="strong"><bool>false</bool></edit>
        </match>
                        
                        
<!--
  There is a similar problem with dual width bitmap fonts. They don't
  have spacing=dual, therefore they are not handled by the above rule
  and still display as charcell fonts. For example "Efont Biwidth"
  has spacing=mono and "Misc Fixed Wide" has spacing=charcell.
  Force handling of these fonts as proportional fonts as well:
-->

        <match target="font">
                <test name="lang" compare="contains"><string>ja</string></test>
                <test name="outline" compare="eq"><bool>false</bool></test>
                <test name="spacing" compare="eq"><const>mono</const></test>
                <edit name="spacing"><const>proportional</const></edit>
                <edit name="globaladvance" binding="strong"><bool>false</bool></edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains"><string>ja</string></test>
                <test name="outline" compare="eq"><bool>false</bool></test>
                <test name="spacing" compare="eq"><const>mono</const></test>
                <edit name="spacing"><const>charcell</const></edit>
                <edit name="globaladvance" binding="strong"><bool>false</bool></edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains"><string>zh</string></test>
                <test name="outline" compare="eq"><bool>false</bool></test>
                <test name="spacing" compare="eq"><const>mono</const></test>
                <edit name="spacing"><const>proportional</const></edit>
                <edit name="globaladvance" binding="strong"><bool>false</bool></edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains"><string>zh</string></test>
                <test name="outline" compare="eq"><bool>false</bool></test>
                <test name="spacing" compare="eq"><const>mono</const></test>
                <edit name="spacing"><const>charcell</const></edit>
                <edit name="globaladvance" binding="strong"><bool>false</bool></edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains"><string>ko</string></test>
                <test name="outline" compare="eq"><bool>false</bool></test>
                <test name="spacing" compare="eq"><const>mono</const></test>
                <edit name="spacing"><const>proportional</const></edit>
                <edit name="globaladvance" binding="strong"><bool>false</bool></edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains"><string>ko</string></test>
                <test name="outline" compare="eq"><bool>false</bool></test>
                <test name="spacing" compare="eq"><const>mono</const></test>
                <edit name="spacing"><const>charcell</const></edit>
                <edit name="globaladvance" binding="strong"><bool>false</bool></edit>
        </match>

<!-- ************************************************************ -->
<!-- Font replacements and fallbacks                              -->
<!-- ************************************************************ -->

<!--
  The SUSE fonts have been dropped from SuSE Linux >= 10.1 in
  favour of the DejaVu fonts. All extensions the SUSE fonts had
  over the original Bitstream fonts have already been merged into the
  DejaVu fonts and the DejaVu fonts contain many glyphs not in
  the SUSE fonts. Therefore there is no reason to use the SUSE
  fonts anymore.

  As old config files or documents users might still refer to the SUSE
  fonts, we add rules here to use the DejaVu fonts as a replacement
  if the SUSE fonts are missing (The SUSE fonts are still used
  if they are still available for best compatibility).

  The style=Roman used in the SUSE and the original "Bitstream Vera"
  fonts has been renamed into style=Book in the DejaVu fonts,
  therefore some extra rules are needed.

-->

        <match target="pattern">
                <test name="family">
                        <string>SUSE Sans</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>DejaVu Sans</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Sans</string>
                </test>
                <test name="style">
                        <string>Roman</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>DejaVu Sans</string>
                </edit>
                <edit name="style" mode="append" binding="same">
                        <string>Book</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Sans Mono</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>DejaVu Sans Mono</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Sans Mono</string>
                </test>
                <test name="style">
                        <string>Roman</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>DejaVu Sans Mono</string>
                </edit>
                <edit name="style" mode="append" binding="same">
                        <string>Book</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Serif</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>DejaVu Serif</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Serif</string>
                </test>
                <test name="style">
                        <string>Roman</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>DejaVu Serif</string>
                </edit>
                <edit name="style" mode="append" binding="same">
                        <string>Book</string>
                </edit>
        </match>

<!--
  If the original Adobe "Symbol" font is not available, use
  the URW font "Standard Symbols L" or the font "OpenSymbol" coming
  with OpenOffice as a replacement. The last font appended in this
  rule will win.
  (needed for Mozilla/Firefox to display symbols correctly).
  
-->

        <match target="pattern">
                <test name="family">
                        <string>symbol</string>
                </test>
                <edit name="family" mode="append" binding="strong">
                        <string>OpenSymbol</string>
                </edit>
                <edit name="family" mode="append" binding="strong">
                        <string>Standard Symbols L</string>
                </edit>
        </match>

<!--
  Use  "Misc Console" (or "Misc Console Wide") instead of "console"
  (needed to make the menu entry labelled "Linux" in the font menu of
  KDE's konsole choose the same font as it used to).
-->
        <match target="pattern">
                <test name="family">
                        <string>console</string>
                </test>
                <edit name="family" mode="prepend" binding="strong">
                        <string>Misc Console</string>
                </edit>
                <edit name="family" mode="prepend" binding="strong">
                        <string>Misc Console Wide</string>
                </edit>
        </match>

<!-- ************************************************************ -->
<!-- Blacklisting fonts which cannot work                         -->
<!-- ************************************************************ -->

<!--
    the Hershey-Fonts from ghostscript-fonts-other.rpm are so called
    "Stroke" fonts which are currently not supported by Freetype
-->

	<selectfont>
	        <rejectfont>
		        <pattern>
			        <patelt name="family">
                                        <string>Hershey-Gothic-English</string>
                                </patelt>
			</pattern>
			<pattern>
			        <patelt name="family">
                                        <string>Hershey-Plain-Duplex</string>
                                </patelt>
			</pattern>
			<pattern>
			        <patelt name="family">
                                        <string>Hershey-Plain-Duplex-Italic</string>
                                </patelt>
			</pattern>
			<pattern>
			        <patelt name="family">
                                        <string>Hershey-Plain-Triplex</string>
                                </patelt>
			</pattern>
			<pattern>
			        <patelt name="family">
                                        <string>Hershey-Plain-Triplex-Italic</string>
                                </patelt>
			</pattern>
			<pattern>
			        <patelt name="family">
                                        <string>Hershey-Script-Simplex</string>
                                </patelt>
			</pattern>
			<pattern>
			        <patelt name="family">
                                        <string>Hershey-Script-Complex</string>
                                </patelt>
			</pattern>
			<pattern>
			        <patelt name="family">
                                        <string>Hershey-Gothic-German</string>
                                </patelt>
			</pattern>
			<pattern>
			        <patelt name="family">
                                        <string>Hershey-Gothic-Italian</string>
                                </patelt>
			</pattern>
		</rejectfont>
	</selectfont>

<!--
    CID keyed fonts don't work (yet) with freetype2
-->

        <selectfont>
         <rejectfont>
           <pattern>
            <patelt name="fontformat">
              <string>CID Type 1</string>
            </patelt>
           </pattern>
         </rejectfont>
        </selectfont>

<!--
    Windows fonts with the .fon extension don't work with Xft2
    (such fonts are in the "wine" package).
-->

	<selectfont>
	 <rejectfont>
	   <glob>*.fon</glob>
	 </rejectfont>
	</selectfont>

<!-- BDF fonts don't work with Xft2 -->

	<selectfont>
	 <rejectfont>
	   <glob>*.bdf</glob>
	 </rejectfont>
	</selectfont>

<!-- Accept bitmap fonts -->

        <selectfont>
         <acceptfont>
          <pattern>
           <patelt name="scalable">
            <bool>false</bool>
           </patelt>
          </pattern>
         </acceptfont>
        </selectfont>

<!-- ************************************************************ -->
<!-- assigning families to generic names                          -->
<!-- ************************************************************ -->

<!--
  Serif faces
 -->
	<alias>
		<family>Georgia</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>Bell MT</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>Thorndale AMT</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>SUSE Serif</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>FreeSerif</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>DejaVu Serif</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>Droid Serif</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>Liberation Serif</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>HGMinchoL</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>HGPMinchoL</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>HGPMinchoB</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>HGSMinchoB</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>HGMinchoE</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>HGPMinchoE</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>HGSMinchoE</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>IPAMincho</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>IPAPMincho</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>IPAexMincho</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>Sazanami Mincho</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>STIXGeneral</family>
		<default><family>serif</family></default>
	</alias>
	<alias>
		<family>Tinos</family>
		<default><family>serif</family></default>
	</alias>
<!--
  Sans-serif faces
 -->
	<alias>
		<family>Trebuchet</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>Segoe</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>Andale Sans</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>Albany AMT</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>SUSE Sans</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>FreeSans</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>DejaVu Sans</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>Droid Sans</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>Liberation Sans</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>Cantarell</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>HGGothicB</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>HGPGothicB</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>HGGothicE</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>HGPGothicE</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>HGSGothicE</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>HGGothicM</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>HGPGothicM</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>HGSGothicM</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>IPAGothic</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>IPAPGothic</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>IPAexGothic</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>Sazanami Gothic</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>Baekmuk Gulim</family>
		<default><family>sans-serif</family></default>
	</alias>
	<alias>
		<family>Arimo</family>
		<default><family>sans-serif</family></default>
	</alias>
<!--
  Monospace faces
 -->
	<alias>
		<family>Fixed</family>
		<default><family>monospace</family></default>
	</alias>
	<alias>
		<family>Cumberland AMT</family>
		<default><family>monospace</family></default>
	</alias>
	<alias>
		<family>SUSE Sans Mono</family>
		<default><family>monospace</family></default>
	</alias>
	<alias>
		<family>FreeMono</family>
		<default><family>monospace</family></default>
	</alias>
	<alias>
		<family>DejaVu Sans Mono</family>
		<default><family>monospace</family></default>
	</alias>
	<alias>
		<family>Droid Sans Mono</family>
		<default><family>monospace</family></default>
	</alias>
	<alias>
		<family>Liberation Mono</family>
		<default><family>monospace</family></default>
	</alias>
	<alias>
		<family>Cousine</family>
		<default><family>monospace</family></default>
	</alias>

</fontconfig>