2.安装字体,首先建立目录(安装宋体(song)、楷体(kai)、仿宋(fs)、隶书(li)、黑体(hei)): #yum install fontforge #mkdir -p /usr/local/texlive/2007/texmf/tex/latex/CJK/UTF8 #mkdir -p /usr/local/texlive/2007/texmf/fonts/map/dvips/CJK #mkdir -p /usr/local/texlive/2007/texmf/fonts/tfm/CJK #mkdir song fs kai li hei #mkdir -p /usr/local/texlive/2007/texmf/fonts/type1/CJK/ #cd /usr/local/texlive/2007/texmf/fonts/type1/CJK/ #mkdir song fs kai li hei 以安装宋体为例: 创建文件夹song,我是在桌面创建文件夹song 复制字体文件simsun.ttf、cjk/utils/subfonts目录下的文件到fonts目录,复制/usr/local/texlive/2007/texmf/fonts/sfd/*.sfd到fonts目录, $cp /usr/local/texlive/2007/texmf-dist/source/latex/CJK/utils/subfonts/* /home/somebody/Desktop/song/ $cp /usr/local/texlive/2007/texmf/fonts/sfd/*.sfd /home/somebody/Desktop/song/ 然后开始生成字体: $time fontforge -script subfonts.pe simsun.ttf song Unicode.sfd 我用了40分钟,老机器了。 创建文件makemap, 内容如下: for i in *.tfm do cat >> song.map << EOF ${i%.tfm} ${i%.tfm} < ${i%.tfm}.pfb EOF done 执行makemap $chmod +x makemap $./makemap
创建文件 c70song.fd 放CJK包,内容如下: % This is c70song.fd for CJK package. % created by Edward G.J. Lee % modify by Yue Wang \ProvidesFile{c70song.fd} \DeclareFontFamily{C70}{song}{\hyphenchar \font\m@ne} \DeclareFontShape{C70}{song}{m}{n}{<-> CJK * song}{} \DeclareFontShape{C70}{song}{bx}{n}{<-> CJKb * song}{\CJKbold} \endinput