[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A question about \DeclareFontShape
On Mon, 15 Dec 1997, Rebecca and Rowland wrote:
> 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).
Yes.
> 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?
\DeclareFontShape{...}{...}{...}{...}{
<-> *[0.9] foo}
If e.g. size 8pt is requested, load font foo at size 8pt * 0.9 = 7.2pt.
This is useful for combining PS fonts with CM fonts.
> >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?
To inform the user that e.g. in case of scaling, you get only messages in
the log file and not on the terminal.
> >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).
yes.
> >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)?'
yes.
> >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?
The user will be informed that a specific font is not available and has to
be replaced with another one.
> >ssub
> >Silent variant of `sub', only loggings.
>
> What messages are suppressed here?
Nothing will be really suppressed; you'll find the messages always in the
logfile, but the silant variant doesn't write something to the terminal.
> >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?
If I remember correctly, only if you specify a scaling factor.
> 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?
The optional argument is (usually) a scaling factor -- you make look into
my CJK package (<CTAN>/language/chinese) to see how new scaling functions
are defined and used (some of them have an optional argument which isn't a
scaling factor).
Werner