[NTG-context] module article-basic interferes with \definebodyfont?

Gerben Wierda gerben.wierda at rna.nl
Fri May 1 13:58:19 CEST 2020

> On 1 May 2020, at 13:22, Wolfgang Schuster <wolfgang.schuster.lists at gmail.com> wrote:
> Gerben Wierda schrieb am 01.05.2020 um 13:15:
>> The following code:
>> \enabletrackers[context.trace]
>> %\usemodule[article-basic]
>> \starttypescript [sans] [optima]
>>    \setups[font:fallback:sans]
>>    \definefontsynonym [Sans]           [file:Optima.ttc(Optima Regular)]     [features=default]
>>    \definefontsynonym [SansBold]       [file:Optima.ttc(Optima Bold)]         [features=default]
>>    \definefontsynonym [SansItalic]     [file:Optima.ttc(Optima Italic)]       [features=default]
>>    \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold Italic)] [features=default]
>> \stoptypescript
>> \definetypeface [optima] [ss] [sans] [optima] [default]
> Set a math font to avoid problems.
>> \setupbodyfont [optima]
>> \starttext
>> \startMPpage[instance=doublefun]
>>   picture pic;
>> pic := textext("\definebodyfont[14.9pt][rm][default=Regular at 14.9pt]\switchtobodyfont[14.9pt]\setupinterlinespace[16.9pt]\framed[align=center,frame=off,offset=none,width=335.350bp]{\colored[r=0.000, g=0.000, b=0.000]{\rm (Artifact)\\}}");
> You use \rm here which is used to switch to the serif typeface. When your goal is to enforce the upright alternative you use the wrong command because you need \tf for this.

Thank you, that got me the right info on ConTeXtgarden. I now use \tf and:

\starttypescript [sans] [optima]
   \definefontsynonym [Sans]           [file:Optima.ttc(Optima Regular)]     [features=default]
   \definefontsynonym [SansBold]       [file:Optima.ttc(Optima Bold)]        [features=default]
   \definefontsynonym [SansItalic]     [file:Optima.ttc(Optima Italic)]      [features=default]
   \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold Italic)] [features=default]

\definetypeface [optima] [ss] [sans] [optima] [default]
\definetypeface [optima] [rm] [serif] [optima] [default]
\definetypeface [optima] [tt] [mono] [modern] [default]
\definetypeface [optima] [mm] [math] [optima] [default]

\setupbodyfont [optima]

As I now understand it, I have now defined the typescript for sans, but created a setup that sans is the fallback. I have also defined rm, tt and mm explicitly.

But my guess is that if I had used ss instead of rm everywhere in my code it would have worked as well.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20200501/971bfe98/attachment-0001.htm>

More information about the ntg-context mailing list