Op 22-12-07 07:54, schreef Andrew Thorburn:
> 
> Can anyone give me a hand getting this set up? I've got no idea what the
> hell I've done wrong. I've tried some instructions found on the net, but
> they're typically not for MikTex, and I don't think they're for the
> latest version... Why does it not work out of the box? I'm just curious
> here...

I'm not sure if MikTeX provides the Cyberbit fonts out of the box.  Look for
a file called "c70song.fd".  There will be a line like this:

  \DeclareFontShape{C70}{song}{m}{n}{<-> CJK * cyberb}{}

This means that if you use
  \begin{CJK}{UTF8}{song}
it will search for "cyberbXX.tfm" files, *.pfb, etc.

The problem with fonts has been mentioned in this mailing list several
times, but I'll paste here a part of the HOWTO that I've written some time
ago for Debian GNU/Linux.

If you could, in return, ask the MikTeX maintainer to either add a HOWTO or
to implement a Cyberbit package or script in the MikTeX distribution?  You
will help your fellow MikTeX users a great deal.

Here's a part of README.Debian:

Cyberbit
--------

(Install this only if you agree to the following license at
http://ftp.netscape.com/pub/communicator/extras/fonts/windows/License.wri)

To install Bitstream's Cyberbit TrueType Font, get
ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/Cyberbit.ZIP
and unzip it in "/usr/local/share/fonts/truetype/bitstream/".
Rename the file into "cyberbit.ttf", and make a symlink:
    ln -s /usr/local/share/fonts/truetype/bitstream/cyberbit.ttf \
    /usr/local/share/texmf/fonts/truetype/bitstream/cyberbit/cyberbit.ttf
(or better yet, use a relative path).

Don't forget to make the directories with "mkdir -p" first if they don't
exist yet!

1. OLD way (not recommended):
Now let's make those TeX Font Metric files:
 $ cd /usr/local/share/texmf/fonts/truetype/bitstream/cyberbit
 $ ttf2tfm cyberbit.ttf [EMAIL PROTECTED]@ > cyberbit.log

Move all the .tfm files to
/usr/local/share/texmf/fonts/tfm/tfm/bitstream/cyberbit
and run "mktexlsr" or "texhash" to update the TEXMF tree.
You can safely delete cyberbit.log.

Voilà, now you can try out /usr/share/doc/latex-cjk/examples/UTF8.tex!

2. NEW way (longer but much better):
The modern way of adding fonts is to use the Fontforge scripts.  For
Cyberbit it's pretty easy: it is already a Unicode font and you don't
need vertical glyphs (unless you're as crazy as me).  You will need a
Fontforge installation that is more recent than 2005-07-17.  You also
must have "Unicode.sfd" installed somewhere: use either (s)locate or
find to get the exact location on your computer.  It can be found
in /usr/share/texmf/fonts/sfd/ if you have the freetype1-tools package
installed on Debian.

First thing to do: you have to remove all the old PK fonts.
$ rm -rf ~/.texmf-var/fonts/pk

Put cyberbit.ttf in /usr/local/share/fonts/truetype/bitstream/ and
make a soft link to your working directory, let's say
/usr/src/cyberbit-fonts/.  You might eventually also link
/usr/local/share/fonts/truetype/bitstream/cyberbit.ttf to
/usr/local/share/texmf/fonts/truetype/bitstream, but that's not really
necessary.

Go to your build directory, copy "subfonts.pe" from the CJK
utils/subfonts directory to this map and execute the following
commands:

  $ fontforge -script subfonts.pe cyberbit.ttf cyberbit \
    /usr/share/texmf/fonts/sfd/Unicode.sfd

This will take a very long time, so make yourself a nice cup of tea.

  $ for i in *.pfb
    do
     echo "$(basename $i .pfb) $(basename $i .pfb) <$i" \
     >> cyberbit.map
    done

  $ mkdir -p /usr/local/share/texmf/fonts/map/dvips/cyberbit/
/usr/local/share/texmf/fonts/{afm,type1,tfm}/cyberbit

You can write this command all on one line, or just copy and paste
the three lines in your terminal.

Put cyberbit.map in /usr/local/share/texmf/fonts/map/dvips/cyberbit/
and put *.afm, *.tfm and *.pfb to
/usr/local/share/texmf/fonts/{afm,tfm,type1}/cyberbit respectively.

Run "texhash" or "mktexlsr" as root.
Now add a file called /etc/texmf/updmap.d/10cyberbit.cfg with the
following four lines:

######
# 10cyberbit.cfg
Map cyberbit.map
######

and then run "cd ..", "update-updmap -c /etc/texmf/updmap.d/" and
"updmap-sys".  You need to go to another directory, or updmap-sys
will use cyberbit.map from the building directory; that's why you
have to change directory first.

If c70song.fd already exists on your computer, make sure it's deleted
first.  Now make a file /usr/local/share/texmf/tex/latex/CJK/UTF8/c70song.fd
and use the following content:

%%%%%%
% This is the file c70song.fd of the CJK package
%   for using Asian logographs (Chinese/Japanese/Korean) with LaTeX2e
%
% created by Werner Lemberg <[EMAIL PROTECTED]>
%
% Version 4.6.0 (11-Aug-2005)

\def\fileversion{4.6.0}
\def\filedate{2005/08/11}
\ProvidesFile{c70song.fd}[\filedate\space\fileversion]


% character set: Unicode U+0080 - U+FFFD
% font encoding: Unicode

\DeclareFontFamily{C70}{song}{\hyphenchar [EMAIL PROTECTED]

\DeclareFontShape{C70}{song}{m}{n}{<-> CJK * cyberbit}{}
\DeclareFontShape{C70}{song}{bx}{n}{<-> CJKb * cyberbit}{\CJKbold}

\endinput
%%%%%%

and run "texhash" as root again.


HTH

-- 
Danai SAE-HAN (韓達耐)

題目:《六月二十七日望湖樓醉書》
作者:蘇軾(1036-1101)

黑云翻墨未遮山,白雨跳珠亂入船。
卷地風來忽吹散,望湖樓下水如天。

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Cjk maillist  -  [email protected]
https://lists.ffii.org/mailman/listinfo/cjk

Reply via email to