字体完美文字(包括netscape,mozilla)
给大家提供一个美化字体的方法,正是我现在在用的,可以毫不谦虚的说,在我的系统(rh9)上,用这个方法已经使字体显示达到了完美的程度。首先是字体文件:simsun.ttf可以从windows系统里得到。把它放到/usr/share/fonts/zh_CN/TrueType/目录下面,或者放到~/.fonts下面也行。然后在它所在的目录下运行:ttmkfdir -o fonts.dir生成fonts.dir文件。
然后是几个配置文件:
1. /etc/fonts/fonts.conf:
2. /etc/gtk/gtkrc.zh_CN
3. /etc/gnome/gtkrc.zh_CN
4. 在/etc/X11/XF86Config中加入:
FontPath "/usr/share/fonts/zh_CN/TrueType"
由于文件太长,我把这三个文件在这篇帖子的附件里,大家可以下载回去看。
完成上面几步的配置后,就是在桌面环境中(gnome 或 KDE)里面调整字体了。
要想得到完美的中文和英文的显示效果,最好把字体选为:Courier 10 pich 字号为9号。不必取消字体抗锯齿。
接下来,我们要使netscape和mozilla里的网页显示效果也达到完善,就只需要在
netscape 或mozilla的菜单里:Edit->Preferences...下的Apperence中的Fonts里面作如下调整:
Font for :Simplified Chinese
Proportional: Sans Serif12
Serif: misc-simsun-gbk-0
Sans-serif: misc-simsun-gbk-0
Cursive: misc-simsun-gbk-0
.........
其它的都这一样的。
字体大小都是12
改完后,最后重启一下XWindow
这样就行了。
(各配置文件在本文的附件里)
********************************
最后,提醒大家注意,在改系统设置的时候,一定记得备份以前的配置文件。
如果有什么疑问,可以给我回帖。 呵呵,真是毫不谦虚啊
粗体呢?斜体呢?AA字体发虚呢? 给截图,大家共赏 文件咋的解不开呢?
[****@cathayan ****]$ tar xvzf config.tar.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Error exit delayed from previous errors
还是给贴图吧 没有贴张图上来谁知道好不好看!
好的,给点截图给大家看看
刚才lucida提得好,这个方案不能说是完美,只能说是非常美观了。最明显的地方是对gtk-1的程序,中文字体不再是黑黑的一团,而是清晰漂亮的9号宋体字。给大家一些图看。在附件里。
不好意思,我的桌面800*600,图看上去有点挤
对了,请lucida指教,怎么做到你说的效果。谢谢! 文件咋的解不开呢?
[****@cathayan ****]$ tar xvzf config.tar.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Error exit delayed from previous errors
还是给贴图吧
config.tar.gz我试过了:
**************************************************************
$ tar zxvf config.tar.gz
config/
config/fonts.conf
config/gtkrc.zh_CN
config/XF86Config
config/gtkrc.zh_CN_Put_This_One_In_etc_gtk_And_rename_it_to_gtkrc.zh_CN
config/readme
***************************************************************
没问题的,看看你是不是下载的有问题。我的文件大小是:4.9K
这样查看的:
$ ll -h config.tar.gz
-rw-rw-r-- 1 wanghi wanghi 4.9K5月 16 21:45 config.tar.gz 效果不错!不过没粗体啊,能有粗体就更完美了。 很喜欢你的桌面字体,请问,是什么字型啊?
Desktop font uploaded
很喜欢你的桌面字体,请问,是什么字型啊?You can download it if you like it.:) 8) 字体效果很多人已经做到了.不过你的桌面整体效果很好看. 我的桌面,不过是颇早以前的截图了 :-)
here...
btw,字体这东西见仁见智,谁也不敢说自己的就完美了。
对啊
我的桌面,不过是颇早以前的截图了 :-)here...
btw,字体这东西见仁见智,谁也不敢说自己的就完美了。
现在我也觉得是这样的,有人觉得AA字体效果很好看,但我偏觉得太模糊。每个人的审美观不同,说完美只能是对自己的感受来说 ,BTW,说得夸张一点,可以吸引眼球:) 不行啊,那个附件不能解压缩,能不能重新提供 ****************************
/etc/fonts/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 [email protected] so that future releases can include
such changes.
Keith Packard
-->
<!-- Font directory list configured on Mon Sep9 15:24:30 EDT 2002 -->
<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
<dir>/usr/share/fonts</dir>
<dir>~/.fonts</dir>
<dir>/usr/share/fonts/zh_CN/TrueType</dir>
<!--
Enable sub-pixel rendering
<match target="font">
<edit name="rgba" mode="assign"><const>rgb</const></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>SimSun</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>SimSun</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>SimSun</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>Courier</string>
</test>
<edit name="family" mode="assign">
<string>SimSun</string>
</edit>
</match>
<!--
Mark common families with their generics so we'll get
something reasonable
-->
<!--
Serif faces
-->
<alias>
<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>
<alias>
<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>
<family>SimSun</family>
<default><family>Courier New</family></default>
</alias>
<!--
Sans-serif faces
-->
<alias>
<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>
<family>SimSun</family>
<default><family>sans-serif</family></default>
</alias>
<!--
Monospace faces
-->
<alias>
<family>Courier</family>
<family>Courier New</family>
<family>Andale Mono</family>
<family>Luxi Mono</family>
<family>Nimbus Mono L</family>
<family>NSimSun</family>
<default><family>monospace</family></default>
</alias>
<alias>
<family>Courier</family>
<family>Courier New</family>
<family>Andale Mono</family>
<family>Luxi Mono</family>
<family>Nimbus Mono L</family>
<family>NSimSun</family>
<default><family>Courier New</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>SimSun</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>SimSun</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>SimSun</string>
</test>
<edit name="family" mode="append_last">
<string>SimSun</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>Courier</family>
<prefer><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>serif</family>
<prefer><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>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>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>
<alias>
<family>Courier</family>
<prefer>
<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>
<alias>
<family>Courier New</family>
<prefer>
<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>false</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>
*********************************
/etc/gtk/gtkrc.zh_CN
*********************************
# $(datadir)/gtkrc.zh_CN
#
# This file defines the fontsets for Chinese language (zh) using
# the simplified chinese standard GuoBiao as in mainland China (CN)
#
# 1999, Pablo Saratxaga <[email protected]>
style "GnomeScores_CurrentPlayer_style"
{
fg = {1.0, 0.0, 0.0}
}
style "GnomeScores_Logo_style"
{
fontset = "-misc-fixed-medium-r-normal--12-*-*-*-*-*-gb2312.1980-0"
fg = {0.0, 0.0, 1.0}
}
style "GnomeAbout_DrawingArea_style"
{
bg = {1.0, 1.0, 1.0}
}
style "GnomeAbout_Title_style"
{
fontset = "-misc-fixed-medium-r-normal--12-*-*-*-*-*-gb2312.1980-0"
}
style "GnomeAbout_Copyright_style"
{
fontset = "-misc-fixed-medium-r-normal--12-*-*-*-*-*-gb2312.1980-0"
}
style "GnomeAbout_Author_style"
{
fontset = "-misc-fixed-medium-r-normal--12-*-*-*-*-*-gb2312.1980-0"
}
style "GnomeAbout_Names_style"
{
fontset = "-misc-fixed-medium-r-normal--12-*-*-*-*-*-gb2312.1980-0"
}
style "GnomeAbout_Comments_style"
{
fontset = "-misc-fixed-medium-r-normal--12-*-*-*-*-*-gb2312.1980-0"
}
style "GnomeHRef_Label_style"
{
fg = { 0.0, 0.0, 1.0 }
fg = { 0.0, 0.0, 1.0 }
fg = { 0.5, 0.5, 1.0 }
fg = { 1.0, 0.0, 0.0 }
}
style "GnomeGuru_PageTitle_style"
{
fontset = "-misc-fixed-medium-r-normal--12-*-*-*-*-*-gb2312.1980-0"
}
widget "*GnomeScores*.CurrentPlayer" style "GnomeScores_CurrentPlayer_style"
widget "*GnomeScores*.Logo" style "GnomeScores_Logo_style"
widget "*GnomeAbout*.DrawingArea" style "GnomeAbout_DrawingArea_style"
widget "*GnomeAbout*.Author" style "GnomeAbout_Author_style"
widget "*GnomeAbout*.Comments" style "GnomeAbout_Comments_style"
widget "*GnomeAbout*.Copyright" style "GnomeAbout_Copyright_style"
widget "*GnomeAbout*.Names" style "GnomeAbout_Names_style"
widget "*GnomeAbout*.Title" style "GnomeAbout_Title_style"
widget "*GnomeHRef.GtkLabel" style "GnomeHRef_Label_style"
widget "*GnomeGuru*.PageTitle" style "GnomeGuru_PageTitle_style"
******************************************************
/etc/gnome/gtkrc.zh_CN
******************************************************
# $(gtkconfigdir)/gtkrc.zh_CN
#
# This file defines the fontsets for Chinese language (zh) using
# the simplified chinese standard GuoBiao as in mainland China (CN)
#
# 1999, Pablo Saratxaga <[email protected]>
#
style "gtk-default-zh-cn" {
#fontset = "-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-1,\
# -*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*"
fontset = "-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
-*-SimSun-medium-r-normal--12-*-*-*-*-*-iso10646-1,*-r-*"
fg = "#000000"
fg = "#000000"
fg = "#777777"
fg = "#000000"
fg = "#ffffff"
bg = "#d1d1cb"
bg = "#E2E2E2"
bg = "#f2f2f2"
bg = "#f2f2f2"
bg = "#707070"
base = "#ffffff"
base = "#ffffff"
base = "#ffffff"
base = "#f2f2f2"
base = "#000000"
text = "#000000"
engine "thinice"
{
# rect_scrollbar = TRUE
#mark_type1 = DOT
# mark_type2 = ARROW
}
}
class "GtkWidget" style "gtk-default-zh-cn"
页:
[1]
2