LinuxSir.cn,穿越时空的Linuxsir!

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

fontconfig 设置最小字体的问题

[复制链接]
发表于 2010-8-24 09:55:24 | 显示全部楼层 |阅读模式
发现 Monaco 字体在某些字号的情况下,出来的字体是那种像素一样的效果,很烂。所以想通过 fontconfig 设置下。


  1. <match target="font" >
  2.         <test name="family" qual="any" >
  3.                 <string>Monaco</string>
  4.         </test>
  5.         <test compare="more" name="pixelsize" >
  6.                 <int>12</int>
  7.         </test>
  8.         <test compare="less_eq" name="pixelsize" >
  9.                 <int>13</int>
  10.         </test>
  11.         <edit compare="eq" name="pixelsize" >
  12.                 <int>13</int>
  13.         </edit>
  14. </match>

  15. <match target="font" >
  16.         <test name="family" qual="any" >
  17.                 <string>Monaco</string>
  18.         </test>
  19.         <test compare="more" name="pixelsize" >
  20.                 <int>13</int>
  21.         </test>
  22.         <test compare="less_eq" name="pixelsize" >
  23.                 <int>14</int>
  24.         </test>
  25.         <edit compare="eq" name="pixelsize" >
  26.                 <int>13</int>
  27.         </edit>
  28. </match>

  29. <match target="font" >
  30.         <test name="family" qual="any" >
  31.                 <string>Monaco</string>
  32.         </test>
  33.         <test compare="more_eq" name="pixelsize" >
  34.                 <int>8</int>
  35.         </test>
  36.         <test compare="less_eq" name="pixelsize" >
  37.                 <int>12</int>
  38.         </test>
  39.         <edit compare="eq" name="pixelsize" >
  40.                 <int>12</int>
  41.         </edit>
  42. </match>
复制代码


可发现在 chrome 的标题栏上面的字体,和 gnome 登录界面的输入的用户名,还是很烂,这个是怎么回事?

14px 的 Monaco 字体效果很烂。不知道有没有人遇到这个问题。
发表于 2010-8-25 09:46:39 | 显示全部楼层
参考这篇文章,讲的很细
http://www.linuxsir.cn/bbs/thread266659.html
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-25 18:50:10 | 显示全部楼层
这是字体效果
108% 的就有问题,105% 的替换的挺好的。。。

本帖子中包含更多资源

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

x
回复 支持 反对

使用道具 举报

发表于 2010-8-25 19:24:06 | 显示全部楼层
pixelsize 应该是double类型的,应该把<int></int>改成<double></double>?仅仅是个猜测。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-26 11:13:23 | 显示全部楼层
double 也不行。很奇怪。
monaco 这个字体很奇怪,9pt 以下的,效果很烂,9pt ~ 10pt 之间的也很烂
不知道有没有办法把这个问题编辑一下。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-26 11:14:34 | 显示全部楼层
我这样都没效果。。。
也不知道这个 fontconfig 怎么回事。。。
  1. <match target="font" >
  2.         <test name="family" qual="any" >
  3.                 <string>Monaco</string>
  4.         </test>
  5.         <test compare="less" name="size" >
  6.                 <double>15</double>
  7.         </test>
  8.         <edit binding="strong" mode="prepend" name="family">
  9.                 <string>DejaVu Sans Mono</string>
  10.         </edit>
  11. </match>
复制代码
回复 支持 反对

使用道具 举报

发表于 2010-8-26 11:46:34 | 显示全部楼层
......
回复 支持 反对

使用道具 举报

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

本版积分规则

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