- 论坛徽章:
- 0
|
转载:
http://blog.csdn.net/xport/
网上太多此类的文章了,且记下自己用的方法,以备日后参考!
首先当然是要挖出Windows中所使用的TrueType字体了,列表如下:
courbd.ttfcourbi.ttfcouri.ttfcour.ttfsimsun.ttf tahomabd.ttftahoma.ttfverdanab.ttfverdanai.ttfverdana.ttf
将上面这些文件放到这里:
[root@redhat /tmp] # cd /usr/share/fonts
[root@redhat /usr/share/fonts] # mkdir TrueType
[root@redhat /usr/share/fonts] # cd TrueType
[root@redhat /usr/share/fonts/TrueType] # cp /tmp/*.ttf ./
刷新字体缓存:
[root@redhat /usr/share/fonts/TrueType] # fc-cache -fv
fc-cache: "/usr/share/fonts": caching, 0 fonts, 6 dirsfc-cache: "/usr/share/fonts/bitmap-fonts": caching, 32 fonts, 0 dirsfc-cache: "/usr/share/fonts/zh_TW": caching, 0 fonts, 1 dirsfc-cache: "/usr/share/fonts/zh_TW/TrueType": caching, 2 fonts, 0 dirsfc-cache: "/usr/share/fonts/TrueType": caching, 11 fonts, 0 dirsfc-cache: "/usr/share/fonts/default": caching, 0 fonts, 2 dirsfc-cache: "/usr/share/fonts/default/ghostscript": caching, 8 fonts, 0 dirsfc-cache: "/usr/share/fonts/default/Type1": caching, 35 fonts, 0 dirsfc-cache: "/usr/share/fonts/zh_CN": caching, 0 fonts, 1 dirsfc-cache: "/usr/share/fonts/zh_CN/TrueType": caching, 3 fonts, 0 dirsfc-cache: "/usr/share/fonts/bitstream-vera": caching, 10 fonts, 0 dirsfc-cache: "/usr/X11R6/lib/X11/fonts/Type1": caching, 29 fonts, 0 dirsfc-cache: "/usr/X11R6/lib/X11/fonts/OTF": caching, 0 fonts, 0 dirsfc-cache: "/root/.fonts": skipping, no such directoryfc-cache: succeeded
生成fonts.dir和fonts.scale文件:
[root@redhat /usr/share/fonts/TrueType] # ttmfdir -d ./ -o fonts.dir
[root@redhat /usr/share/fonts/TrueType] # vi fonts.dir
不知道什么原因,生成的fonts.dir文件没有包含SimSun 宋体字形,所以我们需要手动修改一下了,增加下面的内容:
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-ansi-1251simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-ascii-0simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gbk-0
记着把fonts.dir复制一份,并更名为fonts.scale
接下来我们需要修改/etc/fonts/fonts.conf来调整中英文显示的优先顺序:
[root@redhat /etc/fonts] # vi fonts.conf
加入我们新放入的字体:
Serif faces -->
Bitstream Vera Serif
Times
Times New Roman
Nimbus Roman No9 L
Luxi Serif
Kochi Mincho
Tahoma
Verdana
Simsun
AR PL SungtiL GB
AR PL Mingti2L Big5
Baekmuk Batang
serif
Provide required aliases for standard names -->
serif Nimbus Roman No9 L Thorndale AMT Bitstream Vera Serif Times New Roman Luxi Serif Times KacstQura Frank Ruehl CLM Lohit Bengali Lohit Gujarati Lohit Hindi Lohit Punjabi Lohit Tamil Kochi Mincho Tahoma Verdana Simsun ZYSong18030 AR PL SungtiL GB AR PL Mingti2L Big5 Baekmuk Batang
同样的动作,也要套用到sans-serif区块!
最后,就退出到普通帐号,startx开启X-Window环境:
![]()
原作者的Blog:
http://blog.csdn.net/xport/
原作者的相关文章
漫谈 Unix 中的设备文件
如何修复:Windows上面的WScript的脚本(.vbs)不能执行了?
整理一个ANT在J2EE项目中的应用,含预编译JSP和打包WAR/EAR文件!
Heaven 要测试SQL Server 2005的镜像功能,居然要写个代码把程序停止响应!
iBATIS,循序渐进介绍如何做O/R Mapping...!
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/32692/showart_253285.html |
|