LinuxSir.cn,穿越时空的Linuxsir!

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

彻底汉化mandrake91,步骤详细。

[复制链接]
发表于 2003-3-28 23:26:09 | 显示全部楼层 |阅读模式
这是我的汉化方法,很简单的,就像汉化rh8一样的。
(一)首先拉windows下的几个字体文件:simsun.ttc,tahoma.ttf,tahomabd.ttf放入一个目录里如(/home/font),建立如下一个文本文件fonts.dir

63
simsun.ttc -misc-fixed-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
simsun.ttc -misc-simsun-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.2:simsun.ttc -misc-simsun-medium-o-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.4:simsun.ttc -misc-simsun-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0
ab=y:simsun.ttc -misc-simsun-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.2:ab=y:simsun.ttc -misc-simsun-bold-o-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.4:ab=y:simsun.ttc -misc-simsun-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0
sw=1:bw=0.5:simsun.ttc -misc-simsun-medium-r-normal--0-0-0-0-c-0-iso8859-1
ab=y:sw=1:bw=0.5:simsun.ttc -misc-simsun-bold-r-normal--0-0-0-0-c-0-iso8859-1
ai=0.2:sw=1:bw=0.5:simsun.ttc -misc-simsun-medium-o-normal--0-0-0-0-c-0-iso8859-1
ai=0.4:sw=1:bw=0.5:simsun.ttc -misc-simsun-medium-i-normal--0-0-0-0-c-0-iso8859-1
ai=0.2:ab=y:sw=1:bw=0.5:simsun.ttc -misc-simsun-bold-o-normal--0-0-0-0-c-0-iso8859-1
ai=0.4:ab=y:sw=1:bw=0.5:simsun.ttc -misc-simsun-bold-i-normal--0-0-0-0-c-0-iso8859-1
ai=-0.2:sw=1:bw=0.5:simsun.ttc -misc-simsun-medium-ro-normal--0-0-0-0-c-0-iso8859-1
ai=-0.4:sw=1:bw=0.5:simsun.ttc -misc-simsun-medium-ri-normal--0-0-0-0-c-0-iso8859-1
ai=-0.2:ab=y:sw=1:bw=0.5:simsun.ttc -misc-simsun-bold-ro-normal--0-0-0-0-c-0-iso8859-1
ai=-0.4:ab=y:sw=1:bw=0.5:simsun.ttc -misc-simsun-bold-ri-normal--0-0-0-0-c-0-iso8859-1
ai=-0.4:simsun.ttc -misc-simsun-medium-ri-normal--0-0-0-0-c-0-gb2312.1980-0
ai=-0.4:ab=y:simsun.ttc -misc-simsun-bold-ri-normal--0-0-0-0-c-0-gb2312.1980-0
ai=-0.2:simsun.ttc -misc-simsun-medium-ro-normal--0-0-0-0-c-0-gb2312.1980-0
ai=-0.2:ab=y:simsun.ttc -misc-simsun-bold-ro-normal--0-0-0-0-c-0-gb2312.1980-0
simsun.ttc -misc-simsun-medium-r-normal--0-0-0-0-c-0-gbk-0
ai=0.2:simsun.ttc -misc-simsun-medium-o-normal--0-0-0-0-c-0-gbk-0
ai=0.4:simsun.ttc -misc-simsun-medium-i-normal--0-0-0-0-c-0-gbk-0
ab=y:simsun.ttc -misc-simsun-bold-r-normal--0-0-0-0-c-0-gbk-0
ai=0.2:ab=y:simsun.ttc -misc-simsun-bold-o-normal--0-0-0-0-c-0-gbk-0
ai=0.4:ab=y:simsun.ttc -misc-simsun-bold-i-normal--0-0-0-0-c-0-gbk-0
ai=-0.4:simsun.ttc -misc-simsun-medium-ri-normal--0-0-0-0-c-0-gbk-0
ai=-0.4:ab=y:simsun.ttc -misc-simsun-bold-ri-normal--0-0-0-0-c-0-gbk-0
ai=-0.2:simsun.ttc -misc-simsun-medium-ro-normal--0-0-0-0-c-0-gbk-0
ai=-0.2:ab=y:simsun.ttc -misc-simsun-bold-ro-normal--0-0-0-0-c-0-gbk-0
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-koi8-u
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-koi8-r
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-16
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-15
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-14
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-13
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-10
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-9
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-8
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-7
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-6
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-5
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-4
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-3
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-2
tahoma.ttf -microsoft-Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-1
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-koi8-u
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-koi8-r
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-16
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-15
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-14
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-13
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-10
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-9
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-8
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-7
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-6
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-5
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-4
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-3
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-2
tahomabd.ttf -microsoft-Tahoma-bold-r-normal--0-0-0-0-p-0-iso8859-1

将其cp成fonts.scale,注意是cp,不是mv.
 楼主| 发表于 2003-3-28 23:27:22 | 显示全部楼层

续上贴:

(二)建立fonts.conf文本文件:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts.conf file to configure system font access -->
<fontconfig>

<!--
        The intent of this standard configuration file is to be adequate for
        most environments.  If you have a reasonably normal environment and
        have found problems with this configuration, they are probably
        things that others will also want fixed.  Please send any suggested
        changes to fonts@xfree86.org so that future releases can include
        such changes.

        Keith Packard
-->

<!-- Font directory list configured on Mon Sep  9 15:24:30 EDT 2002 -->

        <dir>/home/font</dir>
        <dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
        <dir>/home/OtherFont</dir>
        <dir>~/.fonts</dir>

<!--
  Enable sub-pixel rendering
        <match target="font">
                <edit name="rgba" mode="assign"><const>rgb</const></edit>
        </match>
-->
<match target="font">
<test qual="any" name="pixelsize" compare="less"><double>17</double></test>
<edit name="antialias" mode="assign"><bool>false</bool></edit>
</match>
<!--
  Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
        <match target="pattern">
                <test qual="any" name="family">
                        <string>mono</string>
                </test>
                <edit name="family" mode="assign">
                        <string>monospace</string>
                </edit>
        </match>

<!--
  Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
        <match target="pattern">
                <test qual="any" name="family">
                        <string>sans serif</string>
                </test>
                <edit name="family" mode="assign">
                        <string>sans-serif</string>
                </edit>
        </match>

<!--
  Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
        <match target="pattern">
                <test qual="any" name="family">
                        <string>sans</string>
                </test>
                <edit name="family" mode="assign">
                        <string>sans-serif</string>
                </edit>
        </match>

<!--
  Mark common families with their generics so we'll get
  something reasonable
-->

<!--
  Serif faces
-->
        <alias>
                <family>Tahoma</family>
                <family>Simsun</family>
                <family>Times</family>
                <family>Times New Roman</family>
                <family>Nimbus Roman No9 L</family>
                <family>Luxi Serif</family>
                <family>Kochi Mincho</family>
                <family>AR PL SungtiL GB</family>
                <family>AR PL Mingti2L Big5</family>
                <family>Baekmuk Batang</family>                       
                <default><family>serif</family></default>
        </alias>
<!--
  Sans-serif faces
-->
        <alias>
                <family>Tahoma</family>
                <family>SimSun</family>
                <family>Helvetica</family>
                <family>Arial</family>
                <family>Verdana</family>
                <family>Nimbus Sans L</family>
                <family>Luxi Sans</family>
                <family>Kochi Gothic</family>
                <family>AR PL KaitiM GB</family>
                <family>AR PL KaitiM Big5</family>
                <family>Baekmuk Dotum</family>
                <default><family>sans-serif</family></default>
        </alias>
<!--
  Monospace faces
-->
        <alias>
                <family>Tahoma</family>
                <family>NSimSun</family>
                <family>Courier</family>
                <family>Courier New</family>
                <family>Andale Mono</family>
                <family>Luxi Mono</family>
                <family>Nimbus Mono L</family>
                <default><family>monospace</family></default>
        </alias>
<!--
  If the font still has no generic name, add sans-serif
-->
        <match target="pattern">
                <test qual="all" name="family" compare="not_eq">
                        <string>sans-serif</string>
                </test>
                <test qual="all" name="family" compare="not_eq">
                        <string>serif</string>
                </test>
                <test qual="all" name="family" compare="not_eq">
                        <string>monospace</string>
                </test>
                <edit name="family" mode="append_last">
                        <string>sans-serif</string>
                </edit>
        </match>

<!--
  Load per-user customization file
