From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110594 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:31:59 -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="===============0946405330622896102==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24964"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 15 22:34:46 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 1lBlW1-0006Jg-Jq for gctc-ntg-context-518@m.gmane-mx.org; Mon, 15 Feb 2021 22:34:45 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 468E3280A65; Mon, 15 Feb 2021 22:32:15 +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 Rq8P_fDWBQZZ; Mon, 15 Feb 2021 22:32:13 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 68B66280A6C; Mon, 15 Feb 2021 22:32:13 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5BFD22805D4 for ; Mon, 15 Feb 2021 22:32:12 +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 ZUh7nDVR193C for ; Mon, 15 Feb 2021 22:32:11 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.219.172; helo=mail-yb1-f172.google.com; envelope-from=bateni@gmail.com; receiver= Original-Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (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 527E860C for ; Mon, 15 Feb 2021 22:32:11 +0100 (CET) Original-Received: by mail-yb1-f172.google.com with SMTP id k4so8515413ybp.6 for ; Mon, 15 Feb 2021 13:32:11 -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; bh=Ym+aa4fxWRnouMuDbSYIyuOUUiBCnAl57ZRrrnjgJfk=; b=Yurw2vi4sTqqDF/R7FAAP/B56QXcWNlujMe7WAaMGwrRuMK2QrR93ktW83/5BhT938 RX1i386Q/8ZrsrEgDzIlCmU1NW6scuYQDFeqZInXIoIPMkMLRUYm2z8ArZiEEzHTjGsC h2CUQ0HcRCcUbPQVhoVS2tSGolUYpckDyAEwwV9gG+LRJ/nVH9SKPYkcImpLzmBS41uy BDgPF/scp1JUfPuOUd2mxvVoS+ipU+f/0Djyw9Sz7xYq9/v21fqUL0dCc+4E+Ji5pw5B nO1BLfyXAR5RxeD0LcHx9U6nM8a4Q4ng+XbsoyT3xLu/ZR7bEJX5WCS0hxl2BjkJLAnj FH9Q== 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; bh=Ym+aa4fxWRnouMuDbSYIyuOUUiBCnAl57ZRrrnjgJfk=; b=GKjIgWF7qApFp+6C7AlkwotJmixALHY3FXFSzjMv/R/qIefMNncwQen9SbjSI/7N0U /wRuREjPSC6EI1bkN6s0vYBHVkE968LnxG4xnQUugxQZIbdWl9Daec79lC2wi0I00lJn t3VQEjupqiEsthrsIZZgTwMArGolYb1eS49qvCM/du4EqsuObRRAJatqrNGlVesnCCkg cdQl8nkOqZCZbEh2KgvMj5kMfaOxqRLZfwc8Tlczefb6OGhNBLnfMGqBtadlg/i5150/ 1XH3EcIPQhJMcsVxxlm++U5CxHcgeV/lLfy0wE1ErnZYdlJLA5c35S/UDIGBsfku6UMU pRQw== X-Gm-Message-State: AOAM533CRlDymbz7mCeDOsDFFpp0ER5AQGUDvzA8OER7oyI5WDjFbMjj g6WdZxCaHmNKLwyAkAHdPXqT30gVNuVHotBd4PwZ+56pJTk= X-Google-Smtp-Source: ABdhPJwIRmmcpORXcacF10XPQyIAdTrbVVJRIA9q8byHtmbog2fnmO1S7RqOWXje7Ayb7Uj6gGA12jD2fyr/mAbDMjI= X-Received: by 2002:a25:4b02:: with SMTP id y2mr25495578yba.353.1613424730071; Mon, 15 Feb 2021 13:32:10 -0800 (PST) In-Reply-To: <2e686683-ae74-2943-f496-f70d667fd428@gmx.es> 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:110594 Archived-At: --===============0946405330622896102== Content-Type: multipart/alternative; boundary="000000000000e8678105bb66b7fe" --000000000000e8678105bb66b7fe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the quick response, Pablo. I already use typescripts (\definetypeface, \definefontsynonym and \definefontfallback): https://github.com/bateni/dabeer/tree/master/texmf-local/tex/context/fonts/= mkiv By arbitrary style, I meant something like: \definefontfamily[myface][CUSTOM][TeX Gyre Pagella]] https://wiki.contextgarden.net/Font_Switching says fontstyle is rm, ss, tt, mm, hw, cg, ... Because the the three dots at the end, I thought it would be possible to define new fontstyles. But I get an error if I do so. So I usually use \definefont to set up one-off fonts for specific use-cases such as special headings or an artwork, etc. I was wondering if I can easily apply fontfallbacks for those. On Mon, Feb 15, 2021 at 3:52 PM Pablo Rodriguez wrote: > 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. > > > When we define a font via typescript commands, we can specify rm, ss, > > tt, mm, hw and cg shapes for it. Can we add arbitrary styles? > > For example, I would use this for quotations, headings, etc. Currently= , > > I either have to spare ss or use \definefont for such scenarios. > > The new commands are \definefallbackfamily and \definefontfamily. > > A sample document, in case it might help (GFS Heraklit at > https://greekfontsociety-gfs.gr/_assets/fonts/GFS_Heraklit.zip): > > \definefallbackfamily > [mainface] > [rm] > [GFS Heraklit] > [preset=3Drange:greek, > force=3Dyes] > > \definefontfamily > [mainface] > [rm] > [TeX Gyre Pagella] > > \setupbodyfont > [mainface] > > \starttext > \agr\input aristotle-grc > > \de\input aesop-de > \stoptext > > Sorry, but unless you provide a minimal sample, it isn=E2=80=99t easy to = guess > what you might have in mind. > > I=E2=80=99m afraid that I=E2=80=99m not sure whether the following sample= contains your > =E2=80=9Carbitrary styles=E2=80=9D. > > \setupinteractionscreen[option=3Dmax] > > \definefontfamily > [mainface] > [rm] > [TeX Gyre Pagella] > [it=3D{TeX Gyre Cursor-Italic}, > bf=3D{TeX Gyre Adventor-Bold}, > bi=3D{TeX Gyre Termes-BoldItalic}] > > \setupbodyfontenvironment > [default] > [em=3Ditalic] > > \setupbodyfont[mainface] > > \starttext > \startTEXpage[offset=3D1em] > Roman font {\em & italic} > > {\bf Bold font \em & bold italic} > \stopTEXpage > \stoptext > > Feel free to explain what your needs are. > > I hope it helps, > > Pablo > -- > http://www.ousia.tk > > _________________________________________________________________________= __________ > 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 > > _________________________________________________________________________= __________ > --000000000000e8678105bb66b7fe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the quick response, Pablo.=C2=A0 I already use = typescripts (\definetypeface,=C2=A0\definefontsynonym=C2=A0and \definefontf= allback):=C2=A0https://github.com/bateni/dabeer/tree/maste= r/texmf-local/tex/context/fonts/mkiv

By arbitrary st= yle, I meant something like:

\definefontfamily= [myface][CUSTOM][TeX Gyre Pagella]]

