LinuxSir.cn,穿越时空的Linuxsir!

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

有些程序的字体为什么设置不了?

[复制链接]
发表于 2008-10-7 16:44:34 | 显示全部楼层 |阅读模式
我的字体是这样设置的。

可是有些地方字体仍然很模糊,很小,比如scim系统托盘的右键菜单,yast和Amarok


该如何设置呢?

本帖子中包含更多资源

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

x
发表于 2008-10-7 18:36:41 | 显示全部楼层
我基本都是设置成统一字体的n_n

本帖子中包含更多资源

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

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-7 19:40:36 | 显示全部楼层
貌似跟固定字体dpi有关。。。
回复 支持 反对

使用道具 举报

发表于 2008-10-7 20:01:42 | 显示全部楼层
楼主的显示器是什么牌子型号?
除了控制中心设置字体,还有qt setting 里面的字体。
圆整字体边角用轻微那一个。
字体最好换一个,雅黑不错。

最好设置一下DPI,这要根据你的显示器型号。
我还在/etc/X11/Xresources最后加入的一行
  1. Xft.dpi:96
复制代码


如上设置还不行的话,我这里有个启动次像素平滑的文件,并且我这里设了96dpi
  1. cat /etc/fonts/local.conf                    
  2. <?xml version="1.0"?>                                             
  3. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">                           
  4. <fontconfig>                                                      

  5. <!-- Generated by SuSEconfig.fonts, don't edit, your changes will get lost. -->
  6. <!-- Edit /etc/sysconfig/fonts-config instead.                              -->
  7. <!-- Or put rules into your personal config file ~/.fonts.conf.             -->

  8. <!-- ************************************************************ -->
  9. <!-- Hinting and antialiasing                                     -->
  10. <!-- ************************************************************ -->

  11.        <match target="pattern" >
  12.                <edit name="dpi" mode="assign" >
  13.                         <double>96</double>   
  14.                 </edit>                        
  15.        </match>                                

  16. <!--
  17.     Using hinting=true, hintstyle=hintfull and antialias=true
  18.     is a good default for most fonts.                        

  19.     Match on "pattern" for the default, not on "font" to make
  20.     it easier to override the default using FcPatternDel()   
  21.     and FcPatternAdd...() (see bugzilla #104365).            
  22. -->                                                         

  23.         <match target="pattern">
  24.                 <edit name="hinting">
  25.                         <bool>true</bool>
  26.                 </edit>                  
  27.                 <edit name="hintstyle">  
  28.                         <const>hintfull</const>
  29.                 </edit>                        
  30.                 <edit name="antialias">        
  31.                         <bool>true</bool>      
  32.                 </edit>                        
  33.         </match>                              

  34. <!--
  35.     Set autohinter=true as the default, then add exceptions for certain fonts.

  36.     Match on "font" here, not on "pattern" because of bug #118131 comment #93.
  37.     (If an autohint value is set in pattern, OpenOffice 2.1 will use that even
  38.     if there are fontconfig rules matching on "font" which should override it
  39.     again). This doesn't cause any problems for Cairo/Gnome (see bug #104365)
  40.     because Cairo/Gnome don't try to change the autohint value anyway.        
  41. -->                                                                           

  42.         <match target="font">
  43.                 <edit name="autohint">
  44.                         <bool>true</bool>
  45.                 </edit>                  
  46.         </match>                        

  47.         <!--
  48.             Switch off the autohinter for PostScript fonts (Type 1 and OpenType CFF)
  49.             because using the PostScript hinting usually looks better than using   
  50.             the autohinter.                                                         
  51.         -->                                                                        

  52.         <match target="font">
  53.                 <test name="fontformat">
  54.                         <string>Type 1</string>
  55.                         <string>CFF</string>   
  56.                 </test>                        
  57.                 <edit name="autohint">         
  58.                         <bool>true</bool>      
  59.                 </edit>                        
  60.         </match>                              

  61. <!--
  62.     TrueType Fonts which have high quality byte code interpreter
  63.     instructions can look very good in even in small sizes when using
  64.     the byte code interpreter (autohint=false). This is true         
  65.     both with and without anti-aliasing.                             
  66.     In black and white (antialias=false) the results when rendering  
  67.     with the byte code interpreter may even look as good as high quality
  68.     bitmap fonts.                                                      

  69.     On the other hand, some low quality TrueType Fonts do not have
  70.     byte code interpreter instructions at all or only very bad byte
  71.     code and may look better when the autohinter is used.         
  72.     (See "FreeSans" for example, it looks better with the         
  73.     autohinter which is especially obvious if anti-aliasing is off).
  74. -->                                                                 

  75.         <!--
  76.             Switch off the autohinter for TrueType fonts in order
  77.             to use the byte code interpreter.                    
  78.         -->                                                      

  79.         <match target="font">
  80.                 <test name="fontformat">
  81.                         <string>TrueType</string>
  82.                 </test>                          
  83.                 <edit name="autohint">           
  84.                         <bool>true</bool>        
  85.                 </edit>                          
  86.         </match>                                 

  87.         <!--
  88.             Switch on the autohinter for a few TrueType fonts which
  89.             have no byte code or very bad byte code and look better
  90.             with the autohinter:                                   

  91.             But see also bug #215602 for many fonts the autohinter
  92.             seriously distorts the metrics so badly that         
  93.             even the digits which should be monospaced are not   
  94.             monospaced at all anymore.                           

  95.             Because of this problem, better don't switch on
  96.             the autohinter for                             

  97.                Sazanami
  98.                IPA     
  99.                DejaVu Sans Light
  100.                DejaVu Sans Condensed
  101.                DejaVu Serif Condensed
  102.                FreeSans              
  103.                FreeSerif            
  104.                FreeMono              

  105.             and other fonts with similar problems until this is solved
  106.             in the autohinter.                                       
  107.         -->                                                           

  108.         <match target="font">
  109.                 <test name="fontformat">
  110.                         <string>TrueType</string>
  111.                 </test>                          
  112.                 <test name="family">            
  113.                         <string>Microsoft YaHei</string>
  114.                         <string>Vera Sans YuanTi</string>
  115.                         <string>Vera Sans YuanTi Mono</string>
  116.                         <string>MS PGothic</string>           
  117.                         <string>MS UI Gothic</string>         
  118.                         <string>MS Mincho</string>            
  119.                         <string>MS PMincho</string>           
  120.                         <string>HGPSoeiKakupoptai</string>   
  121.                         <string>HGSGothicE</string>           
  122.                         <string>HGSGothicM</string>           
  123.                         <string>HGKyokashotai</string>        
  124.                         <string>HGSSoeiKakugothicUB</string>  
  125.                         <string>HGPGothicB</string>           
  126.                         <string>HGPGothicE</string>           
  127.                         <string>HGPGothicM</string>           
  128.                         <string>HGSKyokashotai</string>      
  129.                         <string>HGMaruGothicMPRO</string>     
  130.                         <string>HGPSoeiKakugothicUB</string>  
  131.                         <string>HGMinchoL</string>            
  132.                         <string>HGPMinchoL</string>           
  133.                         <string>HGMinchoB</string>            
  134.                         <string>HGPMinchoB</string>           
  135.                         <string>HGSMinchoB</string>           
  136.                         <string>HGMinchoE</string>            
  137.                         <string>HGPMinchoE</string>           
  138.                         <string>HGSMinchoE</string>           
  139.                         <string>HGSoeiKakugothicUB</string>   
  140.                         <string>HGGyoshotai</string>         
  141.                         <string>HGPGyoshotai</string>         
  142.                         <string>HGSGyoshotai</string>         
  143.                         <string>HGSoeiKakupoptai</string>     
  144.                         <string>HGSSoeiPresenceEB</string>   
  145.                         <string>HGPSoeiPresenceEB</string>   
  146.                         <string>HGGothicB</string>            
  147.                         <string>HGGothicE</string>            
  148.                         <string>HGGothicM</string>            
  149.                         <string>HGSoeiPresenceEB</string>     
  150.                         <string>HGPKyokashotai</string>      
  151.                         <string>HGSSoeiKakupoptai</string>   
  152.                         <string>HGSeikaishotaiPRO</string>   
  153.                         <string>TLKyokashotai</string>        
  154.                         <string>TLMincho</string>            
  155.                         <string>TLPMincho</string>            
  156.                         <string>TLPGothic</string>            
  157.                         <string>TLPKyokashotai</string>      
  158.                         <string>TLMarugothicM</string>        
  159.                         <string>TLGyoshotai</string>         
  160.                         <string>TLPGyoshotai</string>         
  161.                         <string>TLSGyoshotai</string>         
  162.                         <string>TLPMarugothicM</string>      
  163.                         <string>TLSMarugothicM</string>      
  164.                         <string>TLSKyokashotai</string>      
  165.                         <string>TLGothic</string>            
  166.                 </test>                                       
  167.                 <edit name="autohint">                        
  168.                         <bool>true</bool>                     
  169.                 </edit>                                       
  170.         </match>                                             


  171.         <!--
  172.             The following rule sets up black and white rendering with
  173.             the byte code interpreter for a small list of fonts which
  174.             are known to have good byte code and give bitmap quality
  175.             results at small sizes.                                 
  176.             The pixelsize limit is set to '0' though, which effectively
  177.             disables this rule by default because most users don't like
  178.             that bitmap look and feel.                                 
  179.             If you like a bitmap look and feel of your desktop,        
  180.             copy this rule into your ~/.fonts.conf file and replace the '0'
  181.             with non-zero pixelsize limit. Using '18' as the pixelsize     
  182.             limit is a good choice if you have the fonts in this list installed
  183.             and like a bitmap look and feel.                                   
  184.         -->                                                                    
  185.         <match target="font">                                                  
  186.                 <test name="family">                                          
  187.                         <string>Microsoft YaHei</string>                       
  188.                         <string>Vera Sans YuanTi</string>                     
  189.                         <string>Vera Sans YuanTi Mono</string>                 
  190.                         <string>Andale Mono</string>                           
  191.                         <string>Arial</string>                                 
  192.                         <string>Comic Sans MS</string>                        
  193.                         <string>Georgia</string>                              
  194.                         <string>Impact</string>                                
  195.                         <string>Trebuchet MS</string>                          
  196.                         <string>Verdana</string>                              
  197.                         <string>Courier New</string>                           
  198.                         <string>Times New Roman</string>                       
  199.                         <string>Tahoma</string>                                
  200.                         <string>Webdings</string>                              
  201.                         <string>Albany AMT</string>                           
  202.                         <string>Thorndale AMT</string>                        
  203.                         <string>Cumberland AMT</string>                        
  204.                         <string>Andale Sans</string>                           
  205.                         <string>Andy MT</string>                              
  206.                         <string>Bell MT</string>                              
  207.                         <string>Monotype Sorts</string>                        
  208.                 </test>                                                        
  209.                 <test name="pixelsize" compare="less_eq">                     
  210.                                 <double>0</double>                             
  211.                 </test>                                                        
  212.                 <edit name="autohint">                                         
  213.                         <bool>true</bool>                                      
  214.                 </edit>                                                        
  215.                 <edit name="antialias">                                       
  216.                         <bool>true</bool>                                      
  217.                 </edit>                                                        
  218.         </match>                                                               


  219. <!--
  220.   Some CJK fonts require the byte code interpreter to be rendered correctly.

  221.   These are composite fonts which store components and composing information
  222.   and compose the glyphs on the fly using the hinting instructions.         

  223.   For all such fonts we switch off the autohinter here.
  224.   When "autohint" is set to "false", the byte code interpreter will
  225.   be used if it has been enabled at all when compiling freetype2.  

  226.   The Chinese fonts "MingLiu" and "PMingLiU" used to belong to the fonts
  227.   which absolutely require the byte code interpreter to be rendered     
  228.   correctly.                                                            
  229.   But apparently the new versions of "MingLiU" and "PMingLiU" from Windows
  230.   Vista are rendered correctly without the byte code interpreter.         

  231. -->

  232.         <match target="font">
  233.                 <test name="family">
  234.                         <string>Microsoft YaHei</string>
  235.                         <string>MingLiU</string>        
  236.                         <string>Vera Sans YuanTi</string>
  237.                         <string>Vera Sans YuanTi Mono</string>
  238.                         <string>PMingLiU</string>            
  239.                 </test>                                       
  240.                 <edit name="autohint">                        
  241.                         <bool>true</bool>                     
  242.                 </edit>                                       
  243.         </match>                                             

  244. <!--
  245. Hinting for CJK fonts in freetype doesn't yet work as well as for Latin fonts.

  246. Recently the autohinter in in freetype has been improved for CJK fonts
  247. a lot but it is still not perfect. Therefore one might want to switch
  248. off the autohinter for CJK fonts.

  249. This can be achieved by using the following rule:

  250.         <match target="font">
  251.                 <test name="lang" compare="contains">
  252.                         <string>ja</string>
  253.                         <string>zh</string>
  254.                         <string>ko</string>
  255.                 </test>
  256.                 <edit name="autohint">
  257.                         <bool>true</bool>
  258.                 </edit>
  259.         </match>
  260. -->

  261. <!--
  262. for some Bengali fonts (e.g. "Mukti Narrow"), the autohinter works well
  263. with the patch from http://www.kde.gr.jp/~akito/patch/freetype2/2.1.7
  264. applied. But for "Likhan" it still doesn't work that well
  265. (look how the "matra" lines at the top line up). Therefore, switch
  266. off the autohinter for the "Likhan" font:
  267. -->

  268.         <match target="font">
  269.                 <test name="family">
  270.                         <string>Likhan</string>
  271.                         <string>Microsoft YaHei</string>
  272.                         <string>Vera Sans YuanTi</string>
  273.                         <string>Vera Sans YuanTi Mono</string>
  274.                 </test>
  275.                 <edit name="autohint">
  276.                         <bool>true</bool>
  277.                 </edit>
  278.         </match>


  279. </fontconfig>
复制代码

本帖子中包含更多资源

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

x
回复 支持 反对

使用道具 举报

发表于 2008-10-8 22:31:13 | 显示全部楼层
这是因为yast之类的程序是由qt设置的,不是由kde控制中心设置。
qt字体以通过命令qtconfig设置,在终端下运行qtconfig,在Font选项卡中可以设置字体,Point size设置字体的大小,默认是6,所以造成yast程序的字体小而且虚,一般改成10就可以了。

注意:yast实际是由root用户允许的,所以设置yast的字体需要root用户执行qtconfig设置。
回复 支持 反对

使用道具 举报

发表于 2008-10-9 09:44:27 | 显示全部楼层
如下可改全局字体(包括非 qt 程序如 firefox 及 gimp):
$su
#vi /etc/fonts/suse-post-user.conf
在<family>serif</family>以及<family>sans-serif</family>中把你要用的字体排到第一位,在<family>monospace</family>中把你要用的等宽字体排到第一位
比如我的:(只加了两个雅黑,用的英文系统,故名字为Microsoft YaHei,米改等宽字体,貌似默认就用的dejavs sans momo)
        <alias>
                <family>serif</family>
                <prefer>
                        <family>Microsoft YaHei</family>
                        <family>Times New Roman</family>
                        <family>Thorndale AMT</family>
                        .......
                </prefer>
        </alias>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Microsoft YaHei</family>
                        <family>Arial</family>
                        <family>Albany AMT</family>
                        ......
                </prefer>
        </alias>
回复 支持 反对

使用道具 举报

发表于 2008-10-9 09:53:04 | 显示全部楼层
奇怪kde不把Vera Sans YuanTi Mono 列为等宽字体。gnome中则可以。
回复 支持 反对

使用道具 举报

发表于 2008-10-10 17:04:00 | 显示全部楼层
我碰到过几次是因为显卡驱动没装上
回复 支持 反对

使用道具 举报

发表于 2008-10-10 21:41:28 | 显示全部楼层
Post by nhadct;1891877
这是因为yast之类的程序是由qt设置的,不是由kde控制中心设置。
qt字体以通过命令qtconfig设置,在终端下运行qtconfig,在Font选项卡中可以设置字体,Point size设置字体的大小,默认是6,所以造成yast程序的字体小而且虚,一般改成10就可以了。

注意:yast实际是由root用户允许的,所以设置yast的字体需要root用户执行qtconfig设置。


应该是这样的!
回复 支持 反对

使用道具 举报

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

本版积分规则

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