Using unicode postscript fonts with CJK LaTeX
Contributed by kstemen
(note: this has been tested on PC/Cygwin)
Back to unicode for CJK LaTeX
Latex UTF8 support in Cygwin
I would like to thank Hin-Tak Leung and Werner Lemberg for their guide at
http://www.tug.org/tex-archive/language/chinese/CJK/4_5.2/contrib/wadalab/DNP.
One way of getting true type fonts to work is to use programs that can directly read the ttf files (like pdflatex and dvipdfmx), but this guide describes the other way, that is converting the ttf file into postscript fonts (pfb).
- Download convertfont.tar.bz2 (from this site)
- Install ucs and ttfucs as described in http://ipe.compgeom.org/pdftex_2.html.
- Get a ttf unicode font, such as cyberbit.ttf or kochi-mincho.ttf and put it in a directory with the contents of the zip file.
- ttf2pfb and t1asm are included in the zip file. Surprisingly, the different versions are *very* finicky, and the two I picked happen to work together. If you look inside of convertplane.sh you'll see that the asm file is appended with cleartomark, which is a hack to get even these two versions to work together.
ttf2pfb.exe is from http://www.ctan.org/tex-archive/fonts/utilities/ttf2pfb/
t1asm.exe is from http://www.tug.org/tex-archive/fonts/utilities/t1utils/
- run convertfont.sh. The first argument is the ttf file, the second is the 5 letter name for the font, eg:
./convertfont.sh cyberbit.ttf cyberb
- move the tfm files to somewhere in .../texmf/fonts/tfm
- move the pfb files to somewhere in .../texmf/fonts/type1
- move the map file to .../texmf/dvips/misc
- remove the asm files
Add "Map <map file>" (no quotes and map file is something like cyberbit.map) to the end of .../texmf/web2c/updmap.cfg
- run texhash
- run updmap
- replace cyberb in UTF8_nocjk.tex with the 5 letter name of your font, if you're not using cyberbit.
- run:
latex UTF8_nocjk.ps
dvips UTF8_nocjk
ps2pdf UTF8_nocjk.ps