I am trying to install a true type font for use with pdflatex to get chinese characters that are missing from wadalab or arphic font packages. I do not want to use xetex.
The system: ubuntu 10.04 and texlive-2009.
The following step-by-step process follows roughly what I found at http://www-alg.ist.hokudai.ac.jp/~jan/japfonts.html. And I tried it with two fonts that are installed on my ubuntu 10.04 system via the software center: IPAexGothic and WenQuanYin Micro Hei. The latter would be my want-to-get-it-going since it includes all characters I need. The problem I encounter is the same with both fonts, this cookbook is taken from trying to install the IPAex font.
I am trying to install in my local texmf-tree, all programs run as user without root permissions, so no single system-wide file is written. The local texmf-tree was not started by me trying to install the new font; I am extending the tree that came with a koma-script update (if I remember correctly).
First step is to generate tfm information:
Code: Select all
$ mkdir -p ~/.texmf/fonts/tfm/ipaex/gothic
$ cd ~/.texmf/fonts/tfm/ipaex/gothic
$ ttf2tfm /usr/share/fonts/opentype/ipaexfont/ipaexg.ttf ipaexg-uni@Unicode@
Code: Select all
$ mkdir -p ~/.texmf/fonts/truetype
$ ln -s /usr/share/fonts/opentype/ipaexfont/ipaexg.ttf ~/.texmf/fonts/truetype
Code: Select all
$ mkdir -p ~/.texmf/tex/latex
$ cat > ~/.texmf/tex/latex/c70ipaexg.fd <<EOF
\ProvidesFile{c70ipaexg.fd}[IPAex gothic font]
\DeclareFontFamily{C70}{ipaexg}{\hyphenchar \font\m@ne}
\DeclareFontShape{C70}{ipaexg}{m}{n}{<-> CJK ipaexg-uni}{}
\DeclareFontShape{C70}{ipaexg}{bx}{n}{<-> CJKb * ipaexg-uni}{\CJKbold}
EOF
Code: Select all
$ mkdir -p ~/.texmf/fonts/map
$ cat > ~/.texmf/fonts/map/ipaex.map <<EOF
ipaexg-uni@Unicode@ ipaexg.ttf
EOF
Code: Select all
$ mktexlsr
Code: Select all
Map ipaex.map
Code: Select all
$ updmap --cnffile ~/.texmf/web2c/updmap.cfg
Code: Select all
$ cat > helloworld.tex <<EOF
\documentclass{article}
\begin{document}
Hello world.
\end{document}
EOF
Code: Select all
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
restricted \write18 enabled.
entering extended mode
(./helloworld.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, ngerman, german, german-x-2009-06-19, ngerman-x-2009-06-19, pinyin,
loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
No file helloworld.aux.
[1{/home/nicolas/.texmf-var/fonts/map/pdftex/updmap/pdftex.map{Unicode.sfd}Segmentation fault
If there is some documentation that could help me, please point me to it. For example, where can I learn more about fd-files? There is some documentation out there on the internet, but how can I know if it is still valid/up-to-date?
And of course: if you've been able to see where I am mistaken in my installation procedure, please tell me

best regards!
Nicolas