From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110595 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: set fallback in \definefont Date: Mon, 15 Feb 2021 16:55:44 -0500 Message-ID: References: <2e686683-ae74-2943-f496-f70d667fd428@gmx.es> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1521350215254683827==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39607"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Pablo Rodriguez To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 15 22:56:18 2021 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 1lBlqr-000ABZ-4S for gctc-ntg-context-518@m.gmane-mx.org; Mon, 15 Feb 2021 22:56:17 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 38222280A5B; Mon, 15 Feb 2021 22:56:01 +0100 (CET) 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 J5wh0PAtNzSE; Mon, 15 Feb 2021 22:55:59 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 734FF280A5C; Mon, 15 Feb 2021 22:55:59 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 605E02805D4 for ; Mon, 15 Feb 2021 22:55:58 +0100 (CET) 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 3Br30MOMhIDP for ; Mon, 15 Feb 2021 22:55:57 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.219.171; helo=mail-yb1-f171.google.com; envelope-from=bateni@gmail.com; receiver= Original-Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 5F7FC60C for ; Mon, 15 Feb 2021 22:55:57 +0100 (CET) Original-Received: by mail-yb1-f171.google.com with SMTP id n195so8540117ybg.9 for ; Mon, 15 Feb 2021 13:55:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gTnJmYPtaL3P7EIyrnAC/bNlxehAAczJxIbpzWEHDU8=; b=ouuimJPJiq6Mx1D6vdyszSNsl/+QYMGor96SdNNqEPPMwyovvsOj+N1OMdr4Yl/1pn lYbqNDcNxyCX7J+lNiVNlRdEPQglMKIXehHHor8iL13fKMEFKeAxBWMEWSSTdUmg7ReS CpPThn2VreXKb++rjuOzoXQikr2/gbHLbBSzIRsRoD6kKC4DIOwEC/yPaA7hq83dwJNI a9Q5sbHY4CuhElBDjiDahAQuvAqFOAcqXPcYbGQtxT3824QAmQVfIYFbGvk/RFP86bUt O5HsVfS7MgB2XSi4oKzUeTJuUEQQ7hdpUOq8HyT+Vp9Go+HC5FgnpalYvoizIIttC9fF b2Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gTnJmYPtaL3P7EIyrnAC/bNlxehAAczJxIbpzWEHDU8=; b=nqfRq52IOJj1JaW+RZdTcadzeZKb2WPwSv3HpkEgHj/hPls9HuqBSD5khqSwyoRJfp 6P93PXE8gmrBpB9lysw8WfI221uL3ZvXj/RtxSaJE3uiUdmp3LsabXzGXpl93fY1mJYe fuwW2uH/cP+IKOBJKlRZE7IAQaucm1KtwYZ4ArmNC+XzsZepTxfLAxoudptXDUw7hfBe sAOG0lw9Tkr/TQO3sJ5IXqAN+uu32yVFILPGlC+LqzzEzq0I8MRo40cEOIr5/MvUcov2 tvsuuZtAjBZZD7yFZx+lJp3SWpNtN4gVVpZhz55tCJjDNd6LbNIR1MdvwSN9lbdUPWvz 2Jiw== X-Gm-Message-State: AOAM532XyYud9hsRCDA3mlEU7M9cpXJMR/wApyEF8QV0+EiDJO0Tr9AZ Zt16QpU4CSPQ5IB4M3UoGUvZNx+SZ7Y2f0AFWdeECJeT X-Google-Smtp-Source: ABdhPJx8JZaIGvpDomf9OOFvudPAeul23e2OE+md+EmoSQZYyX0eM8eq80zHUB/2ssWo2VL9ijKym9Jz+BUfACzDmn4= X-Received: by 2002:a25:dec2:: with SMTP id v185mr23975846ybg.145.1613426155864; Mon, 15 Feb 2021 13:55:55 -0800 (PST) In-Reply-To: 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:110595 Archived-At: --===============1521350215254683827== Content-Type: multipart/alternative; boundary="000000000000e443f505bb670c80" --000000000000e443f505bb670c80 Content-Type: text/plain; charset="UTF-8" Thanks, Wolfgang. This works pretty well. On Mon, Feb 15, 2021 at 4:31 PM Wolfgang Schuster < wolfgang.schuster.lists@gmail.com> wrote: > > > Pablo Rodriguez schrieb am 15.02.2021 um 21:51: > > On 2/15/21 8:47 PM, Mohammad Hossein Bateni wrote: > >> Hi, > >> > >> Is there a way to set the fallback for fonts when we define them not as > >> a typescript but using \definefont? > >> > >> \definefont[MyFont][Font.otf*MyFeatures] > >> > >> Is there a default fallback one can specify? > >> Is simplefonts module deprecated or discouraged now? > > > > Hi Mohammad, > > > > the simplefonts module has been deprecated, since it has been > > implemented in the ConTeXt core (see below). > > > > \definefontfallback might be the command you are looking for. > > You need also \definefontsynonym but it's easier to create a new > typeface (fontfamily) and load it with \switchtobodyfont. > > \definefontfallback > [AnotherFontFallback] > [file:texgyreherosregular*default] > [lowercasenormal] > [force=yes] > > \definefontsynonym > [AnotherFontMain] > [file:texgyrepagellaregular] > [fallbacks=AnotherFontFallback] > > \definefont [AnotherFont] [AnotherFontMain*default] > > \starttext > > \dorecurse{26}{\convertnumber{A}{\recurselevel}\space}\par > \dorecurse{26}{\convertnumber{a}{\recurselevel}\space} > > \AnotherFont > > \dorecurse{26}{\convertnumber{A}{\recurselevel}\space}\par > \dorecurse{26}{\convertnumber{a}{\recurselevel}\space} > > \stoptext > > Wolfgang > > ___________________________________________________________________________________ > 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 > > ___________________________________________________________________________________ > --000000000000e443f505bb670c80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, Wolfgang.=C2=A0 This works pretty well.

<= div class=3D"gmail_quote">
On Mon, Feb= 15, 2021 at 4:31 PM Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:


Pablo Rodriguez schrieb am 15.02.2021 um 21:51:
> On 2/15/21 8:47 PM, Mohammad Hossein Bateni wrote:
>> Hi,
>>
>> Is there a way to set the fallback for fonts when we define them n= ot as
>> a typescript but using \definefont?
>>
>> \definefont[MyFont][Font.otf*MyFeatures]
>>
>> Is there a default fallback one can specify?
>> Is simplefonts module deprecated=C2=A0or discouraged now?
>
> Hi Mohammad,
>
> the simplefonts module has been deprecated, since it has been
> implemented in the ConTeXt core (see below).
>
> \definefontfallback might be the command you are looking for.

You need also \definefontsynonym but it's easier to create a new
typeface (fontfamily) and load it with \switchtobodyfont.

\definefontfallback
=C2=A0 =C2=A0[AnotherFontFallback]
=C2=A0 =C2=A0[file:texgyreherosregular*default]
=C2=A0 =C2=A0[lowercasenormal]
=C2=A0 =C2=A0[force=3Dyes]

\definefontsynonym
=C2=A0 =C2=A0[AnotherFontMain]
=C2=A0 =C2=A0[file:texgyrepagellaregular]
=C2=A0 =C2=A0[fallbacks=3DAnotherFontFallback]

\definefont [AnotherFont] [AnotherFontMain*default]

\starttext

\dorecurse{26}{\convertnumber{A}{\recurselevel}\space}\par
\dorecurse{26}{\convertnumber{a}{\recurselevel}\space}

\AnotherFont

\dorecurse{26}{\convertnumber{A}{\recurselevel}\space}\par
\dorecurse{26}{\convertnumber{a}{\recurselevel}\space}

\stoptext

Wolfgang
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000e443f505bb670c80-- --===============1521350215254683827== 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== --===============1521350215254683827==--