LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
123
返回列表 发新帖
楼主: bbmd

[半解决]这个算不算字体发虚??

[复制链接]
发表于 2006-4-5 22:18:21 | 显示全部楼层
这段是把这三个 AR PL 开头的字体在 12 到 20 之间的大小关闭抗锯齿。
  1. <match target="font" >
  2.   <test name="family" qual="any" >
  3.    <string>SimSun</string>
  4.    <string>AR PL New Sung</string>
  5.    <string>AR PL SungtiL GB</string>
  6.    <string>AR PL ShanHeiSun Uni</string>
  7.   </test>
  8.   <test compare="more_eq" name="pixelsize" >
  9.    <int>12</int>
  10.   </test>
  11.   <test compare="less_eq" name="pixelsize" >
  12.    <int>20</int>
  13.   </test>
  14.   <edit mode="assign" name="antialias" >
  15.    <bool>false</bool>
  16.   </edit>
  17. </match>
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-5 23:08:18 | 显示全部楼层
Post by waq
这种虚法可以考虑打开Autohint试一试,也许有改善。
可以说肯定是hint的问题,一竖变两,要打开相关的hint,或者用Autohint,看字体而定。
我的是一打开Autohint就好多了,AA我也是打开的,个人觉得比不用AA好。当然如果使用的是点阵字体,AA反而不好。

你当初是不是完全DIY的,当时设置的具体步骤是什么?
是不是把/etc/fonts/fonts.conf中的hint设为true??
可是那个文件被我刚才删了,要如何再建一个??
现在一好像就konqueror中的字体发虚,一些应用程序的菜单字体已经不错了。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2006-4-5 23:18:30 | 显示全部楼层
我觉得还是因为这个AA算法的问题,为什么英文字母AA就好看,对吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-5 23:51:35 | 显示全部楼层
Post by baif
我觉得还是因为这个AA算法的问题,为什么英文字母AA就好看,对吧。

把winsows下的simsun.ttc  cp 到/usr/share/fonts/truetype/simsun.ttf(不知道为什么要改为ttf)
#mkfontscale
#mkfontdir   (只知道生成了两个文件,具体干了什么就不知道了)
#fc-cache -f -v (也不知其所以然)

关键一步:建立/etc/fonts/local.conf,内容:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
</match>
<match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintmedium</const>
  </edit>
</match>
<dir>~/.fonts</dir>
<match target="font" >
  <test compare="more" name="size" qual="any" >
   <double>8</double>
  </test>
  <test compare="less" name="size" qual="any" >
   <double>12</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
</match>
<match target="font" >
  <test compare="more" name="pixelsize" qual="any" >
   <double>11</double>
  </test>
  <test compare="less" name="pixelsize" qual="any" >
   <double>17</double>
  </test>
  <edit mode="assign" name="antialias" >
   <bool>false</bool>
  </edit>
</match>
</fontconfig>


这样就不“虚”了,但字体也不是很好看,特别是英文。使用“圆整字体角边”也没用。将就用了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2006-4-6 10:54:55 | 显示全部楼层
Post by ichdenke
就是控制中心—>外观->字体—>把圆整字体边角那一项的勾去掉就搞定了,不需要作任何其它的事情,kde这方面让人很满意阿。

gnome 改成 单色渲染
回复 支持 反对

使用道具 举报

发表于 2006-4-7 22:44:51 | 显示全部楼层
Post by bbmd
你当初是不是完全DIY的,当时设置的具体步骤是什么?
是不是把/etc/fonts/fonts.conf中的hint设为true??
可是那个文件被我刚才删了,要如何再建一个??
现在一好像就konqueror中的字体发虚,一些应用程序的菜单字体已经不错了。

我是什么系统文件也没有改,只是在配置fontconfig时选择启用autohint而已。要改的设置放在~/.fonts.conf中
回复 支持 反对

使用道具 举报

发表于 2006-4-30 09:32:51 | 显示全部楼层

