LinuxSir.cn,穿越时空的Linuxsir!

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

大家帮忙看看KDE下字体Gnome字体怎么调啊

[复制链接]
发表于 2009-3-30 19:15:55 | 显示全部楼层 |阅读模式
大家看看,这个gnome程序的字体怎么才能调过来啊,Firefox的字体又正常,已经在启动里添加了gnome-settings-daemon,但是还是这样

本帖子中包含更多资源

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

x
发表于 2009-3-30 20:09:44 | 显示全部楼层
方法1、如果你已经安装了gnome,那么在gnome里调好,然后在kde里运行gnome-settings-daemon

方法2:安装gtk-engines-XXXX
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-30 20:55:39 | 显示全部楼层
Post by yourfriend;1967679
方法1、如果你已经安装了gnome,那么在gnome里调好,然后在kde里运行gnome-settings-daemon

方法2:安装gtk-engines-XXXX

已经运行了gnome-settings-daemon,但还是这个情况 ,其它地方的字体都正常,Firefox的字体也正常就是GTK程序的菜单字体
回复 支持 反对

使用道具 举报

发表于 2009-3-31 11:17:40 | 显示全部楼层
[color="Red"]我的方法可以改变整个系统的字体,不论哪个桌面,帖子长,我分开发了~~

修改5个文件:
在/etc/fonts里找到suse-post-user.conf、suse-pre-user.conf

修改:(我的那个文件里面的样子,我不会描述~~就是有写“华文中送”的地方,你可以用别的字体)
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>


<!--
   Bugzilla #52167 and bugzilla #246804:
   Some fonts like "Luxi Mono", and "Nimbus Mono L"
   which are intended to be monospace are not detected as
   monospace because they have a few glyphs with wrong width.
   That is of course a bug in the fonts but this is difficult
   to fix and sometimes even impossible because of license reasons.
   For most purposes it is useful to force these fonts to be
   detected as monospace because it doesn't matter much if only
   a handful of rarely used glyphs has the wrong width.
-->

<match target="scan" >
  <test compare="contains" name="family" >
   <string>Luxi Mono</string>
   <string>Nimbus Mono L</string>
  </test>
  <edit mode="assign_replace" name="spacing">
   <const>mono</const>
  </edit>
</match>

<!--
  The dual-width Asian fonts (spacing=dual) are not rendered correctly,
  apparently Xft forces all widths to match. Trying to disable the
  width forcing code by setting globaladvance=false alone doesn't  help.
  As a brute force workaround, also set spacing=proportional, i.e. handle
  them as proportional fonts:
-->

        <match target="font">
                <test name="lang" compare="contains">
                        <string>ja</string>
                        <string>zh</string>
                        <string>ko</string>
                </test>
                <test name="spacing" compare="eq">
                        <const>dual</const>
                </test>
                <edit name="spacing">
                        <const>proportional</const>
                </edit>
                <edit name="globaladvance" binding="strong">
                        <bool>false</bool>
                </edit>
        </match>

<!--
  There is a similar problem with dual width bitmap fonts. They don't
  have spacing=dual, therefore they are not handled by the above rule
  and still display as charcell fonts. For example "Efont Biwidth"
  has spacing=mono and "Misc Fixed Wide" has spacing=charcell.
  Force handling of these fonts as proportional fonts as well:
-->

        <match target="font">
                <test name="lang" compare="contains">
                        <string>ja</string>
                        <string>zh</string>
                        <string>ko</string>
                </test>
                <test name="outline" compare="eq">
                        <bool>false</bool>
                </test>
                <test name="spacing" compare="eq">
                        <const>mono</const>
                        <const>charcell</const>
                </test>
                <edit name="spacing">
                        <const>proportional</const>
                </edit>
                <edit name="globaladvance" binding="strong">
                        <bool>false</bool>
                </edit>
        </match>

<!-- ************************************************************ -->
<!-- Font replacements and fallbacks                              -->
<!-- ************************************************************ -->

<!--
  The SUSE fonts have been dropped from SuSE Linux >= 10.1 in
  favour of the DejaVu fonts. All extensions the SUSE fonts had
  over the original Bitstream fonts have already been merged into the
  DejaVu fonts and the DejaVu fonts contain many glyphs not in
  the SUSE fonts. Therefore there is no reason to use the SUSE
  fonts anymore.

  As old config files or documents users might still refer to the SUSE
  fonts, we add rules here to use the DejaVu fonts as a replacement
  if the SUSE fonts are missing (The SUSE fonts are still used
  if they are still available for best compatibility).

  The style=Roman used in the SUSE and the original "Bitstream Vera"
  fonts has been renamed into style=Book in the DejaVu fonts,
  therefore some extra rules are needed.

