[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`.vf's, `.enc's, `.tfms', MMs, and problems with fontinst...



I have enjoyed hearing the discussion of the pros and cos using VFs
purely for reencoding versus simply reencoding the font directly;
certainly I know more about how things work than I did.  Ultimately, I
think Sebastian is right -- I use perl when I could use the simpler
tools of grep, sed, or awk, despite its being a sledgehammer to crack
a nut, both because it means I only have to deal with one tool, and
because I know Perl `usually gets things right'.

Similarly, one *can* use the `simpler' tool of afm2tfm (or Y&Y's
proprietary tools) to make LY1, 8r, or even T1/TS1 fonts that don't use
VFs. You can even do this with fontinst -- just throw away your VF file
and replace lines like:

  phvr8r Helvetica " TeXBase1Encoding ReEncodeFont " <8r.enc

... with lines like:

  phvr8t Helvetica " CorkEncoding ReEncodeFont" <cork.enc
  phvr8c Helvetica " TexCompEncoding ReEncodeFont" <texcomp.enc

... but, if you do this, you need to be sure that all the VF is doing
is a simple reencoding of the font; and you need `.enc' files for each
encoding you use, at least if you're using DVIPS -- texcomp.enc doesn't
seem to exist, for example, so I created my own, which I'd be happy to
share).

Additionally, it is possible to typeset directly in the 8r encoding,
although I seem to remember that there were some hidden pitfalls in that
approach.

But, as has already been pointed out, if you want to use glyphs from an
accompanying expert font (e.g. ffl ligatures), the only really sane way
to do this is with VF files, and right now the only really good tool
for making VF files is fontinst.

However, finst/fontinst is not without its problems. IMHO, removing all
documentation but a pointer to the LaTeX Graphics Companion for the
current release was a considerable mistake. If free software is a good
idea, free documentation also seems like a good idea. Better, I would
think, to give away basic documentation and providing better documentation
with copious examples in a book. But better still would be to provide
as complete a documentation as possible for free, since those with the
money to spend would still probably prefer to have a properly printed
and bound documentation.

Possibly worse than fontinst lack of documentation, is that it crashes.
When I gave it some Kepler AFM to chew it crashing out with a `TeX
capacity exceeded' error while processing Kern pairs. Perhaps Kepler's
having 2600 kern pairs plus 800 or so in the expert set (as opposed to
an average of about 200 for older fonts) would explain this. (Fontinst
also doesn't like fractional widths for kern entries either, but these
were easy to take care of.)

With fontinst choking, I was left using afm2tfm to get Kepler working
(actually, afm2tfm needed both an AFM file reencoder (which I wrote
myself), and TeX needed a handwritten FD file [and it didn't end there --
because Kepler is an MM font, I used a homespun MakeTeXTFM to create
instances on the fly, and that script needed to call a script to generate
instance AFMs from master AFMs]).

But, for all this, my Kepler installation is currently without any glyphs
>From the expert set, since it seems like only fontinst can do this. I'd
love to be using fontinst rather than afm2tfm, but until it'll work on
my Kepler (instance) AFMs, I'm out of luck...

I suppose I should be pleased that, with `just' a whole weekend spend on
the task, I did get Kepler installed, and in such a way that it builds
instances as and when they are needed, which actually is pretty neat.

Best Regards,

    Melissa.

P.S. To those wanting to diagnose the problem with fontinst further,
you can download AFM files for a fixed (10pt) Kepler instance to try
>From http://www.cs.sfu.ca/~oneill/personal/pkp-afms.tar.gz.  Enclosed
is a log of the error:

Enc.

solaris% initex pkp.tex
This is TeX, Version 3.14159 (C version 6.1e) (INITEX)
(pkp.tex (fontinst.sty v1.6, hacked SPQR (fontinst.ini) (trig.sty) (fontinst.rc
))
INFO>to make LaTeX (family,weight,shape,width) pkp,b,n,: seek pkpb8r
INFO> found pkpb8r.mtx
INFO>run installfont with <pkpb7t><pkpb8r,latin><OT1><OT1><pkp><b><n>
(pkpb8r.mtx) (latin.mtx
Runaway definition?
->\k \l-A \-30 \k \l-B \0\k \l-C \-1 \k \l-D \2\k \l-E \4\k \l-F \5\k \ETC.
! TeX capacity exceeded, sorry [main memory size=262141].
<argument> \k \l-dotlessJsmall 
                               \6
\add_to ... \def \expandafter #1\expandafter {#1#2
                                                  }\fi 
\set_kern_cs #1#2#3->\add_to #2{\k #3#1}
                                        \add_to #3{\k #2#1}
\l-Jsmall ...\r-Nacutesmall \6\k \r-Ncaronsmall \6
                                                  \k \r-Ntildesmall \6\k \r-...

\setleftrightkerning ...etleftkerning {#1}{#2}{#3}
                                                   \setrightkerning {#1}{#2}...
l.387 ...rightkerning{dotlessJsmall}{Jsmall}{1000}
                                                  
No pages of output.
Transcript written on pkp.log.