LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1138|回复: 8

为什么同样大小的汉字,本论坛显示为STHeiTi,而有的网页显示为难看的位图字体

[复制链接]
发表于 2009-4-12 22:30:18 | 显示全部楼层 |阅读模式
为什么同样大小的汉字,本论坛显示为STHeiTi,而有的网页显示为难看的位图字体

但那个网页放大后有用的是STHeiTi

谢谢
发表于 2009-4-13 01:06:40 | 显示全部楼层
因为很多网站的css指定了使用宋体。你可以在 /etc/fonts/locale.conf文件中做一个替换,把宋体替换为STHeiTi.
  1. <match target="pattern">
  2.         <test  name="family">
  3.                 <string>SimSun</string>
  4.                 <string>NSimSun</string>
  5.                 <string>MingLiU</string>
  6.                 <string>PMingLiU</string>
  7.         </test>
  8.         <test name="pixelsize" compare="more_eq"><double>12</double></test>   
  9.         <edit name="family" mode="assign"><string>Microsoft YaHei</string></edit>
  10. </match>
复制代码
上面的例子,大于12号的宋体/明流体都替换为雅黑。你也许要将more替换为less
回复 支持 反对

使用道具 举报

发表于 2009-4-13 09:41:57 | 显示全部楼层
直接在 Firefox 中禁止页面选择字体。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-13 11:03:48 | 显示全部楼层
Post by zhou3345;1973507
因为很多网站的css指定了使用宋体。你可以在 /etc/fonts/locale.conf文件中做一个替换,把宋体替换为STHeiTi.

  1. <match target="pattern">
  2.         <test  name="family">
  3.                 <string>SimSun</string>
  4.                 <string>NSimSun</string>
  5.                 <string>MingLiU</string>
  6.                 <string>PMingLiU</string>
  7.         </test>
  8.         <test name="pixelsize" compare="more_eq"><double>12</double></test>   
  9.         <edit name="family" mode="assign"><string>Microsoft YaHei</string></edit>
  10. </match>
复制代码

上面的例子,大于12号的宋体/明流体都替换为雅黑。你也许要将more替换为less


微软雅黑在配置文件里到底是iYaHei还是Microsoft YaHei
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-13 11:08:22 | 显示全部楼层
Post by ProgramFan;1973585
直接在 Firefox 中禁止页面选择字体。


我试过,仅仅这样还是不行,谢谢
回复 支持 反对

使用道具 举报

发表于 2009-4-13 11:55:33 | 显示全部楼层
Post by waterloo2005;1973640
微软雅黑在配置文件里到底是iYaHei还是Microsoft YaHei


那要看你用的什么版本了,iYaHei只是一个民间修改版,微软官方的应该用Microsoft YaHei。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-13 12:12:16 | 显示全部楼层
Post by zhou3345;1973507
因为很多网站的css指定了使用宋体。你可以在 /etc/fonts/locale.conf文件中做一个替换,把宋体替换为STHeiTi.

  1. <match target="pattern">
  2.         <test  name="family">
  3.                 <string>SimSun</string>
  4.                 <string>NSimSun</string>
  5.                 <string>MingLiU</string>
  6.                 <string>PMingLiU</string>
  7.         </test>
  8.         <test name="pixelsize" compare="more_eq"><double>12</double></test>   
  9.         <edit name="family" mode="assign"><string>Microsoft YaHei</string></edit>
  10. </match>
复制代码

上面的例子,大于12号的宋体/明流体都替换为雅黑。你也许要将more替换为less


我试了,还是不行,可同一个网站在ubuntu下小子也很润,当然有点模糊,ubuntu下我仅拷贝了STHeiTi到~/.fonts下再刷新一下
回复 支持 反对

使用道具 举报

发表于 2009-4-13 12:19:18 | 显示全部楼层
1 2 3 4 5 6

本帖子中包含更多资源

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

x
回复 支持 反对

使用道具 举报

发表于 2009-4-13 13:00:03 | 显示全部楼层
All Unix-like use the same font mechanisem to deal with it. Yous should edit .fonts.conf in your home instead of gloabl confif file, never globally config something for one user, even if the system is just for the only one user.
回复 支持 反对

使用道具 举报

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

本版积分规则

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