ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerben Wierda <gerben.wierda@rna.nl>
To: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: module article-basic interferes with \definebodyfont?
Date: Fri, 1 May 2020 13:58:19 +0200	[thread overview]
Message-ID: <027A4AE0-8BFB-471F-B99D-5EDD57A76060@rna.nl> (raw)
In-Reply-To: <82edd0f1-6f2c-4042-b0f6-7d5f958b9efd@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2448 bytes --]



> On 1 May 2020, at 13:22, Wolfgang Schuster <wolfgang.schuster.lists@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]
   \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]
\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.

G


[-- Attachment #1.2: Type: text/html, Size: 5075 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2020-05-01 11:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 11:15 Gerben Wierda
2020-05-01 11:22 ` Wolfgang Schuster
2020-05-01 11:58   ` Gerben Wierda [this message]
2020-05-01 13:43     ` Hans Hagen
2020-05-01 14:02     ` Wolfgang Schuster
2020-05-01 16:19       ` Gerben Wierda
2020-05-01 18:01         ` Hans Hagen
2020-05-01 21:33           ` Gerben Wierda
2020-05-01 22:32             ` Hans Hagen
2020-05-01 19:00         ` Wolfgang Schuster
2020-05-01 11:31 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=027A4AE0-8BFB-471F-B99D-5EDD57A76060@rna.nl \
    --to=gerben.wierda@rna.nl \
    --cc=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).