Hello all,
I am happy to say I could successfully convert the msgoth.ttf font
from Windows XP (Japanese) to work under LaTeX. This is a test case
for me, as I need proper bold fonts for various purposes, and the raw
documents use commercial fonts.
Here are the steps:
1. in a separate directory, copy subfonts.pe, Unicode.sfd, and
msgoth.ttf. Then run
fontforge -script subfonts.pe msgoth.ttf msgoth Unicode.sfd
Here the LaTeX basename will become msgoth (as an example). A (maximum) total
of 256 msgothNN.{enc,tfm,afm,pfb} files will be created, with NN in
the range 00--ff.
2. create a msgoth.map and a c70msgoth.fd file.
a) in the directory run the following script to create the former:
#!/bin/sh
for i in *.tfm
do
cat >> msgoth.map << EOF
${i%.tfm} ${i%.tfm} < ${i%.tfm}.pfb
EOF
done
b) create the .fd file:
% This is c70msgoth.fd for the CJK package
% created by Gernot Hassenpflug based on the tutorial
% by Edward G. J. Lee in his blog "LJG Font Notes"
\ProvidesFile{c70msgoth.fd}
\DeclareFontFamily{C70}{msgoth}{\hyphenchar [EMAIL PROTECTED]
\DeclareFontShape{C70}{msgoth}{m}{n}{<-> CJK * msgoth}{}
\DeclareFontShape{C70}{msgoth}{bx}{n}{<-> CJKb * msgoth}{\CJKbold}
\endinput
3. tell my TeXLive 2007 about the fonts.
a) the .tfm fonts go to $TEXMFLOCAL/fonts/tfm/CJK/msgoth/
b) the .pfb fonts go to $TEXMFLOCAL/fonts/type1/CJK/msgoth/
c) the .fd file goes to $TEXMFLOCAL/tex/latex/CJK/UTF8/
d) the .map file goes to $TEXMFLOCAL/fonts/map/dvips/CJK/
I had to create a $TEXMFLOCAL tree at /usr/local/share/texmf, and then run the
texconfigure command to rehash. Thereafter, the (as root) command
updmap-sys --enable Map msgoth.map
worked and found the map
I ran a couple of other commands since I wasn't sure what I had to do,
but I think the above is what is only really needed.
4. Then, I made a test file, which includes english, kana/kanji
mixture, and arbitrary half-width katakana at the end (which I can
only see when I change the emacs font in my editor to the sony font or
fixed font):
\documentclass{article}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{msgoth}
Wow! This is msgoth from Windows.必ず出来る筈です。 ニホンゴ(nihongo)
\end{CJK}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
This then appears perfectly in my .dvi file, and also as perfectly in
my .ps file. I printed out the file to my Epson PM-670C, and it
appears just fine.
This then ends my first experiment of using non-native fonts in CJK,
and I will continue with this for fonts (particularly bold fonts) that
I require to business cards and other documents in Japanese.
Regards, Gernot
_______________________________________________
Cjk maillist - [email protected]
https://lists.ffii.org/mailman/listinfo/cjk