[an error occurred while processing this directive]
This document describes what you have to do to get Chinese, Hindi and other Unicode fonts to work on SuSE 10.0 and on other systems. In the next section I describe how to set up the fonts and how to use them. Below you will find a comment on how to get Type1 fonts (scalable fonts, not pixmaps) to work.
Thanks to Mike Fabian for help with the fonts.
mv tituscbz.ttf /usr/share/fonts/truetype/Add the following lines to /etc/ttf2pk/ttfonts.map.
tituscbz-uni@Unicode@ tituscbz.ttf tituscbz-s-uni@Unicode@ tituscbz.ttf Slant=0.167 tituscbz-r-uni@Unicode@ tituscbz.ttf Rotate=Yes tituscbz-rs-uni@Unicode@ tituscbz.ttf Rotate=Yes Slant=0.167
/usr/sbin/cjk-latex-config --type1
Another source that helped me setting the fonts up correctly is: http://lists.suse.de/archive/m17n/2003-Nov/0023.html
mv tituscbz.ttf /usr/X11R6/lib/X11/fonts/truetype/ mkdir -p texmf/fonts/tfm mkdir -p texmf/fonts/truetype cd texmf/fonts/truetype/ ln -s /usr/X11R6/lib/X11/fonts/truetype/tituscbz.ttf cd ../.. ttf2tfm fonts/truetype/tituscbz.ttf fonts/tfm/tituscbz@Unicode@The last command generates lots of output. Many .tfm files have been generated here:
ls fonts/tfm ituscbz02.tfm tituscbz05.tfm tituscbz09.tfm tituscbz12.tfm
mv c70tituscbz.fd texmf/fonts/
/usr/sbin/cjk-latex-config --type1This takes a while (for titus it takes three minutes and for CODE2000 it takes more than ten hours on a Pentium Mobile 1,8 Ghz!) and generates lots of output:
tituscbz@Unicode@: calling ttf2tfm ... tituscbz@Unicode@, plane=00: calling ttf2pt1 ... tituscbz@Unicode@, plane=01: calling ttf2pt1 ... tituscbz@Unicode@, plane=02: calling ttf2pt1 ... tituscbz@Unicode@, plane=03: calling ttf2pt1 ... ... creating /usr/share/texmf/fonts/map/dvips/cjk-latex/cjk-latex.map ... texhash: Updating /etc/texmf/ls-R... texhash: Updating /usr/share/texmf/../../../var/lib/texmf/db/ls-R... texhash: Updating /var/cache/fonts/ls-R... texhash: Updating /var/lib/texmf/ls-R... texhash: Done.This process creates a lot of .pfb files in /usr/share/texmf/fonts/type1/cjk-latex/Unicode/tituscbz/ and makes apropriate entries in /usr/share/texmf/fonts/map/dvips/cjk-latex/cjk-latex.map.
The script also deletes pk files that may have been present somewhere in /var/cache/fonts/pk/. If you have pk files in your local directories, remove them. Otherwise these files will be taken instead of our nice Type1 fonts.
updmap: This is updmap, version 1107552857 updmap: using transcript file `/var/lib/texmf/web2c/updmap.log' updmap: initial config file is `/etc/texmf/web2c/updmap.cfg' updmap: configuration (updmap.cfg) unchanged. Map files will not be recreated. texhash: Updating /etc/texmf/ls-R... texhash: Updating /usr/share/texmf/../../../var/lib/texmf/db/ls-R... texhash: Updating /var/cache/fonts/ls-R... texhash: Updating /var/lib/texmf/ls-R... texhash: Done.this means that the map files are not created. This is due to the fact, that the line
Map cjk-latex.mapwas already in the file `/etc/texmf/web2c/updmap.cfg'. cjk-latex.map now also contains information about our Type1 fonts, but updmap does not know about this. So you have to call updmap explicitely.
ttf2tfm tituscbz.ttf tituscbz@Unicode@in order to create ".tfm" and ".enc" files
sudo updmap --enable Map tituscbz.mapThis will enable the Titus font for the use with pdflatex. The rest above isn't necessary.
sudo texhashin the terminal If you put all of the files in your private folder, then this isn't necessary, either.
\usepackage[encapsulated]{CJK} \usepackage{ucs} \usepackage[utf8]{inputenc}It may also be a good idea to create a new command :
\newcommand{\cjktext}[1]{\begin{CJK}{UTF8}{tituscbz}#1\end{CJK}}Now, when you want to type Hindi, you just use the command: \cjktext{enter your Hindi text here} If you want to have glossed examples you can enable Hindi at the beginning of the document and keep it enabled till the end.
\begin{document} % to get the Hindi fonts \begin{CJK*}{UTF8}{tituscbz} This is Hindi text: लिनक्स-इन्डिया में आपका स्वागत है। \end{CJK*} \end{document}
You may check hindi-font-test.tex to see an example. Your outcome should look like hindi-font-test.pdf.
And that's it!