On 2014-05-05 11:29, Michael Ash wrote:
Michael,
Wolfgang already answered most of your questions, at least by the
expedient means of teaching a man to fish. However, not all of the
questions are answered in the font manuals, and in particular your
question about the font fallbacks. (The word setups does not appear
in mfonts, and fallback appears once. In the MKIV font manual setups
appears once and fallback thrice. None provide your answer.)
Font definition in ConTeXt allows extreme degrees of indirection.
There is a lot of flexibility that follows from this. By defining
synonyms such as serif and serifbold and using these in the
document, the document can be written independently of the actual
fonts used. The names are to some degree arbitrary, but used
conventionally. There is nothing stopping you from placing a sans
font at the end of a chain of serif references.
Setups are at their simplest a way to bundle other commands for
reuse. They also provide a namespace mechanism and a mechanism for
group setting and resetting of values.
The ConTeXt source file type-fbk.mkiv (and undoubtedly something
similar for MKII) defines a set of font name synonyms in a
font:fallback: namespace that is useful for gracefully substituting
one font for another when required, as when the document calls for a
bold italic but the font in use does not have that style. You can
leave this out, or define your own fallback hierarchy if you wish.
So, the first part of the typescript above defines ezrasil as a
synonym for the serif face and associates it with the file sileot
and certain otf features labeled hebrew. The file naming and search
mechanism are well described in the manuals. The setups brings in
the standard set of substitutions that will be applied when the
document calls for serif styles that the specific font does not
offer.
The second part of the typescript defines another synonym
(confusingly also ezrasil) for the typeface and includes in it only
a roman face definition. In a latin script there would likely be
another definetypeface for the sans face, another for the mono face,
and a fourth for the math face. Setupbodyfont uses the name of a
typeface so defined. (You can see that this is a separate synonym by
substituting
\starttypescript [bart]
\definetypeface [bart] [rm] [serif] [ezrasil] [default]
\quittypescriptscanning
\stoptypescript
\setupbodyfont[bart]
for the similar lines further above.) With a latin face there would
have been additional occurrences of the first part of the typescript
as well for each of the different face variants.
As to why I have "sa 1" (scale at 1) in the KeterYG definition: This
is not needed, but it serves as a reminder that I have evaluated the
font and that this scale is okay for me. I find that when I mix
fonts, it helps to adjust the sizes. Ezra SIL needs to be scaled to
0.85 or so, but of course that depends on the other fonts in use and
one's own taste. (In LaTeX, the fontspec package provides a
mechanism to automatically scale fonts to match the x-height or full
height of one font to another. The process is manual here.)
I'll step aside now and let those who know better correct me.
--
Rik