Behaviour of \latinfamily
Rebecca and Rowland
rebecca@astrid.u-net.com
Sat, 30 May 1998 04:22:34 +0100
>Rebecca and Rowland wrote:
>
[snip]
>Slantfont is a standard TeX font parameter (explained in one of the
>TeXbook appendices if I remember rightly), the only difference with the
>fontinst version is that it's measured in AFM units (ie 1000:1). It's
>measured as forward slant, as a fraction of height, so 167 = 16.7%
>forward slant, ie in a 10pt font the letters stick out to the right by
>1.67pt.
I see - thanks. It's appendix F, by the way.
>> Righto - can you give me an idea where I might find the v1.509 docs?
>
>I'll attatch the v1.509 PS file.
Got it; thanks. And MacGS View managed to render and print it without
crashing.
[snip useful confirmations]
>> Erm... Is what happens if you're using \latinfamily? Or if you're not
>> using \latinfamily? Can you give an example of what you mean?
>
>Yes, this is what \latinfamily does. If you say
>
> \latinfamily{ptmx}{}
>
>then \latinfamily is defined:
>
> \def\latinfamily#1#2{{
> \edef\temp_command{#1}
> \expandafter\parse_family\temp_command
> \empty_command\empty_command\end_parse_family
> \installfonts
> \installfamily{T1}{#1}{#2}
> \installfamily{OT1}{#1}{#2}
> \if_file_exists{ \raw_encoding.mtx }\then
> \installfamily{\raw_encoding}{#1}{#2}
> \fi
> \latin_weights
> \endinstallfonts
>}}
>
>so what happens is:
>
> \edef\temp_command{ptmx}
>
>defines \temp_command |-> ptmx
>
> \expandafter\parse_family\temp_command
> \empty_command\empty_command\end_parse_family
>
>expands to:
>
> \parse_family ptmx
> \empty_command\empty_command\end_parse_family
>
>(this trickery is necessary in case anyone does something like
>\def\foo{ptmx}\latinfamily{\foo}{}).
Bleh. No wonder I couldn't make any sense out of it.
>Now we call \parse_family which is defined:
>
>\def\parse_family #1#2#3#4#5\end_parse_family{
> \edef\font_family{#1#2#3}
> \edef\font_variant{#4#5}
> \edef\raw_variant{#4#5}
> \edef\latex_family{#1#2#3#4#5}
> \ifx#4x
> ...expert stuff...
> \else
> ...non-expert stuff...
> \fi
>}
>
>so the parameters get matched:
>
> #1 = p
> #2 = t
> #3 = m
> #4 = x
> #5 = \empty_command\empty_command
>
>so after the \edef's we get:
>
> \font_family |-> ptm
> \font_variant |-> x
> \raw_variant |-> x
> \latex_family |-> ptmx
>
>and since #4 is `x' the ...expert stuff... is executed.
>
>Oh what fun...
Isn't it just? Thanks for this. One question: I take it that the
\latex_family parameter is what's used to build the fd file, so this
example will produce an fd file called OT1ptmx.fd (or T1ptmx.fd)? What job
to \font_variant and \raw_variant do?
Ta muchly
Rowland.