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

Re: Behaviour of \latinfamily

>>> Try runnig
>>> perl make-fam.pl -debug -outdir ../cooked/<whatever> <famcode>
>>> ^^^^^^
>>> to preserve the log files and temporary files, if you really want to
>>> see what's going on behind the scenes.
>> I'm not sure what you're talking about here.  I have the log files.
>> They do not tell me what I want to know.  I've not mentioned using
>> Perl.  I have some Perl scripts to automate the use of fontinst but
>> I haven't the faintest idea how to use any of them.
>Sorry.  I was referring to Sebastian's perl scripts, assuming that
>these were the standard interface to using fontinst nowdays.

It's the standard interface for you experts.  People like me who can't even
understand fontinst properly, let alone work out what those Perl scripts
are supposed to do or get them to do anything can't use them.  Yes, I have
tried using some Perl scripts (written by others) to automate fontinst.
I've got nowhere.

>In thie end, these perl scripts produce a temporary TeX files, which
>basically calls
>  \input fontinst.sty
>  \latinfamily{<famcocde>}
>and something similar. for the text companion encoding.

Right - thanks.

>>> Another point to note is that after the above-mentioned message is
>>> issued by the macro \latin_shape, stating that fontinst is apparently
>>> looking for some 8r-encoded .mtx file,
>> Ah!  Information.  How can you tell that fontinst is looking for an mtx
>>> various other macros are called,
>>> such as \fake_width or \fake_shape, which in turn look for 8a-encoded
>>> .afm files and issue the necessary  \transformfont and \reencodefont
>>> commamds to produce a suitable 8r-encoded .mtx file.
>> Does a list exist of which transformations and re-encodings fontinst
>> will do on its own?  I'm trying to document the process, you see,
>> and I can't work out any of these points from the source code or log
>> files.
>I'm afraid you'll have to work it out from the source code and the
>log files.  That's exactly what I tried to do in my previous mail.

I've looked at the log files and source code *very* carefully and I can't
work out the answers to the questions I'm asking here.  I was hoping that
someone who is able to work it out but can't write the documentation could

I don't need a list of everything that fontinst does when you call
\latinfamily; just some sort of list (anything, really) of what
correspondances there are between the fount it's trying to create pl or vpl
files for and the `raw' founts it uses directly or transforms to create

>>> As a first step, \latin_shape calls
>>> \csname fake_width_\font_width\endcsname,
>>> where \font_width is empty, i.e. \fake_width_ is called,
>>> which happens to do nothing.

[snip details of the source code]

>expands to a call of a macro \fake_shape_ or \fake_shape_o
>or \fake_shape_c or \fake_shape_i, which are all defined
>in fontinst.sty.

Thanks for spending the time to explain this.  It's unfortunately useless
for me.  The problem is that I've not the slightest idea what the purpose
of any of the functions involved is, nor where the parameters passed to
them come from, nor what any of them mean, nor how they correspond to
anything.  It's pure noise, I'm afraid.

>> You said above that fontinst was looking for an mtx file, and here
>> you say it's looking for an afm file.  Can you explain what's going
>> on?  I gather fontinst can work with pl, afm, or mtx files.  Which
>> sort is it looking for here, and if it looks for more than one,
>> what's the search order?
>I don't know exactly, at which point .fd files come into play.
>In general, fontinst needs an .mtx file to start the reencoding
>business, which is can generate itself from .afm or .pl files.
>>> * it calls
>>> \transformfont{pckm8r}{\reencodefont{8r}{\fromafm{pckm8a}}}
>>> * it calls
>>> \installrawfont{FONT-NAME}{FILE-LIST}{ETX}{ENCODING}
>>> \installrawfont{pckm8r}{pckm8r,8r}{8r}{8r}{pck}{m}{n}{}
>> Can you explain what this means and does?
>\transformfont should be clear, as its is documented in the LGC.

The \transformfont documentation in the LGC is entirely useless: it refers
to <integer expression> and <font> without defining either.  The
\transformfont documentation in AJ's fontinst 1.335 manual is slightly
better, but that doesn't make any sense about <integer expression> either.

It's documentation failures like this that mean that normal human beings
can't make any sense out of fontinst; I think this kind of problem is
inevitable when experts who only talk to experts about their subject try to
write about it.

(In case you're wondering, there is one paragraph on page 396 of the LGC
that I found useful.  Nothing else in that book has helped me at all.)

>\installrawfont is trickier, but I suppose it is the interanl
>function which is called by higher-level \installfont macros
>and eventually produces an .fd file from a temporary .mtx file.

I'm told that \endinstallfonts produces the fd files.

>>> The calling sequence of fontinst goes something like \latinfamily ->
>>> \latin_weights -> \latin_widths -> \latin_shapes -> \latin_encodings,
>>> where each step goes throgh a list of individual calls for a number
>>> of predefined weights, widths, shapes and encodings.
>> Can you explain what you mean by this?
>I suppose, I'll have to write several pages to explain this in detail,
>and I don't have time for that right now.

Fine.  I do suspect that the information I'm missing is much shorter than
what you think it is.  The first thing in your paragraph above that I don't
understand is: `The calling sequence of fontinst' - that phrase is
meaningless to me.  I suspect it's best just to drop this with no further