https://wiki.contextgarden.net/= Font_Switching says fontstyle is rm, ss, tt, mm, hw, cg, ...
= Because the the three dots at the end, I thought it would be possible to de= fine new fontstyles.=C2=A0 But I get an error if I do so.

So I usually use \definefont to set up one-off fonts for specific u= se-cases such as special headings or an artwork, etc.=C2=A0 I was wondering= if I can easily apply fontfallbacks for those.

On Mon, Feb 15, 2021= at 3:52 PM Pablo Rodriguez <oinos@gmx.e= s> wrote:
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 a= s
> 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.

> When we define a font via typescript commands, we can specify=C2=A0rm,= ss,
> tt, mm, hw and cg shapes for it.=C2=A0 Can we add arbitrary styles?=C2= =A0
> For=C2=A0example, I would use this for quotations, headings, etc.=C2= =A0 Currently,
> I either have to spare ss or use \definefont for such scenarios.

The new commands are \definefallbackfamily and \definefontfamily.

A sample document, in case it might help (GFS Heraklit at
https://greekfontsociety-gfs.gr/_asset= s/fonts/GFS_Heraklit.zip):

=C2=A0 \definefallbackfamily
=C2=A0 =C2=A0 [mainface]
=C2=A0 =C2=A0 [rm]
=C2=A0 =C2=A0 [GFS Heraklit]
=C2=A0 =C2=A0 [preset=3Drange:greek,
=C2=A0 =C2=A0 =C2=A0force=3Dyes]

=C2=A0 \definefontfamily
=C2=A0 =C2=A0 [mainface]
=C2=A0 =C2=A0 [rm]
=C2=A0 =C2=A0 [TeX Gyre Pagella]

=C2=A0 \setupbodyfont
=C2=A0 =C2=A0 [mainface]

=C2=A0 \starttext
=C2=A0 =C2=A0 \agr\input aristotle-grc

=C2=A0 =C2=A0 \de\input aesop-de
=C2=A0 \stoptext

Sorry, but unless you provide a minimal sample, it isn=E2=80=99t easy to gu= ess
what you might have in mind.

I=E2=80=99m afraid that I=E2=80=99m not sure whether the following sample c= ontains your
=E2=80=9Carbitrary styles=E2=80=9D.

=C2=A0 \setupinteractionscreen[option=3Dmax]

=C2=A0 \definefontfamily
=C2=A0 =C2=A0 [mainface]
=C2=A0 =C2=A0 [rm]
=C2=A0 =C2=A0 [TeX Gyre Pagella]
=C2=A0 =C2=A0 [it=3D{TeX Gyre Cursor-Italic},
=C2=A0 =C2=A0 =C2=A0bf=3D{TeX Gyre Adventor-Bold},
=C2=A0 =C2=A0 =C2=A0bi=3D{TeX Gyre Termes-BoldItalic}]

=C2=A0 \setupbodyfontenvironment
=C2=A0 =C2=A0 [default]
=C2=A0 =C2=A0 [em=3Ditalic]

=C2=A0 \setupbodyfont[mainface]

=C2=A0 \starttext
=C2=A0 \startTEXpage[offset=3D1em]
=C2=A0 Roman font {\em & italic}

=C2=A0 {\bf Bold font \em & bold italic}
=C2=A0 \stopTEXpage
=C2=A0 \stoptext

Feel free to explain what your needs are.

I hope it helps,

Pablo
--
http:/= /www.ousia.tk
___________________________________________________________________________= ________
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
___________________________________________________________________________= ________
--000000000000e8678105bb66b7fe-- --===============0946405330622896102== 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== --===============0946405330622896102==--