-->

        <match target="pattern">
                <test name="family">
                        <string>SUSE Sans</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>华文中宋</string>
                        <string>DejaVu Sans</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Sans</string>
                </test>
                <test name="style">
                        <string>Roman</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>华文中宋</string>
                        <string>DejaVu Sans</string>
                </edit>
                <edit name="style" mode="append" binding="same">
                        <string>Book</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Sans Mono</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>华文中宋</string>
                        <string>DejaVu Sans Mono</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Sans Mono</string>
                </test>
                <test name="style">
                        <string>Roman</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>华文中宋</string>
                        <string>DejaVu Sans Mono</string>
                </edit>
                <edit name="style" mode="append" binding="same">
                        <string>Book</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Serif</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>华文中宋</string>
                        <string>DejaVu Serif</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="family">
                        <string>SUSE Serif</string>
                </test>
                <test name="style">
                        <string>Roman</string>
                </test>
                <edit name="family" mode="append" binding="same">
                        <string>华文中宋</string>
                        <string>DejaVu Serif</string>
                </edit>
                <edit name="style" mode="append" binding="same">
                        <string>Book</string>
                </edit>
        </match>

<!--
  If the original Adobe "Symbol" font is not available, use
  the URW font "Standard Symbols L" or the font "OpenSymbol" coming
  with OpenOffice as a replacement. The last font appended in this
  rule will win.
  (needed for Mozilla/Firefox to display symbols correctly).
  
-->

        <match target="pattern">
                <test name="family">
                        <string>symbol</string>
                </test>
                <edit name="family" mode="append" binding="strong">
                        <string>OpenSymbol</string>
                </edit>
                <edit name="family" mode="append" binding="strong">
                        <string>Standard Symbols L</string>
                </edit>
        </match>

