Behaviour of \latinfamily

Ulrik Vieth vieth@thphy.uni-duesseldorf.de
Fri, 29 May 1998 13:20:19 +0200


>> Then it calls \latin_weights, which does a number of calls such as
>> 
>> \latin_weight{r}{m}
>> \latin_weight{s}{sb}
>> \latin_weight{b}{b}
>> 
>> Each of these calls stores the arguments in the variables \font_weight
>> and \latex_weight and continues to call \latin_widths.

> Right. (I think).  Is \latex_weight used as the specifier in the fd file,
> and \font_weight used to find an appropriate afm/mtx file to build an
> output mtx/pl file from?

Exactly.  

>> \latin_widths, in turn, does a number of calls such
>> 
>> \latin_width{}{}
>> \latin_width{n}{c}
>> 
>> Each of these calls stores the arguments in the variables \font_width
>> and \latex_width and continues to call \latin_shapes.

> Is \latex_width the width specifier used in the fd file?  What exactly is
> \font_width used for?  Is it used to find an appropriate mtx/afm file?

Exactly.

>> \latin_shapes, in turn, does a number of calls such
>> 
>> \latin_shape{} {} {} {n}
>> \latin_shape{c}{c}{} {sc}
>> \latin_shape{o}{o}{} {sl}
>> \latin_shape{i}{i}{i}{it}
>> 
>> Each of these calls stores the arguments in the variables \font_shape,
>> \raw_shape, \encoding_shape and \latex_shape and continues to do some
>> actual processing for some particular combination of family, weight,
>> width, and shape.

> Excellent!  This is making sense (very nearly ;-)  One question:

> \latinshape{\font_shape}{\raw_shape}{\encoding_shape}{\latex_shape}

> Is \latex_shape the specifier used in the fd file?  What do the
> other three refer to exactly?  (I'd guess that \font_shape is used
> to find an appropriate afm/mtx file to turn into an output mtx/pl
> file, but what about the other two?)

I think you already got \latex_shape and \font_shape right.  As for
\raw_shape, I'm a litte confused myself.  I believe it may have to do
with faking shapes, in which case \raw_shape may be changed during
further processing.  Finally, \encoding_shape is a suffix that is 
appended to the encoding files.  It is primarily needed for OT1i.etx
vs. OT1.etx (pounds vs. dollar), T1i.etx and T1.etx may be identical.
Similarly, for faked small caps, \encoding_shape is set to 'c',
resuting in OT1c.etx and T1c.etx.

> [snip useful stuff]

>> * For the small caps shape, \fake_shape_c is called, which first looks
>> for a corresponding 8a-encoded .afm file of a real small caps font.
>> If it exists, it calls \fake_shape_ to do the same steps as above,
>> which implies running
>> 
>> \afmtomtx{<font>c8a}{<font>c8a}
>> \mtxtopl{<font>c8a}{<font>c8a}
>> \mtxtomtx{<font>c8a}{<font>c8r}
>> \mtxtopl{<font>c8r}{<font>c8r}


> Now then...  the <font> specifier is <foundry><family><weight>,
> right?  So fontinst looks for:

> FNNWc8a.afm in the first place.  

Let's rather say that <foundry> is included in <family> since fontinst
doesn't make a distinction internally, hence NNNWc8a.afm

> AFM files in this form full of `normal' glyph names, rather than
> stuff like `Asmall' etc., which is why a different etx file is used
> for `real' and `faked' sc founts.  Is that right?

I think so.  A real small caps font has glyph names such as 'a' and
'one', even though these are actually 'Asmall' and 'oneoldstyle'.
This way, a real small caps font can be installed with the standard
.etx file, whereas a faked font one needs a different .etx file.

> This is *incredibly* useful.  It's probably enough to keep me busy
> for a week or two - it's cleared up a lot of questions I had (and
> raised a handful more).

Hope it'll help.

Cheers, Ulrik.