-->
        <include ignore_missing="yes">~/.fonts.conf</include>

<!--
  Load local system customization file
-->
        <include ignore_missing="yes">local.conf</include>

<!--
  Alias well known font names to available TrueType fonts
-->
        <alias>
                <family>Times</family>
                <accept><family>Times New Roman</family></accept>
        </alias>
        <alias>
                <family>Helvetica</family>
                <accept><family>Verdana</family></accept>
        </alias>
        <alias>
                <family>Arial</family>
                <accept><family>Verdana</family></accept>
        </alias>
        <alias>
                <family>Courier</family>
                <accept><family>Courier New</family></accept>
        </alias>

<!--
  Provide required aliases for standard names
-->
        <alias>
                <family>serif</family>
                <prefer>
                        <family>Tahoma</family>
                        <family>Simsun</family>
                        <family>Nimbus Roman No9 L</family>
                        <family>Luxi Serif</family>
                        <family>Kochi Mincho</family>
                        <family>ZYSong18030</family>
                        <family>AR PL SungtiL GB</family>
                        <family>AR PL Mingti2L Big5</family>
                        <family>Baekmuk Batang</family>                       
                        <family>Times New Roman</family>
                        <family>Times</family>
                </prefer>
        </alias>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Tahoma</family>
                        <family>SimSun</family>
                        <family>Luxi Sans</family>
                        <family>Nimbus Sans L</family>
                        <family>Helvetica</family>
                        <family>Kochi Gothic</family>
                        <family>ZYSong18030</family>
                        <family>AR PL SungtiL GB</family>
                        <family>AR PL Mingti2L Big5</family>
                        <family>Baekmuk Gulim</family>
                        <family>Verdana</family>
                        <family>Arial</family>
               
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>Tahoma</family>
                        <family>Simsun</family>
                        <family>Luxi Mono</family>
                        <family>Nimbus Mono L</family>
                        <family>Kochi Gothic</family>
                        <family>ZYSong18030</family>
                        <family>AR PL SungtiL GB</family>
                        <family>AR PL Mingti2L Big5</family>
                        <family>Baekmuk Gulim</family>
                        <family>Andale Mono</family>
                        <family>Courier New</family>
                </prefer>
        </alias>

<!--
We can't hint CJK fonts well, so turn off hinting for CJK fonts.
-->

        <match target="font">
                <test name="lang" compare="contains">
                        <string>ja</string>
                </test>
                <edit name="hinting" mode="assign">
                        <bool>false</bool>
                </edit>
                <!-- the rh_prefer_bitmaps options (a nonstandard
                     Red Hat extension), controls whether embedded
                     bitmaps, when available are preferred
                     to antialiased rendering. For Japanese,
                     we prefer antialiased rendering -->
                <edit name="rh_prefer_bitmaps" mode="assign">
                        <bool>false</bool>
                </edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains">
                        <string>ko</string>
                </test>
                <edit name="hinting" mode="assign">
                        <bool>false</bool>
                </edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains">
                        <string>zh</string>
                </test>
                <edit name="hinting" mode="assign">
                        <bool>true</bool>
                </edit>
        </match>

<!--
Artificial oblique for fonts without an italic or oblique version
-->

        <match target="font">
                <!-- check to see if the font is roman -->
                <test name="slant">
                        <const>roman</const>
                </test>
                <!-- check to see if the pattern requested non-roman -->
                <test target="pattern" name="slant" compare="not_eq">
                        <const>roman</const>
                </test>
                <!-- multiply the matrix to slant the font -->
                <edit name="matrix" mode="assign">
                        <times>
                                <name>matrix</name>
                                <matrix><double>1</double><double>.2</double>
                                        <double>0</double><double>1</double>
                                </matrix>
                        </times>
                </edit>
                <!-- pretend the font is oblique now -->
                <edit name="slant" mode="assign">
                        <const>oblique</const>
                </edit>
        </match>

        <config>
<!--
  These are the default Unicode chars that are expected to be blank
  in fonts.  All other blank chars are assumed to be broken and
  won't appear in the resulting charsets