bbmd要的local.conf


  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <!-- conf.d/myfont.conf -->
  4. <fontconfig>
  5. <dir>/usr/share/fonts</dir>
  6. <dir>/usr/local/share/fonts</dir>
  7. <!--加入点阵字体路径-->
  8. <dir>/usr/X11R6/lib/X11/fonts</dir>

  9. <!--
  10. 配置粗体中文显示,要配合freetype-2.1.10,libxft-2.1.7,fontconfig-2.3.X
  11.   -->

  12.      <match target="font">
  13.          <!-- check to see if the font is just regular -->
  14.          <test name="weight" compare="less_eq">
  15.              <int>100</int>
  16.          </test>
  17.          <!-- check to see if the pattern requests bold -->
  18.          <test target="pattern" name="weight" compare="more_eq">
  19.              <int>180</int>
  20.          </test>
  21.          <!-- set the embolden flag -->
  22.          <edit name="embolden" mode="assign">
  23.              <bool>true</bool>
  24.          </edit>
  25.      </match>

  26. <!--
  27.         default settings for all fonts.
  28. -->
  29. <match target="font" >
  30. <!-- 打开字体的反锯齿即AA,大号字用AA会更美观   -->
  31.                 <edit mode="assign" name="antialias" >
  32.                         <bool>t</bool>
  33.                 </edit>
  34.                 <edit mode="assign" name="hintstyle" >
  35.                         <const>hintslight</const>
  36.                 </edit>
  37. <!-- 打开hint  -->
  38.                 <edit mode="assign" name="hint" >
  39.                         <bool>t</bool>
  40.                 </edit>
  41. <!-- 关闭autohint  -->
  42.                 <edit mode="assign" name="autohint" >
  43.                         <bool>false</bool>
  44.                 </edit>
  45. </match>


  46. <!-- 关闭 8到17号字体的AA -->
  47. <match target="font" >
  48.                 <!--
  49.                 <test compare="contains" name="lang" >
  50.                         <string>zh-cn</string>
  51.                         <string>zh-tw</string>
  52.                         <string>ja</string>
  53.                         <string>ko</string>
  54.                 </test>
  55.                 -->
  56.                 <test compare="more_eq" name="pixelsize" qual="any" >
  57.                         <double>8</double>
  58.                 </test>
  59.                 <test compare="less_eq" name="pixelsize" qual="any" >
  60.                         <double>17</double>
  61.                 </test>
  62.                 <edit mode="assign" name="antialias" >
  63.                         <bool>false</bool>
  64.                 </edit>
  65. </match>

  66. <!-- 解决英文字体间距过宽 -->
  67. <match target="font">

  68.                 <test target="pattern" name="lang" compare="contains">
  69.                         <string>zh-tw</string>
  70.                         <string>zh-cn</string>
  71.                         <string>ja</string>
  72.                         <string>ko</string>
  73.                 </test>
  74.                 <edit name="spacing">
  75.                         <const>proportional</const>
  76.                 </edit>
  77.                 <edit name="globaladvance">
  78.                 <bool>false</bool>
  79.                 </edit>
  80. </match>

  81. <!--
  82. 设定中文最小字号,使得小字的中文美观
  83. -->
  84.   <match target="font" >
  85.         <test name="family" qual="any" >
  86.                 <string>SimSun</string>
  87.                 <string>SimSun-18030</string>
  88.                 <string>NSimSun</string>
  89.                 <string>SimHei</string>
  90.                 <string>AR PL ShanHeiSun Uni</string>
  91.                 <string>AR PL SungtiL GB</string>
  92.                 <string>FangSong_GB2312</string>
  93.                 <string>KaiTi_GB2312</string>
  94.                 <string>LiSu</string>
  95.                 <string>YouYuan</string>
  96.         </test>
  97.         <test compare="more_eq" name="pixelsize" >
  98.                 <int>8</int>
  99.         </test>
  100.         <test compare="less_eq" name="pixelsize" >
  101.                 <int>12</int>
  102.         </test>
  103.         <edit compare="eq" name="pixelsize" >
  104.                 <int>12</int>
  105.         </edit>
  106. </match>
  107. <!--
  108.   把serif ,sans,monospace的family(字体族)重新排序,适应中文用户的用字习惯
  109. -->
  110.    <alias>
  111.       <family>serif</family>
  112.       <prefer>
  113.          <family>Times New Roman</family>
  114.          <family>Nimbus Roman No9 L</family>
  115.          <family>Luxi Serif</family>
  116.          <family>Times</family>
  117.          <family>Bitstream Vera Serif</family>
  118.          <family>Simsun</family>
  119.          <family>SimSun-18030</family>
  120.          <family>AR PL ShanHeiSun Uni</family>
  121.          <family>AR PL SungtiL GB</family>
  122.       </prefer>
  123.    </alias>
  124.    <alias>
  125.       <family>sans-serif</family>
  126.       <prefer>
  127.          <family>Helvetica</family>
  128.          <family>Verdana</family>
  129.          <family>Arial</family>
  130.          <family>Tahoma</family>
  131.          <family>Bitstream Vera Sans</family>
  132.          <family>SimSun</family>
  133.          <family>SimSun-18030</family>
  134.          <family>AR PL ShanHeiSun Uni</family>
  135.          <family>AR PL SungtiL GB</family>
  136.       </prefer>
  137.    </alias>
  138.    <alias>
  139.       <family>monospace</family>
  140.       <prefer>
  141.          <family>Courier</family>
  142.          <family>Courier New</family>
  143.          <family>Nimbus Mono L</family>
  144.          <family>Bitstream Vera Sans Mono</family>
  145.         <family>console8x16</family>
  146.          <family>NSimSun</family> <!-- han (zh-cn,zh-tw) -->
  147.         <family>SimSun</family>
  148.          <family>AR PL ShanHeiSun Uni</family>
  149.     </prefer>
  150.    </alias>

  151. </fontconfig>



复制代码
回复 支持 反对

使用道具 举报

发表于 2006-4-30 09:36:07 | 显示全部楼层
把上面的代码cp到/etc/fonts/local.conf文件里
没有就建一个新的
然后fc-cache -fv
注销然后重登陆,重选字体
注意如果有时字体有破碎感时可能是你挑的字体字号大小不对
我也不明白有时为什么尾数是单号的字体为什么不好看
回复 支持 反对

使用道具 举报

发表于 2006-4-30 10:04:30 | 显示全部楼层
Post by AgelessTulip
搂主你的桌面好pp,请教怎么做的?
楼主字体太虚了
回复 支持 反对

使用道具 举报

发表于 2006-4-30 19:33:45 | 显示全部楼层
不知道我这个算不算虚,开了AA的中文显示...觉得看就了眼睛会累,用simsun开AA惨不忍睹,不开又太刺眼

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表