<!--
  Use  "Misc Console" (or "Misc Console Wide") instead of "console"
  (needed to make the menu entry labelled "Linux" in the font menu of
  KDE's konsole choose the same font as it used to).
-->
        <match target="pattern">
                <test name="family">
                        <string>console</string>
                </test>
                <edit name="family" mode="prepend" binding="strong">
                        <string>Misc Console</string>
                </edit>
                <edit name="family" mode="prepend" binding="strong">
                        <string>Misc Console Wide</string>
                </edit>
        </match>

<!-- ************************************************************ -->
<!-- Blacklisting fonts which cannot work                         -->
<!-- ************************************************************ -->

<!--
    the Hershey-Fonts from ghostscript-fonts-other.rpm are so called
    "Stroke" fonts which are currently not supported by Freetype
-->

        <selectfont>
                <rejectfont>
                        <pattern>
                                <patelt name="family">
                                        <string>Hershey-Gothic-English</string>
                                </patelt>
                        </pattern>
                        <pattern>
                                <patelt name="family">
                                        <string>Hershey-Plain-Duplex</string>
                                </patelt>
                        </pattern>
                        <pattern>
                                <patelt name="family">
                                        <string>Hershey-Plain-Duplex-Italic</string>
                                </patelt>
                        </pattern>
                        <pattern>
                                <patelt name="family">
                                        <string>Hershey-Plain-Triplex</string>
                                </patelt>
                        </pattern>
                        <pattern>
                                <patelt name="family">
                                        <string>Hershey-Plain-Triplex-Italic</string>
                                </patelt>
                        </pattern>
                        <pattern>
                                <patelt name="family">
                                        <string>Hershey-Script-Simplex</string>
                                </patelt>
                        </pattern>
                        <pattern>
                                <patelt name="family">
                                        <string>Hershey-Script-Complex</string>
                                </patelt>
                        </pattern>
                        <pattern>
                                <patelt name="family">
                                        <string>Hershey-Gothic-German</string>
                                </patelt>
                        </pattern>
                        <pattern>
                                <patelt name="family">
                                        <string>Hershey-Gothic-Italian</string>
                                </patelt>
                        </pattern>
                </rejectfont>
        </selectfont>

<!--
    CID keyed fonts don't work (yet) with freetype2
-->

        <selectfont>
         <rejectfont>
           <pattern>
            <patelt name="fontformat">
              <string>CID Type 1</string>
            </patelt>
           </pattern>
         </rejectfont>
        </selectfont>

<!--
    Windows fonts with the .fon extension don't work with Xft2
    (such fonts are in the "wine" package).
-->

        <selectfont>
         <rejectfont>
           <glob>*.fon</glob>
         </rejectfont>
        </selectfont>

<!-- BDF fonts don't work with Xft2 -->

        <selectfont>
         <rejectfont>
           <glob>*.bdf</glob>
         </rejectfont>
        </selectfont>

<!-- Accept bitmap fonts -->

        <selectfont>
         <acceptfont>
          <pattern>
           <patelt name="scalable">
            <bool>false</bool>
           </patelt>
          </pattern>
         </acceptfont>
        </selectfont>

<!-- ************************************************************ -->
<!-- Hinting and antialiasing                                     -->
<!-- ************************************************************ -->

        <include ignore_missing="yes">/etc/fonts/suse-hinting.conf</include>

<!-- ************************************************************ -->
<!-- Bitmap related stuff                                         -->
<!-- ************************************************************ -->

        <include ignore_missing="yes">/etc/fonts/suse-bitmaps.conf</include>

</fontconfig>
回复 支持 反对

使用道具 举报

发表于 2009-3-31 11:21:55 | 显示全部楼层
在/etc/fonts/conf.avail里找到 40-nonlatin.conf、45-latin.conf、49-sansserif.conf

类似这样:在每个前面都加自己想要的字体,我的是<family>STZhongsong</family>,还是华文中宋
[color="Red"]总之就是加几个<string>和<family>
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
  Mark common families with their generics so we'll get
  something reasonable
-->

<!--
  Serif faces
-->
        <alias>
                <family>STZhongsong</family>
                <family>Nazli</family>
                <family>Lotoos</family>
                <family>Mitra</family>
                <family>Ferdosi</family>
                <family>Badr</family>
                <family>Zar</family>
                <family>Titr</family>
                <family>Jadid</family>
                <family>Kochi Mincho</family>
                <family>AR PL SungtiL GB</family>
                <family>AR PL Mingti2L Big5</family>
                <family>MS 明朝</family>
                <family>UnBatang</family>
                <family>Baekmuk Batang</family>
                <family>SimSun</family>
                <family>MgOpen Canonica</family>
                <family>Sazanami Mincho</family>
                <family>AR PL ZenKai Uni</family>
                <family>ZYSong18030</family>
                <family>FreeSerif</family>
                <default><family>serif</family></default>
        </alias>
<!--
  Sans-serif faces
-->
        <alias>
                <family>STZhongsong</family>
                <family>Arshia</family>
                <family>Elham</family>
                <family>Farnaz</family>
                <family>Nasim</family>
                <family>Sina</family>
                <family>Roya</family>
                <family>Koodak</family>
                <family>Terafik</family>
                <family>Kochi Gothic</family>
                <family>AR PL KaitiM GB</family>
                <family>AR PL KaitiM Big5</family>
                <family>MS ゴシック</family>
                <family>UnDotum</family>
                <family>Baekmuk Dotum</family>
                <family>MgOpen Modata</family>
                <family>Sazanami Gothic</family>
                <family>AR PL ShanHeiSun Uni</family>
                <family>ZYSong18030</family>
                <family>FreeSans</family>
                <default><family>sans-serif</family></default>
        </alias>
<!--
  Monospace faces
-->
        <alias>
                <family>STZhongsong</family>
                <family>NSimSun</family>
                <family>ZYSong18030</family>
                <family>FreeMono</family>
                <default><family>monospace</family></default>
        </alias>

<!--
  Fantasy faces
-->
        <alias>
                <family>STZhongsong</family>
                <family>Homa</family>
                <family>Kamran</family>
                <family>Fantezi</family>
                <family>Tabassom</family>
                <default><family>fantasy</family></default>
        </alias>

<!--
  Cursive faces
-->
        <alias>
                <family>STZhongsong</family>
                <family>IranNastaliq</family>
                <family>Nafees Nastaleeq</family>
                <default><family>cursive</family></default>
        </alias>

</fontconfig>
回复 支持 反对

使用道具 举报

发表于 2009-3-31 11:24:42 | 显示全部楼层
我是看别人的帖子后试验出来的

具体每个作什么用我不知道,大概都是一些替代吧~~

我整个系统字体都成了华文中宋
ps:openoffice里面字体还是正常的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-31 13:31:08 | 显示全部楼层
那KDE下的字体也成了修改的字体了吗?KDE的字体我觉得还可以看,只是GTK程序的菜单字体太难看了
回复 支持 反对

使用道具 举报

发表于 2009-3-31 13:46:11 | 显示全部楼层
在kde的系统设置里应该是可以再改

不过等宽字应该不行吧~

或者你改的时候在Monospace那里不作修改应该可以
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-31 15:39:21 | 显示全部楼层
那我先试试看
回复 支持 反对

使用道具 举报

发表于 2009-3-31 16:06:00 | 显示全部楼层
楼主,你的图标用的是什么主题包的?那里有得下?
回复 支持 反对

使用道具 举报

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

本版积分规则

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