LinuxSir.cn,穿越时空的Linuxsir!

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

gtk2 qt fontconfig are you ok?

[复制链接]
发表于 2009-9-17 22:52:08 | 显示全部楼层 |阅读模式
字体差不多满意了,最后的问题是gtk2程序的程序为何不受fontconfig控制,
大家看图 英文是DejaVu Sans, gtk2程序中就和我删除.fonts.conf以后qt程序里的字体一样,就是说gtk2不听fontconfig的,why?

本帖子中包含更多资源

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

x
发表于 2009-9-17 23:00:53 | 显示全部楼层
你看下eselect fontconfig list中那個user.conf那個項目有沒有*標記,沒有的話把那個啟用了再看看。其次就是看下gtk2的程序用的是不是sans serif,不要這個地方設置錯了就不好了。另外就是檢查一下qt方面有沒有qtconfig中設置了字體,因為qt4原來有個hardcoded font settings的問題,sans serif會被代替成一個特定的字體。這個問題如果還存在可能會給你帶來錯覺是gtk的問題。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-17 23:08:35 | 显示全部楼层
Post by 亞利艾爾;2027831
你看下eselect fontconfig list中那個user.conf那個項目有沒有*標記,沒有的話把那個啟用了再看看。其次就是看下gtk2的程序用的是不是sans serif,不要這個地方設置錯了就不好了。另外就是檢查一下qt方面有沒有qtconfig中設置了字體,因為qt4原來有個hardcoded font settings的問題,sans serif會被代替成一個特定的字體。這個問題如果還存在可能會給你帶來錯覺是gtk的問題。


我这里事实上只有那一种英文字体,还有qtconfig中设置的字体后每次我进去就没有了,请问配置文件在哪?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-17 23:50:50 | 显示全部楼层
发现了是.fonts.conf的问题,但是同样的文件 qt去没问题阿
大家看看
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font" >
  <test name="family" >
   <string>DejaVu Sans</string>
   <string>Lucida Grande</string>
   <string>Lucida Bright</string>
   <string>Lucida Sans</string>
   <string>DejaVu Sans Mono</string>
  </test>
<match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
</match>
  <edit mode="assign" name="autohint" >
   <bool>true</bool>
  </edit>
  <edit mode="assign" name="hintstyle" >
   <const>hintslight</const>
  </edit>
</match>
<match target="font" >
  <test name="family" >
   <string>STHeiti</string>
  </test>
  <edit mode="assign" name="hintstyle" >
   <const>hintnone</const>
  </edit>
</match>
<match target="pattern" >
  <test name="family" >
   <string>DejaVu Sans</string>
   <string>Courier New</string>
   <string>Courier10 BT</string>
  </test>
  <edit binding="strong" mode="append" name="family" >
   <string>STHeiti</string>
   <string>STKaiti</string>
   <string>华文楷体</string>
  </edit>
</match>
<match target="pattern" >
  <test name="family" >
   <string>Bitstream Vera Sans</string>
   <string>Bitstream Vera Serif</string>
   <string>Tahoma</string>
  </test>
  <edit binding="strong" mode="prepend" name="family" >
   <string>Dejavu Sans</string>
   <string>STHeiti</string>
  </edit>
</match>
<match target="pattern" >
  <test name="family" >
   <string>DejaVu Sans</string>
   <string>Georgia</string>
  </test>
  <edit binding="strong" mode="prepend" name="family" >
   <string>Dejavu Sans</string>
   <string>STHeiti</string>
  </edit>
</match>
<match target="pattern" >
  <test name="family" >
   <string>Bitstream Sans Mono</string>
  </test>
  <edit binding="strong" mode="append" name="family" >
   <string>DejaVu Sans Mono</string>
   <string>STHeiti</string>
  </edit>
</match>
<match target="font" >
  <test name="family" >
   <string>DejaVu Sans</string>
   <string>Verdana</string>
   <string>Arial</string>
   <string>FSIngrid</string>
   <string>DejaVu Serif</string>
   <string>Bitstream Vera Sans</string>
   <string>Bitstream Vera Serif</string>
  </test>
  <edit mode="assign" name="autohint" >
   <bool>false</bool>
  </edit>
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
  <edit mode="assign" name="hintstyle" >
   <const>hintslight</const>
  </edit>
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
</match>
<match target="pattern" >
  <test name="family" >
   <string>DejaVu Sans</string>
   <string>DejaVu Sans Mono</string>
   <string>Lucida Grande</string>
   <string>Lucida Sans</string>
   <string>Sans</string>
   <string>Bitstream Vera Sans</string>
   <string>Bitstream Vera Sans Mono</string>
  </test>
  <edit binding="strong" mode="append" name="family" >
   <string>STHeiti</string>
  </edit>
</match>
</fontconfig>
回复 支持 反对

使用道具 举报

发表于 2009-9-18 01:11:29 | 显示全部楼层
gtk的动动还是装lxappearance设置吧。
回复 支持 反对

使用道具 举报

发表于 2009-9-18 11:03:54 | 显示全部楼层
最强烈要求楼主把自己的配置方法总结出来,敝人想学学经验。
回复 支持 反对

使用道具 举报

发表于 2009-9-18 13:49:37 | 显示全部楼层
暈死,樓上的,人家問題沒有解決還經驗……而且字體配置的經驗都大街小巷可見。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-19 00:23:29 | 显示全部楼层

不折腾了,将就了,字体永远折腾不完!

现在GTK程序里的字体和KDE还是不怎么一样

本帖子中包含更多资源

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

x
回复 支持 反对

使用道具 举报

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

本版积分规则

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