歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Unix知識 >> 關於Unix

解決英文字體間距變寬的local.conf

match target=font test compare=more_eq name=spacing constdual/const /test !--edit mode=assign name=globaladvance -- !--boolfalse/bool-- !--/edit-- edit name=spacing mode=assign int0/int /edit /match ?xml version=1.0? !DOCTYPE fontconfig SY         <match target="font" >
                <test compare="more_eq" name="spacing" >
                        <const>dual</const>
                </test>
                <!--edit mode="assign" name="globaladvance" -->
                        <!--bool>false</bool-->
                <!--/edit-->
                <edit name="spacing" mode="assign">
                        <int>0</int>
                </edit>
        </match>

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file for local customizations -->
<fontconfig>
 <dir>/usr/share/fonts</dir>
 <dir>/usr/share/fonts/local</dir>
 <dir>/usr/share/fonts/zh_CN</dir>
 <dir>/usr/local/share/fonts</dir>
 <dir>/usr/share/fonts/zh_CN/TrueType</dir>
 <dir>/usr/X11R6/lib/X11/fonts</dir>

        <match target="font" >
                <test compare="more_eq" name="spacing" >
                        <const>dual</const>
                </test>
                <!--edit mode="assign" name="globaladvance" -->
                        <!--bool>false</bool-->
                <!--/edit-->
                <edit name="spacing" mode="assign">
                        <int>0</int>
                </edit>
        </match>

        <match target="font" >
                <test compare="more" target="pattern" name="weight" >
                        <const>medium</const>
                </test>
                <edit mode="assign" name="weight" >
                        <const>bold</const>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>Tahoma</string>
                </test>
                <edit name="family" mode="append" binding="strong">
                        <string>SimSun</string>
                </edit>
        </match>

        <match target="pattern" >
                <test compare="eq" name="family" qual="any" >
                        <string>AR PL KaitiM GB</string>
                </test>
                <edit mode="prepend_first" binding="strong" name="family" >
                        <string>Bitstream Vera Sans</string>
                </edit>
        </match>

        <match target="pattern" >
                <test compare="eq" name="family" qual="any" >
                        <string>AR PL Mingti2L GB</string>
                </test>
                <edit mode="prepend_first" binding="strong" name="family" >
                        <string>Bitstream Vera Serif</string>
                </edit>
        </match>
        <match target="pattern" >
                <test compare="eq" name="family" qual="any" >
                        <string>AR PL KaitiM Big5</string>
                </test>
                <edit mode="prepend_first" binding="strong" name="family" >
                        <string>Bitstream Vera Sans</string>
                </edit>
        </match>

        <match target="pattern" >
                <test compare="eq" name="family" qual="any" >
                        <string>AR PL Mingti2L Big5</string>
                </test>
                <edit mode="prepend_first" binding="strong" name="family" >
                        <string>Bitstream Vera Serif</string>
                </edit>
        </match>

        <!--
        default settings for all fonts.
        -->

        <match target="font" >
                <edit mode="assign" name="antialias" >
                        <bool>true</bool>
                </edit>
                <edit mode="assign" name="hintstyle" >
                        <const>hintslight</const>
                </edit>
                <edit mode="assign" name="hint" >
                        <bool>true</bool>
                </edit>
                <edit mode="assign" name="autohint" >
                        <bool>false</bool>
                </edit>
        </match>
        <match target="font" >
                <test compare="more_eq" name="pixelsize" >
                        <int>12</int>
                </test>
                <test compare="less_eq" name="pixelsize" >
                        <int>18</int>
                </test>
                <!--test mode="assign" name="weight" >
                        <const>bold</const>
                </test-->
                <edit mode="assign" name="antialias" >
                        <bool>false</bool>
                </edit>
        </match>

        <!--
        bingding Bitstream Vera Sans Mono to monospace
        -->

        <match target="pattern" >
                <test name="family" qual="any" >
                        <string>monospace</string>
                </test>
                <edit mode="append" binding="strong" name="family" >
                        <string>Bitstream Vera Sans Mono</string>
                </edit>

        </match>

        <match target="font" >
                <test compare="contains" target="pattern" name="lang" >
                        <string>zh-cn</string>
                        <string>zh-tw</string>
                        <string>ja</string>
                        <string>ko</string>
                </test>
                <test compare="eq" name="spacing" >
                        <const>mono</const>
                </test>
                <edit mode="assign" name="globaladvance" >
                        <bool>false</bool>
                </edit>
                <edit mode="assign" name="size" >
                        <plus><double>1</double></plus>
                </edit>
        </match>

        <match target="font">
                <test name="family" qual="any" >
                        <string>SimHei</string>
                        <string>FZHeiTi</string>
                        <string>SimSun</string>
                        <string>NSimSun</string>
                </test>
                <edit mode="assign" name="globaladvance" >
                        <bool>false</bool>
                </edit>
        </match>

</fontconfig>

Copyright © Linux教程網 All Rights Reserved