[NTG-context] \switchtobodyfont behaves differenctly with splitted parameters

Pablo Rodriguez oinos at gmx.es
Sun Nov 8 10:38:28 CET 2020


On 11/8/20 2:35 AM, Sylvain Hubert wrote:
> Dear List,
>
> after hours of debugging, I finally found out that
> \switchtobodyfont[face, 20pt] does NOT behave the same with
> \switchtobodyfont[face]\switchtobodyfont[20pt]. In my case the latter is
> the correct one, while the former does nothing but falling back to
> latinmodern.
>
> Does anyone know when or why \switchtobodyfont behaves differently with
> splitted and joined parameters?

Hi Sylvain,

as a general rule, it helps when there is a minimal sample that provides
the problematic behavior.

I don’t get diffferent results:

  \definefontfamily[mainface][rm][TeX Gyre Pagella]
  \definefontfamily[face][rm][TeX Gyre Heros]
  \setupbodyfont[mainface]
  \startbuffer
  In my case, the latter is the correct one, while the former does
  nothing but falling back to latinmodern.\par
  \stopbuffer

  \starttext
  \getbuffer
  \switchtobodyfont[face]\switchtobodyfont[20pt]
  \getbuffer
  \switchtobodyfont[face, 20pt]
  \getbuffer
  \stoptext

Correct the sample to show what I got wrong from your message.

Pablo
--
http://www.ousia.tk


More information about the ntg-context mailing list