-
suppose texlive and CJK is installed correctly
-
install fontforge
sudo apt-get install fontforge
-
download font.tar.bz2
-
prepare font
song.ttc
, and generate font files
fontforge -script subfonts.pe simsun.ttc song Unicode.sfd
-
create bash script
makemap.sh
, run the script to generate map file
if [ -f song.map ]; then rm song.map fi for i in *.tfm do echo "${i%.tfm} ${i%.tfm} <${i%.tfm}.pfb" >> song.map done
-
create
c70song.fd
% 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
-
check system conf file location
kpsewhich texmf.cnf
-
change
TEXMFHOME
to
TEXMFHOME = $HOME/texmf
-
change
TEXMFDBS
to
TEXMFDBS = $TEXMFHOME;$TEXMFLOCAL;$TEXMFMAIN;$VARTEXFONTS;$TEXMFSYSVAR;$TEXMFDIST
-
mimic texmf tree and copy fonts and configs. texmf should match those in
TEXMFHOME
mkdir -p ~/texmf/fonts/map/dvips/CJK mkdir -p ~/texmf/fonts/tfm/CJK/song mkdir -p ~/texmf/fonts/type1/CJK/song mkdir -p ~/texmf/tex/latex/CJK/UTF8 cp song.map ~/texmf/fonts/map/dvips/CJK cp *.tfm ~/texmf/fonts/tfm/CJK/song cp *.pfb ~/texmf/fonts/type1/CJK/song cp c70song.fd ~/texmf/tex/latex/CJK/UTF8
-
update system conf
sudo texhash updmap
-
in
$HOME/texmf/fonts/map/pdftex/updmap/pdftex.map
, append content insong.map
Saturday, April 13, 2013
Texlive and CJK
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment