ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mohammad Hossein Bateni <bateni@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Pablo Rodriguez <oinos@gmx.es>
Subject: Re: set fallback in \definefont
Date: Mon, 15 Feb 2021 16:55:44 -0500	[thread overview]
Message-ID: <CAMHZ1dbnqqvYTFBYYC3X++7AmJG5dKZhncSJ7p8yzQ04zy2MPg@mail.gmail.com> (raw)
In-Reply-To: <d1280b25-74de-243a-61b8-ea0916b2660d@gmail.com>


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

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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3044 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:[~2021-02-15 21:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 19:47 Mohammad Hossein Bateni
2021-02-15 20:51 ` Pablo Rodriguez
2021-02-15 21:30   ` Wolfgang Schuster
2021-02-15 21:55     ` Mohammad Hossein Bateni [this message]
2021-02-15 21:31   ` Mohammad Hossein Bateni
2021-02-16 18:34     ` Wolfgang Schuster

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=CAMHZ1dbnqqvYTFBYYC3X++7AmJG5dKZhncSJ7p8yzQ04zy2MPg@mail.gmail.com \
    --to=bateni@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    /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).