在上一篇文章中我只说了simsun和simhei字体的配置,如果测试一下就会发现已经有粗体了,但是斜体却没有办法使用,差了这一点总觉得不太完美,对吧:)那这一篇文章我们就来说说斜体的配置。有了前面的经验,生成斜体是很简单的事情,可能有些朋友已经能根据前一篇文章的思路自己完成了,这里我再把步骤写一下,算是把事情做得完美些吧:)
1. 修改${TEXMFMAIN}/ttf2pk/ttfonts.map,内容如下:
% These entries are just examples!
arials arial.ttf Slant=0.25
arial arial.ttf Slant=0 Extend=1 Pid = 1 Eid = 0
arialx arial.ttf Slant=0 Extend=1.5
times times.ttf Encoding=T1-WGL4.enc .g0xc7=ring .g0xc9=caron .g0xc4=dotlessi
times95 times95.ttf Encoding=T1-WGL4.enc
ntukai@Big5@ ntu_kai.ttf Pid = 3 Eid = 4
cyberb@Unicode@ cyberbit.ttf
% the next entry maps the Unicode encoded font to Big 5 encoding; thus you
% can say \begin{CJK}{Big5}{...} (this is an environment from the CJK
% package for LaTeX).
mingli@UBig5@ mingliu.ttc Fontindex = 0
arb5kai@UBig5@ arb5_kai Pid=3 Eid=1
arb5sung@UBig5@ arb5_sung Pid=3 Eid=1
argbkai@UGB@ argb_kai Pid=3 Eid=1
argbsung@UGB@ argb_sung Pid=3 Eid=1
gbksong@UGBK@ simsun.ttc Pid=3 Eid=1
gbksongsl@UGBK@ simsun.ttc Slant=0.167 Pid=3 Eid=1
gbkhei@UGBK@ simhei.ttf Pid=3 Eid=1
gbkheisl@UGBK@ simhei.ttf Slant=0.167 Pid=3 Eid=1
2. 修改${TEXMFMAIN}/tex/latex/CJK/GB/c19song.fd,内容如下:
% This is the file c19song.fd of the CJK package
% for using Asian logographs (Chinese/Japanese/Korean) with LaTeX2e
%
% created by Werner Lemberg <wl@gnu.org>
%
% Version 4.5.2 (28-Mar-2003)
\def\fileversion{4.5.2}
\def\filedate{2003/03/28}
\ProvidesFile{c19song.fd}[\filedate\space\fileversion]
% Chinese characters (extension of GB 2312)
%
% character set: GBK
% font encoding: CJK (extended)
\DeclareFontFamily{C19}{song}{\hyphenchar \font\m@ne}
\DeclareFontShape{C19}{song}{m}{n}{<-> CJK * gbksong}{}
\DeclareFontShape{C19}{song}{bx}{n}{<-> CJKb * gbksong}{\CJKbold}
\DeclareFontShape{C19}{song}{m}{sl}{<-> CJK * gbksongsl}{}
\DeclareFontShape{C19}{song}{bx}{sl}{<-> CJKb * gbksongsl}{\CJKbold}
\DeclareFontShape{C19}{song}{m}{it}{<-> CJK * gbksongsl}{}
\DeclareFontShape{C19}{song}{bx}{it}{<-> CJKb * gbksongsl}{\CJKbold}
\endinput
3. 看出变化了吧,那就照样修改一下${TEXMFMAIN}/tex/latex/CJK/GB/c19hei.fd。
4. 执行以下命令:
#cd fonts/tfm
#mkdir chinese
#cd chinese
#mkdir gbksongsl
#mkdir gbkheisl
#mkdir cd gbksongsl
#ttf2tfm /usr/local/share/texmf/fonts/truetype/chinese/simsun -s 0.167 -P 3 -E 1 gbksongsl@/usr/local/share/texmf/ttf2pk/UGBK@
#cd ..
#cd gbkheisl
#ttf2tfm /usr/local/share/texmf/fonts/truetype/chinese/simhei -s 0.167 -P 3 -E 1 gbkheisl@/usr/local/share/texmf/ttf2pk/UGBK@
#texconfig rehash
5. 配置完成,再测试一下吧。
写完了,没想到写这些东西竟然这么费时间,唉,眼睛都花了,希望能帮到一些朋友,也不枉我狂敲一番键盘。我的邮箱是jamesmacn@yahoo.com.cn,有问题的朋友可以给我发Email。