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

Re: Behaviour of \latinfamily



Hi there everybody,

Sorry I've been rather quiet on this one, it's just that any time I
think I can answer a question, someone (ie Sebastian or Ulrik) has
already answered it...

Also, for those who notice email addresses, I'm currently visiting
Chicago, and I'll be here for the forseeable future...

Anyway, on with the questions...

Rebecca and Rowland wrote:

> 1)
> What form the int exprs can take, and what they mean exactly (AJ's fontinst
> docs gives a list of integer expressions which does not include \slantfont,
> and \slantfont is the one example of an integer expression used in
> \transformfont.  Clearly something is wrong somewhere.)

The fontinst documentation gives the grammar for <integer expression>s. 
\slantfont is *not* an <integer expression>, it's a <transformed font>.
\slantfont is used, for example, in:

         \transformfont{ 
            \font_family\font_weight\font_shape\raw_variant
               \raw_encoding\font_width
         }{ 
            \slantfont{167}{
               \frommtx{ 
                  \font_family\font_weight\raw_variant 
                     \raw_encoding\font_width
               } 
            }
         } 

which (when applied to ptmro) expands to:

   \transformfont{ptmr8r}{\slantfont{167}{\frommtx{ptmr8r}}}

since the macros expand to:

   \font_family   ptm
   \font_weight   r
   \font_shape    o
   \raw_variant
   \raw_encoding  8r
   \font_width

In this code, the only <ingeger expression> is 167.

> Can you say \frompl{xxx} (needs xxx.pl)?  (not mentioned in any
> documentation)  If not, how can you turn a pl file into an mtx file so you
> can transform it?

Yes, as mentioned in the fontinst v1.509 docs, p. 10.

> 2)
> What exactly does \installrawfont do?

It's the same as \installfont, except that rather than generating VPL
files, it generates PL files.  It's there for if you want to convert a
font directly without doing any re-encoding, for example if you have a
FOO-encoded Times font which you want to use directly, you can say:

   \installfonts
      \installfamily{FOO}{ptm}{}
      \installrawfont{ptmrFOO}{ptmrFOO}{FOO}{FOO}{ptm}{m}{n}{<->}
   \endinstallfonts

the difference between this and the coversion done by \mtxtopl (which is
the usual filter used to generate pl files) is that \installrawfont
generates a font including ligaturing / kerning info, where \mtxtopl
does not.

The history of this is rather long and tedious, but it comes down to a
discussion about whether the 8r-encoded fonts generated by fontinst
should include lig/kern info or not (hence the stuff about `ligfull'
fonts in the source).  If they do, the files are twice as big, but if
they don't then the 8r fonts are useless for typesetting with directly
(they're only useful for generating VFs for).  In the end the decision
was that if the 8r.mtx file exists, then we should generate ligfull
fonts, so fontinst calls \installrawfont after each \transformfont in
order to add ligs/kerns to the transformed font.

> The \fake_shape_ definition mentions ligfull installation (if possible) and
> expert encoding amongst other things.  How do these relate to your
> explanation above, and what does a ligfull installation *mean*?

See above.  When fontinst is told to install a font, it parses the
family name (using \parse_family) and finds out if it's been asked to
install an `expert' font (variant x) or an `old style digits' font
(variant j or 9).  These set the values of the flags \if_expert_ and
\if_oldstyle_. 

It seems like you've taken on quite a challenge here: fontinst is one of
the hackiest programs in existance, and trying to work out what it does
without a PhD in TeXarcana is quite difficult (spot the
understatement)...

Alan.
--
Alan Jeffrey,  Visiting Associate Professor, CTI, DePaul University, USA
Lecturer in Theoretical Computer Science, COGS, University of Sussex, UK
ajeffrey@cs.depaul.edu      alanje@cogs.susx.ac.uk       +1 312 362 8322