-->
                <blank>
                        <int>0x20</int>                <!-- space -->
                        <int>0xa0</int>                <!-- nsbp  -->
                        <int>0x2000</int>        <!-- general punctuation spaces -->
                        <int>0x2001</int>
                        <int>0x2002</int>
                        <int>0x2003</int>
                        <int>0x2004</int>
                        <int>0x2005</int>
                        <int>0x2005</int>
                        <int>0x2006</int>
                        <int>0x2007</int>
                        <int>0x2008</int>
                        <int>0x2009</int>
                        <int>0x200a</int>
                        <int>0x200b</int>
                        <int>0x3000</int>        <!-- CJK space -->
                </blank>
<!--
  Rescan configuration every 30 seconds when FcFontSetList is called
-->
                <rescan>
                        <int>30</int>
                </rescan>
        </config>

</fontconfig>

将该文件cp到/etc/fonts/中(最好先备份原件/etc/fonts/fonts.conf)
 楼主| 发表于 2003-3-28 23:28:12 | 显示全部楼层

续上贴:

(三)建立gtkrc.zh_CN文本文件

style "gtk-default-zh-cn" {
fontset = "-misc-simsun-medium-r-normal--13-*-*-*-*-*-gb2312.1980-0,
-*-*-medium-r-normal--13-*-*-*-*-*-gb2312.1980-0,*-r-*"

}
class "GtkWidget" style "gtk-default-zh-cn"

将该文件cp到/etc/gtk/中(备份/etc/gtk/gtkrc.zh_CN)

(四)最后一步,也就是最关键的一步:
www.linuxfans.org下载freetype- ... ls-2.1.2-6.i386.rpm
执行rpm -Uvh --nodeps --force freetype*
这一步并没有完成所汉化工作,只是安装了xft2,装了以后并不能立即有效,必须进入/usr/lib目录,进行一些修改,这就是为什么汉化不起效果的原因了。
不多说,将汉化进行到底!!!
在安装完freetype-2.1.2-6(到www.linuxfans.org下载)后,进入/usr/lib,你会发现libfreetype.so和libfreetype.so.6都指向libfreetype.so.6.3.2,而且还有一个文件就是libfreetype.so.6.3.1(我想这个就是freetype-2.1.2-6安装的文件),于是只要把这两个软链接指向libfreetype.so.6.3.1就行了.

现在美化大至完成了,至于一些小问题,我想大家比我懂得多,哈。。。。也不用我说了吧。

==============================================================================
这是我用Redhat linux 8.0 方法进行的汉化,抄了许多的文章,现在感谢他们为大家所作的努力,谢谢。
 楼主| 发表于 2003-3-28 23:35:23 | 显示全部楼层

哦,忘了,还得加上一些设置:

进入/etc/X11,
修改XFree86Config-4,
在LoadModule段注释掉Load freetype和Load type1,加入Load "xtt".
在FontPath段加入你的字体路径。

还有,在fonts.conf中, 在
<!-- Font directory list configured on Mon Sep  9 15:24:30 EDT 2002 -->

        <dir>/home/font</dir>         #你的字体路径!!!!
        <dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
        <dir>/home/OtherFont</dir>
        <dir>~/.fonts</dir>

<!--
的地方加入你的字体路径!!!
发表于 2003-3-29 00:23:58 | 显示全部楼层
贴个图出来看看!
 楼主| 发表于 2003-3-29 00:58:32 | 显示全部楼层

好,这就回贴,请多多指教。

好啊。
 楼主| 发表于 2003-3-29 01:00:56 | 显示全部楼层

第二张

第二张
 楼主| 发表于 2003-3-29 01:13:54 | 显示全部楼层

输入法我也是硬来装的,


直接安装小企E输入法是不能显示的,要修改一个文件:/etc/X11/xinit/xinitrc

在exec /etc/X11/Xsession $* 之前加入
exec /usr/bin/fcitx &

也就是如下形式:
exec /usr/bin/fcitx &
exec /etc/X11/Xsession $*

这样就能用了。:rolleyes:
发表于 2003-3-29 01:22:40 | 显示全部楼层
楼上的兄弟给个改完以后的截图谢谢~~
我装了不能用
说少设那么签名还有终端里说GBK不支持?
在那里改啊?
发表于 2003-3-29 01:31:37 | 显示全部楼层
我重装系统了
一会见,我不想再出差错了~
系统崩溃N次了
我也崩溃了~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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