Using fonts from the LaTeX Font Catalogue.
Philip Taylor
P.Taylor at Hellenic-Institute.Uk
Tue May 4 13:38:52 CEST 2021
Ulrike Fischer wrote:
>
> What is your problem? We can't in tex use some pop-up dialog to
> setup fonts, we have to add code. We can't preload the code for all
> existing fonts into the latex format, so some code has to be added
> at run time. Normally people don't want to copy&paste identical code
> around and fill up their preamble with it, so such code is in some
> external files so that it can be loaded from various documents.
My "problem" is with the idea that each font should require a separate
package before it can be used. If we take (for example) all fonts that
are supplied only in AFM/PFA/PFB formats, could there not be one
"AFMPFX" package that would make /all/ of them available ? And
--ditto-- for any other family of fonts that is differentiated from all
others families by the format(s) in which it is supplied, assuming that
the font format is the primary determinant as to how a particular font
should be used with LaTeX ?
>
> open type fonts make life a bit easier as you don't have to prepare
> tfm and vf-files, but they need code too and for some of the larger
> families there are a number of support packages, e.g. fira or
> libertine. How many lines does it take you to setup the fonts for a
> document? With all the (perhaps optical) fontsize, bold, italic,
> small caps etc? Do you do this setup always in the main tex file or
> do you have some prepared files you input?
>
I regard TeX as a never-ending search for excellence. Each time that I
start work on a new document (at the moment, for example, I am
typesetting a restaurant menu on B3-folded-B4), I carry forward in my
mind how I have handled analogous problems in the past, and then I try
to improve on it. Only in (literally) the last 24 hours have I
discovered how (for example) to save the current font selector, modify
the definitions of one or more font selectors, and then re-instate the
/a priori/ font selector with its revised meaning. I assumed (wrongly,
as it turned out) that one could just write :
\edef \currentfont {\the \font}%
<amend one or more font selectors>
\currentfont
but this does not work. Instead, I had to use :
\edef \currentfont {\the \font}%
<amend one or more font selectors>
\scantokens \expandafter{\currentfont}%
Only after discussions with David Carlisle (to whom many thanks, as
always) did I learn that "\the \font does not return the actual csname
used to select the font originally [but instead] returns an internally
generated token which displays using one of the names that was used with
that font". And that internally generated token does /something/, but I
wot not what (its expansion appears to be empty, in that nothing
untoward is typeset). I /think /that it selects "the font formerly
known as \<whatever>", but not "the font current selected by
\<whatever>". And I can find no mention of this at all in /The TeXbook/
— I still have to check /TeX by Topic/, /The
Advanced TeXbook/, /and //TeX in Practice /(vols~1–4)/.
--
//** Phil./
//
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20210504/831bc581/attachment.html>
More information about the texhax
mailing list.