Behaviour of \latinfamily

Rebecca and Rowland
Tue, 26 May 1998 13:20:54 +0100

Thanks for trying to help.  Unfortunately, I'm even more confused now.

At 11:56 am +0200 26/5/98, Ulrik Vieth wrote:
>> I'm particularly interested in:
>> 1) Exactly which files it looks for when it says, for example:
>INFO> to make LaTeX (family,weight,shape,width) pck,m,n,: seek pckk8r
>INFO> to make LaTeX (family,weight,shape,width) pck,m,sc,: seek pckkc8r
>INFO> to make LaTeX (family,weight,shape,width) pck,m,sl,: seek pckko8r
>INFO> to make LaTeX (family,weight,shape,width) pck,m,it,: seek pckki8r
>INFO> to make LaTeX (family,weight,shape,width) pck,m,n,c: seek pckk8rn
>INFO> to make LaTeX (family,weight,shape,width) pck,m,sc,c: seek pckkc8rn
>INFO> to make LaTeX (family,weight,shape,width) pck,m,sl,c: seek pckko8rn
>INFO> to make LaTeX (family,weight,shape,width) pck,m,it,c: seek pckki8rn
>INFO> to make LaTeX (family,weight,shape,width) pck,m,n,: seek pckm8r
>> (pckm8a.afm)
>> In the last case, it's clear that it's not found pckm8r.
>These messages are issued by tools/finst/fontinst.sty and eventually
>end up in the log file of /tmp/Fam_xxx/Fam_xxx.tex (which is normally
>deleted automatically if the fontinst run completed successfully).
>Try runnig
>  perl -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.

>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 file?

> 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.

>> 2) Exactly which transformations fontinst does when it's found a
>> particular file.  For example, when it said it was looking for
>> pckm8r, it found pckm8a, and then went on to do this:
>INFO> to make LaTeX (family,weight,shape,width) pck,m,n,: seek pckm8r
>This message came from
>where \raw_shape is empty and \latex_shape is 'n'.

Can you explain what this means?

>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.

Can you explain what this means?

>As a second step, \latin_shape calls
>  \csname fake_shape_\raw_shape\endcsname
>where \raw_shape is empty, i.e. \fake_shape_ is called,
>which does the following:
>* it checks if pckm8a.afm exists, then
>* if checks if pckm8r.afm exists, else

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?

>* it calls
>  \transformfont{pckm8r}{\reencodefont{8r}{\fromafm{pckm8a}}}
>  which produces the following output:
>> (pckm8a.afm)
>> Metrics written on pckm8a.mtx.
>> (pckm8a.mtx)
>> Raw font written on
>> (:TeX-inputs:za finst:8r.etx) (pckm8a.mtx)
>> Transformed metrics written on pckm8r.mtx.
>> (pckm8r.mtx)
>> Raw font written on
>* 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?

>> (pckm8r.mtx) (:TeX-inputs:za finst:8r.mtx) (:TeX-inputs:za finst:8r.etx)
>> (:TeX-inputs:za finst:8r.etx
>> Warning: \ligature for unknown slot `ffi'.
>> Warning: \ligature for unknown slot `ffl'.
>> Warning: \ligature for unknown slot `ff'.
>> ) (:TeX-inputs:za finst:8r.etx)
>> Font written on
>After skipping over some code relating to expert fonts, we return
>to the calling macro \latin_shape, which issues the message
>INFO> found pckm8r.mtx
>and eventually calls \latin_encodings, starting with

Can you explain what this means?

>INFO> run installfont with <pckm7t><pckm8r,latin><OT1><OT1><pck><m><n>
>> 3) And I'm also puzzled at the way it produces fd files.  Can anyone
>> provide a definitive explanation of how it decides what to put in an
>> fd file, and how to tell fontinst to add a particular fount and
>> fount substiution to an fd file.
>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?

>Whenever it finds a suitable match,

What's a suitable match, and what makes fontinst look for the things to
match?  Sorry if this question's a bit obscure, but I've no idea what
you're talking about.  fontinst just sits there until you start executing
commands.  Which commands cause it to exhibit this behaviour?

>it produces a .pl or .vpl file and
>a corresponding .fd file entry.  In the end, it adds substitutions
>for missing weights or shapes.

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.  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.

Can you explain what triggers fontinst to do a substitution?

>> Hope someone can help a bit
>Hope this helps more than a bit.

Unfortunately, I'm more confused now.

>  I'm afraid studying the code will
>be unavoidable, if you really want to know what's going on.

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.

Thanks for trying,