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

A question about \DeclareFontShape



I've beeb trying to work out exactly how the \DeclareFontShape command
works (Yes, this is all going into the fontinst docs.  Yes, my head does
hurt.), and as usual, the documentation supplied with LaTeX isn't at all
helpful.  (If anyone can suggest a better place to ask these questions, I'd
like to know).

I'm quite happy with everything aside from the `loading info' argument,
which has me baffled.

For example, OT1cmr.fd has this entry:

\DeclareFontShape{OT1}{cmr}{m}{n}
   {  <5> <6> <7> <8> <9> <10> <12> gen * cmr
      <10.95> cmr10
      <14.4>  cmr12
      <17.28><20.74><24.88>cmr17}{}

Now then, I know what happens - you get to use cmr5, 6, ..., 12 (that's the
gen * cmr) for those sizes.  You also get cmr10 at 10.95pt, ..., cmr17 at
24.88pt.

But I'm not sure I understand how it works.  I gather that all the size
functions aside from fixed and sfixed force LaTeX to select a fount at the
requested size.  Is this right?  (I think it is; it doesn't seem to be
explicitly stated in the docs).

Now then, as it says in fntguide.tex,

>\LaTeX{} provides the following size functions, whose `inputs' are
>\m{fontarg} and \m{optarg} (when present).
>
>`' (empty)
>Load the external font \m{fontarg} at the user-requested size. If
>\m{optarg} is present, it is used as the scale-factor.

I'm not sure about this optional argument bit - could someone give an
example of its use?

>s
>Like the empty function but without terminal warnings, only
>loggings.

What's this business about warnings?  What warnings might one get from the
use of the empty size function?  And which warnings are suppressed?

>gen
>Generates the external font from \m{fontarg} followed by
>the user-requested size, e.g.~|<<8>> <<9>> <<10>> gen * cmtt|

Does this just mean `select the tfm file formed by concatenating the given
name with the size'?  (I assume the bit about the warnings is consistent).

>genb
>Generates the external font from \m{fontarg} followed by
>the user-requested size, using the conventions of the `ec' fonts.
>e.g.~|<<10.98>> genb * dctt| produces |dctt1098|.

Similarly, does this mean `select the tfm file formed by concatenating the
given name with the (size multiplied by 100)?'

>sub
>Tries to load a font from a different font shape declaration given by
>\m{fontarg} in the form \m{family}|/|\m{series}|/|\m{shape}.

The size function below implies that the sub size function causes messages;
what messages?  And where?

>ssub
>Silent variant of `sub', only loggings.

What messages are suppressed here?

>fixed
>Load font \m{fontarg} as is, disregarding the user-requested size.
>If present, \m{optarg} gives the ``at \ldots pt'' size to be used.
>
>sfixed
>Silent variant of `fixed', only loggings.

Do these size functions generate special messages?


And about the optional argument to size functions: the syntax specification
seems to me to indicate that all the size functions may take an optional
argument.  Is this so?  If it is, what sort of thing can you put in it?  If
not, is it just the:

empty
s
subf
ssubf
fixed
sfixed

size functions that take an optional argument?

Thanks (in hope)
Rowland.