>You call
>  \latinfamily
>which in turn calls the chain of
>  \latin_weights -> \latin_widths -> \latin_shapes -> \latin_encodings
>Each of these macros processes a list of individual calls to
>\latin_weight, \latin_width, \latin_shape, etc. whic do the real work.

Right - thanks.  I've noted this; it'll probably help when I've got some
idea what it means.

>> But I've never seen fontinst place any entries in a 8r.fd file, even
>> though it's created 8r.fd files for me quite happily.
>This might be a problem indeed.  The default settings of \latin_encodings
>tell fontinst to proudce OT1 and T1 only, so I don't know, why this is
>generated in the first place.
>> I've also not worked out how it does fount substitutions.  I've read
>> various explanations, but they don't tie up with my observations.
>> In particular, I've not seen fontinst substitute it for ui.
>I believe it does so or OT1 only because of \pounds vs. \dollar.

I always install OT1 encoded founts, and I've never seen this substitution
made automatically.  Sebastian has explained why.

>> I have studied the code and it makes no sense at all to me.
>> I'm afraid your explanations don't make much sense for pretty much
>> the same reason: it seems that I'm supposed to be able to work out
>> all sorts of things that aren't stated explicitly.  Well, I've
>> tried, and got no-where.
>I'm afraid this sounds as if you've volunteered to do a task for which
>you are not qualified.  If there is no other doucmentation, you have
>no choice but working it out from the source.  Good luck!

The problem is that no one person can be qualified to write the fontinst
documentation: anyone able to understand the source code is unable to write
decent documentation; and anyone able to write decent documentation is
unable to understand the source code.  This exludes the tiny minority of
sickeningly clever people like (say) Donald Knuth and Richard Feynmann who
can do both.

The reason I volunteered to write the fontinst documentation is that I've
got a pretty good idea of what's going on in general terms, and I just need
a very small amount of extra information so that everything falls into
place.  The problem is that it's difficult to get the experts to understand
what I need to know; my questions have mostly resulted in answers which
appear to be mostly noise to me and seem to miss the point I'm trying to
get to.

I happen to be much better qualified to write documentation than most
people, but that's a different matter.  I *suspect* I'm one of the best
people in the world to do the job of writing fontinst documentation, but
only because there's an entirely negligible  number of people who have the
slightest understanding of fontinst and I seem to be the only one able to
write comprehensible documentation.  The big problem is that I don't
understand fontinst at all well.  I've not yet seen a copy of `TeX
Unbound', so I might change my mind.  I rather doubt it: I've been very
unimpressed with recent books on (La)TeX (The LaTeX Companion and Graphics
Companion both strike me as a terrible waste of paper, let alone money).

So...  I can't work out anything from the source code, but I can work out
some things from observing fontinst's behaviour.  With any luck, I'll work
out how to ask the right questions to get the small amount of extra
information that I need.  Yes, really: I really do think I only need a
small amount of extra information, because I don't think I need to
understand the details of fontinst's internal behaviour.