I'm compiling a Japanese TeX file written with CJK.sty
, and using the IPA fonts. I used ttf2tfm
to generate tfm
files. Is there a way to tell pdftex
that a set of tfm
files correspond to one Unicode truetype fonts, directly from inside a tex file? I'm currently using
\pdfmapfile{+ipamp.map}
with the ipamp.map
file of the form
ipamp00 <ipamp.ttf <ipamp00.enc
ipamp01 <ipamp.ttf <ipamp01.enc
ipamp02 <ipamp.ttf <ipamp02.enc
ipamp03 <ipamp.ttf <ipamp03.enc
... continuing to ipampff ...
which, I think, is rather stupid. Furthermore, the embedding of the fonts to the pdf file, which is done at the last stage of pdftex
, is very slow. My question then is if there's a better way. For example, for dvipdfmx
, you can just have one line
ipamp@Unicode@ unicode ipamp.ttf
Background: I'm preparing a Japanese TeX file for submission to a preprint server (arXiv) which doesn't unfortunately accept XeTeX or LuaTeX. The server only has the wadalab font for Japanese, which is rather ugly. So I'd like to use IPA instead. The way I described above works, but doesn't sound perfect.
Best Answer
pdfTeX now supports one-line mapping syntax using a SFD file. It is undocumented. You can use
instead of
And you can even use
in your TeX file. Then you don't need to write a mapfile.
This method is used for Chinese years ago. You can have a look at
zhwinfonts.tex
in ourzhmetrics
bundle.Full test for those who are not familar with
CJK
and CJK fonts:Download IPA Fonts from http://sourceforge.jp/projects/ipafonts/releases/
Use this command line to make a lot of
.tfm
files:and we have this map line on console:
Write a
c70ipamp.fd
to install the font in LaTeX NFSS:Use this TeX file to test (UTF-8 encoded, compiled with
pdflatex
):