As far as I can tell (by experimentation), bodyfont environment
features resolve in this order:
* matching size in the current file
* default environment in the current file
* matching size in 'font-pre.mkiv'
* default environment in 'font-pre.mkiv'
* default to 1.0 otherwise
This applies to individual features such as 'a' and 'b' and not entire
blocks. For example, if the [12pt] block provides 'a' but not 'b'
while the [default] block provides 'a' and 'b', then both blocks will
be used: 'a' from [12pt] and 'b' from [default].

With one exception: the 'x' and 'xx' sizes cannot be modified by the
current file:

    \setupbodyfontenvironment [default] [x=2.0,xx=2.0]
      m{\tfx m}{\tfxx m}

Furthermore there seems to be some extraneous output when the
bodyfontenvironment matches the current bodyfont size. For example,
the following outputs: "m12.0ptm12.0ptm"

    \setupbodyfontenvironment [12pt] [m=2.0,n=2.0,]
      m{\tfm m}{\tfn m}

On Sat, Jan 19, 2019 at 3:59 AM Wolfgang Schuster
<> wrote:
> Why do you need this when you can just change the style of commands
> with use \tfx (e.g. \high or \low) to use the \tfm size?

With that out of the way, I don't know how to change commands which
use '\tfx' to use '\tfm' instead. Unless you mean this (though
technically they still use '\tfx', it just matches '\tfm'):

    \setupbodyfontenvironment [default] [m=0.8,n=0.6,x=0.8,xx=0.6]

Even if that did work, which it doesn't (see above), it would be
preferable to use the default bodyfont environment shipped by ConTeXt.
It probably exists for good reasons: matching the most common optical
font sizes, for aesthetics, and for consistency. I don't want the 'x'
and 'xx' sizes to vary between standard ConTeXt documents, and
documents which need to provide the 'n' and 'm' sizes.

It's also more work, as mentioned further up the thread. It may not be
strictly necessary to specify 'x' and 'xx' for each new size-specific
bodyfont environment, as they'll be inherited from [default]. But for
consistency each bodyfont size should have 'x' and 'xx' sizes matching
those from ConTeXt, and these vary with bodyfont size. That means
looking them up in 'font-pre.mkiv', a little math, and remembering to
do it every time you switch sizes. And that's ignoring the fact that
'\definebodyfont' can also override these sizes. I think using a macro
is simpler.
If your question is of interest to others as well, please add an entry to the 

maillist : /
webpage  : /
archive  :
wiki     :

Reply via email to