最后还是堕落到宋体了

计算机 arch linux 字体


	不得不说,点阵字体还是有很大好处的:看着清楚。所以又迎回了宋体。

	矢量字体在我这里总有发虚、笔画杂揉的问题。估计是屏幕太小太旧,用网上给的配置感觉也不太好。

	其他Windows字体没装,保持系统简洁。

	 

	参考: http://forum.ubuntu.org.cn/viewtopic.php?f=8&t=359236

	(总算弄明白之前宋体为啥总也弄不好了,某个系统级别配置搞的鬼。我逐个移动/etc/fonts/conf.d下的文件,终于找到了元凶。)

	 

	以下是目前的fontconfig:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <!-- 基本设置,我的屏幕小,DPI设置为85。 -->
    <match target="font">
        <edit name="dpi" mode="assign">
            <double>85</double>
        </edit>
        <edit name="rgba" mode="assign">
            <const>rgb</const>
        </edit>
        <edit name="autohint" mode="assign">
            <bool>false</bool>
        </edit>
        <edit name="hinting" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="hintstyle" mode="assign">
            <const>hintfull</const>
        </edit>
        <edit name="antialias" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="embeddedbitmap" mode="assign">
            <bool>false</bool>
        </edit>
    </match>

    <!-- Windows中文字体替换 -->
    <match target="pattern">
        <test qual="any" name="family">
            <string>宋体</string>
            <string>新宋体</string>
            <string>NSimSun</string>
            <string>微软雅黑</string>
            <string>Microsoft YaHei</string>
            <string>AR PL ShanHeiSun Uni</string>
            <string>AR PL ShanHeiSun Uni MBE</string>
            <string>AR PL UMing CN</string>
            <string>AR PL UMing HK</string>
            <string>AR PL UMing TW</string>
            <string>AR PL UMing TW MBE</string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>SimSun</string>
        </edit>
    </match>

    <!-- 不认识的字体当作sans-serif -->
    <match target="pattern">
        <test qual="all" name="family" compare="not_eq">
            <string>sans-serif</string>
        </test>
        <test qual="all" name="family" compare="not_eq">
            <string>serif</string>
        </test>
        <test qual="all" name="family" compare="not_eq">
            <string>monospace</string>
        </test>
        <edit name="family" mode="append_last" binding="weak">
            <string>sans-serif</string>
        </edit>
    </match>

    <!-- 小号宋体用点阵,关闭抗锯齿,不然看起来很浅 -->
    <match target="font">
        <test qual="any" name="family">
            <string>SimSun</string>
        </test>
        <test name="pixelsize" compare="more_eq">
            <double>8</double>
        </test>
        <test name="pixelsize" compare="less_eq">
            <double>18</double>
        </test>
        <edit name="antialias">
            <bool>false</bool>
        </edit>
        <edit name="embeddedbitmap" mode="assign">
            <bool>true</bool>
        </edit>
    </match>

    <!-- 斜体关闭点阵、开抗锯齿更清晰 -->
    <match target="font">
        <test name="slant" compare="not_eq">
            <const>roman</const>
        </test>
        <edit name="antialias">
            <bool>true</bool>
        </edit>
        <edit name="embeddedbitmap" mode="assign">
            <bool>false</bool>
        </edit>
    </match>

    <!-- 某些常见字体的alias -->
    <alias>
        <family>Times</family>
        <prefer>
            <family>Times New Roman</family>
        </prefer>
	<default>
	    <family>serif</family>
	</default>
    </alias>

    <alias>
        <family>Helvetica</family>
	<prefer>
	    <family>Arial</family>
	</prefer>
	<default>
            <family>sans</family>
        </default>
    </alias>

    <alias>
        <family>Courier</family>
        <prefer>
            <family>Courier New</family>
        </prefer>
	<default>
	    <family>monospace</family>
	</default>
    </alias>
    
    <alias binding="strong">
	<family>Ubuntu</family>
	<prefer>
	    <family>Ubuntu</family>
            <family>MYuppyGB-Medium</family>
            <family>文泉驿微米黑</family>
	</prefer>
    </alias>

    <!-- 基本的三个字体族:sans、serif、mono -->
    <alias binding="strong">
	<family>sans-serif</family>
	<prefer>
            <family>SimSun</family>
            <family>WenQuanYi Bitmap Song</family>
	</prefer>
    </alias>

    <alias binding="strong">
	<family>serif</family>
	<prefer>
            <family>SimSun</family>
            <family>WenQuanYi Bitmap Song</family>
	</prefer>
    </alias>
    
    <!-- 等宽就不用宋体了。编程不怎么用中文,英语矢量字体更好看 -->
    <alias binding="strong">
	<family>monospace</family>
	<prefer>
	    <family>Droid Sans Mono</family>
            <family>文泉驿等宽微米黑</family>
	</prefer>
    </alias>
</fontconfig>

	另外,用font-manager禁用了几个字体。Nimbus那几个是X带的的基本字体,很难看。文鼎明体不禁用应该也没啥问题。剩下几个是效果差的:

<?xml version="1.0"?>
<fontconfig>
  <selectfont>
    <rejectfont>
      <pattern>
        <patelt name="family">
          <string>Nimbus Mono L</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>AR PL UMing TW MBE</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>Century Schoolbook L</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>URW Bookman L</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>AR PL UMing CN</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>Nimbus Roman No9 L</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>Nimbus Sans L</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>AR PL UMing HK</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>AR PL UMing TW</string>
        </patelt>
      </pattern>
      <pattern>
        <patelt name="family">
          <string>Ahem</string>
        </patelt>
      </pattern>
    </rejectfont>
  </selectfont>
</fontconfig>

	 

__RAW_HTML__

Page created on 2012-01-27