| Ubuntu Linux 6.06 下 Firefox 2.0b1 字体配置参考方案 |
荐 |
| Ubuntu Linux 6.06 下 Firefox 2.0b1 字体配置参考方案 |
|
| |
|
http://p.blog.csdn.net/images/p_blog_csdn_net/Veiz/223991/o_csdn.png http://p.blog.csdn.net/images/p_blog_csdn_net/Veiz/223991/o_sina.png http://p.blog.csdn.net/images/p_blog_csdn_net/Veiz/223991/o_MS.png
大家可以看到,无论是中文网页还是英文网页,浏览效果都和Windows下的IE相差不大。
也许你注意到了,英文字体不如Windows下的锐利。这是因为启用了Anti-aliasing 的结果。 在 Windows XP 下,如果你安装了微软的 ClearType 字体美化软件,那么英文字体的美化效果和AA是相似的。 ClearType 和 Anti-aliasing 都是很先进的显示技术,有利于缓解视觉疲劳,保护眼睛。微软的下一代操作系统 Windows Vista 将应用 ClearType 显示技术。锋利的字体将成为 Windows 的历史。
这样的显示效果是怎么样配置出来的呢?
首先,你手头上要有支持 XFT 的 Firefox。Firefox 默认是不带 XFT 的。你最好自己编译一份。我现在下载的版本是2.0Beta1。 源码下载地址: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/2.0b1/source/firefox-2.0b1-source.tar.bz2
注意解压的源码不能直接编译,必须先在解压出来的mozilla目录下创建一个名为mozconfig的文件,指定编译参数。 具体方法参见源码包中的README.
下面把我的mozconfig文件内容贴出来给大家参考.
# Build Firefox mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/release/firefox-static . $topsrcdir/browser/config/mozconfig ac_add_options --enable-optimize=-O2 ac_add_options --disable-debug ac_add_options --enable-default-toolkit=gtk2 ac_add_options --enable-xft #这是必须的 ac_add_options --enable-static ac_add_options --disable-shared ac_add_options --disable-tests
mozconfig创建完毕就可以编译安装了。 # ./configure # make # make install
下面安装常用中文字体。文泉驿、文鼎等都是不错的选择。如果获取这些字体一时有困难的话,你可以考虑用Windows下已经安装的字体看看效果。比较简单的做法是,把Windows目录下的Fonts文件夹中几个重要字体,比如宋体、楷体、仿宋、细黑、Tohama、Arial等复制到 /usr/share/fonts/other 文件夹中。然后执行
# fc-cache /usr/share/fonts/other
更新字体缓存。
以下步骤是假定你拷贝了Windows\Fonts下的所有主要字体。如果你使用了其他字体,参照下面的步骤修改具体参数即可。
检查一下 /etc/fonts/fonts.conf 文件有没有被修改过。如果被修改了,最好恢复到最原始的版本。
下面在 /etc/fonts/ 目录下创建文件 local.conf ,文件内容如下:
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!-- /etc/fonts/local.conf file for local customizations --> <fontconfig>
<match target="font"> <edit name="autohint"> <bool>true</bool> </edit> <edit name="hintstyle"> <const>hintfull</const> </edit> <edit name="antialias"> <bool>true</bool> </edit> </match>
<match target="font"> <edit name="embeddedbitmap" mode="assign"> <bool>true</bool> </edit> </match>
<match target="font"> <!-- check to see if the font is just regular --> <test name="weight" compare="less_eq"> <const>medium</const> </test> <!-- check to see if the pattern requests bold --> <test target="pattern" name="weight" compare="more"> <const>medium</const> </test> <!-- set the embolden flag needed for applications using cairo, e.g. gucharmap, gedit, ... --> <edit name="embolden" mode="assign"> <bool>true</bool> </edit> <!-- set weight to bold needed for applications using Xft directly, e.g. Firefox, ... --> <edit name="weight" mode="assign"> <const>bold</const> </edit> <!-- Hinting will be done before Embolden in freetype2, but in such case, Embolden will get wrong result on some glyph contours after applying hinting. Actually, hinting should be done after embolden, but we can't fix it in current freetype2. So as a workaround, just turn off hinting if we want to do embolden. --> <!--<edit name="hintstyle" mode="assign"> <const>hintnone</const> </edit>--> </match>
<match target="font"> <test target="pattern" name="lang" compare="contains"> <string>zh</string> <string>ja</string> <string>ko</string> </test> <edit name="spacing"> <const>proportional</const> </edit> <edit name="globaladvance"> &[1] [2] [3] 下一页
 |
频道声明:本频道的文章除部分特别声明禁止转载的专稿外,可以自由转载.但请务必注明出出处和原始作者 文章版权归本频道与文章作者所有.对于被频道转载文章的个人和网站,我们表示深深的谢意。
| 原始作者:佚名 |
录入时间:2007-1-3 3:51:03 |
| 信息来源:不详 |
投稿信箱:itqoo@126.com |
|
|
 |
|
|
|
| 教程录入:itqoo 责任编辑:itqoo |
|
上一个教程: 用VNC实现Windows中显示Linux的桌面
下一个教程: Ubuntu breezy(5.10)下解决摄像头问题 |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |