From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107154 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Re: module article-basic interferes with \definebodyfont? Date: Fri, 1 May 2020 13:58:19 +0200 Message-ID: <027A4AE0-8BFB-471F-B99D-5EDD57A76060@rna.nl> References: <82edd0f1-6f2c-4042-b0f6-7d5f958b9efd@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="===============4979704867945469601==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="29771"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mailing list for ConTeXt users To: Wolfgang Schuster Original-X-From: ntg-context-bounces@ntg.nl Fri May 01 13:58:46 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUUJZ-0007ca-6w for gctc-ntg-context-518@m.gmane-mx.org; Fri, 01 May 2020 13:58:45 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F0C7818098A; Fri, 1 May 2020 13:58:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nYPd2p-LFWeU; Fri, 1 May 2020 13:58:21 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 18C53183676; Fri, 1 May 2020 13:58:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6155318345C for ; Fri, 1 May 2020 13:58:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t4n-KAf_28VT for ; Fri, 1 May 2020 13:58:19 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= Original-Received: from mail.rna.nl (mail.rna.nl [213.125.118.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id C0BC918098A for ; Fri, 1 May 2020 13:58:19 +0200 (CEST) Original-Received: from hermione.rna.nl (hermione.rna.nl [192.168.2.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.rna.nl (Postfix) with ESMTPSA id 6D5503DF82DD; Fri, 1 May 2020 13:58:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1588334299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NmKnxMOWJ4jt8s8K2BhqvTxAFeGAWbkKDpVaODGidqM=; b=SO8avSuB4RTjmLLNyPgNz+37BC1AwERe3BveZ7V/4Quek5QNRefwLPQFI2nLMqc5ZJQw6A 4Deei7rOoTro7t5lfmZYnzOhbyd+rgrkfZ6NVzb24yRkBZ4cPa+1uoLEoSufyJvLk5fpwO b2+Vm3F24iJLhuncvCD/zeMa0hEImN22xALUwQumF7AA8AEIY/Cw4VtczwxWabsS3cOq5c NAA4gu+ZKy2kFudqptL2sE/r/iDoazp4jjqKckxT6uuv0YZUT297hdISAS5guita8M7aF9 STBbjk8ho1o8hZInHowiqmoTnXJAbE+qUGgKlEILdfkdSEWljttmNxh85to/JQ== In-Reply-To: <82edd0f1-6f2c-4042-b0f6-7d5f958b9efd@gmail.com> X-Mailer: Apple Mail (2.3445.104.14) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:107154 Archived-At: --===============4979704867945469601== Content-Type: multipart/alternative; boundary="Apple-Mail=_76B5B02D-05EE-4161-B59F-C33F75E97083" --Apple-Mail=_76B5B02D-05EE-4161-B59F-C33F75E97083 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 1 May 2020, at 13:22, Wolfgang Schuster = wrote: >=20 > 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=3Ddefault] >> \definefontsynonym [SansBold] [file:Optima.ttc(Optima Bold)] = [features=3Ddefault] >> \definefontsynonym [SansItalic] [file:Optima.ttc(Optima = Italic)] [features=3Ddefault] >> \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold = Italic)] [features=3Ddefault] >> \stoptypescript >> \definetypeface [optima] [ss] [sans] [optima] [default] >=20 > Set a math font to avoid problems. >=20 >> \setupbodyfont [optima] >> \starttext >> \startMPpage[instance=3Ddoublefun] >> picture pic; >> pic :=3D textext("\definebodyfont[14.9pt][rm][default=3DRegular at = 14.9pt]\switchtobodyfont[14.9pt]\setupinterlinespace[16.9pt]\framed[align=3D= center,frame=3Doff,offset=3Dnone,width=3D335.350bp]{\colored[r=3D0.000, = g=3D0.000, b=3D0.000]{\rm (Artifact)\\}}"); >=20 > 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=3Ddefault] \definefontsynonym [SansBold] [file:Optima.ttc(Optima Bold)] = [features=3Ddefault] \definefontsynonym [SansItalic] [file:Optima.ttc(Optima Italic)] = [features=3Ddefault] \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold = Italic)] [features=3Ddefault] \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 --Apple-Mail=_76B5B02D-05EE-4161-B59F-C33F75E97083 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

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=3Ddefault]
   \definefontsynonym [SansBold]     =   [file:Optima.ttc(Optima Bold)]        =  [features=3Ddefault]
  =  \definefontsynonym [SansItalic]     = [file:Optima.ttc(Optima Italic)]      =  [features=3Ddefault]
  =  \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold = Italic)] [features=3Ddefault]
\stoptypescript
\definetypeface [optima] [ss] [sans] [optima] [default]

Set a math font to avoid = problems.

\setupbodyfont [optima]
\starttext
\startMPpage[instance=3Ddoublefun]
  = picture pic;
pic :=3D = textext("\definebodyfont[14.9pt][rm][default=3DRegular at = 14.9pt]\switchtobodyfont[14.9pt]\setupinterlinespace[16.9pt]\framed[align=3D= center,frame=3Doff,offset=3Dnone,width=3D335.350bp]{\colored[r=3D0.000, = g=3D0.000, b=3D0.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=3Ddefault]
  =  \definefontsynonym [SansBold]       = [file:Optima.ttc(Optima Bold)]       =  [features=3Ddefault]
  =  \definefontsynonym [SansItalic]     = [file:Optima.ttc(Optima Italic)]     =  [features=3Ddefault]
  =  \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold = Italic)] [features=3Ddefault]
\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

= --Apple-Mail=_76B5B02D-05EE-4161-B59F-C33F75E97083-- --===============4979704867945469601== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4979704867945469601==--