From: Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Michael Urban via ntg-context <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>,
Michael Urban <urban.m@ca.rr.com>
Subject: Re: Odd Font Behavior in startstop Group
Date: Sun, 6 Feb 2022 11:20:21 +0100 [thread overview]
Message-ID: <4d3821a3-dc6d-0d0f-79b4-d46089ec6f8f@gmail.com> (raw)
In-Reply-To: <FBA7C3D1-A296-4C20-B9A1-48DFB1DEEA28@ca.rr.com>
Michael Urban via ntg-context schrieb am 05.02.2022 um 20:28:
> I am experiencing an odd behavior switching text styles in a defined startstop group ("blockquote"). I get different behavior depending on whether the switchtobodyfont in the startstop definition includes the dummy {\it } and {\bf } text. If they are not there, the italic and boldface switches in the second blockquote revert to the gyreschola body font of the main text; but this only happens if there is an earlier blockquote with no style changes. This is with:
>
> [...]
>
> Do I need a newer version of ConTeXt, or am I doing something wrong?
> Fonts in ConTeXt are always perilous, alas. For me, anyway.
>
>
> \definefallbackfamily[story][serif][notoserif][range={greekandcoptic,greekextended},force=yes]
> \definefontfamily[story][serif][TeX Gyre Schola]
The following two font settings are wrong, you're passing the name of a
typescript for the third argument while \definefontfamily expects the
family name of a font.
Even though the usage of the command is wrong you didn't notice it
because as a fallback \definefontfamily uses the Latin Modern version of
the requested style when no font was found.
> \definefontfamily[story][sans][modern]
> \definefontfamily[story][mono][modern]
The correct settings for both settings are
\definefontfamily [story] [sans] [Latin Modern Sans]
\definefontfamily [story] [mono] [Latin Modern Mono] [features=none]
with the "features=none" for the mono font to ensure no ligatures are
formed.
An alternative for \definefontfamily is to use \definetypeface and
choose a predefined typescript for the Latin Modern family. You can
either use
\definetypeface [story] [ss] [sans] [modern] [default]
\definetypeface [story] [ss] [mono] [modern] [default]
which uses the 10pt optical size even for smaller and bigger sizes or
you enable optical sizes with the following typescript
\definetypeface [story] [ss] [sans] [modern-designsize] [default]
\definetypeface [story] [ss] [mono] [modern-designsize] [default]
> \definefontfamily[story][mm][TeX Gyre Pagella Math]
I recommend to load the math font with the provided typescript because
they ensure existing patches (e.g. spacing corrections) for the selected
font are applied.
\definetypeface [story] [mm] [math] [pagella] [default]
> \setupbodyfont[story,11pt]
>
> \definestartstop[blockquote]
> [
> before={ \blank \startnarrower \setupwhitespace[2pt] \setupindenting[none]
> \switchtobodyfont[termes]{\it }{\bf }% This is so weird. Put a comment marker after [termes] for a different result
> },
> after={ \stopnarrower \blank \indenting[next]},
> ]%
ConTeXt already provides a blockquote-environment which can be
configured to have the same style as your custom environment.
\startsetups [blockquote:style]
\switchtobodyfont[termes]
\setupwhitespace[2pt]
\stopsetups
\setupdelimitedtext
[blockquote]
[spacebefore=big,
style=\directsetup{blockquote:style},
indenting=none,
indentnext=yes]
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
___________________________________________________________________________________
next prev parent reply other threads:[~2022-02-06 10:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-05 19:28 Michael Urban via ntg-context
2022-02-06 7:34 ` śrīrāma via ntg-context
2022-02-06 10:20 ` Wolfgang Schuster via ntg-context [this message]
2022-02-06 12:36 ` śrīrāma via ntg-context
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=4d3821a3-dc6d-0d0f-79b4-d46089ec6f8f@gmail.com \
--to=ntg-context@ntg.nl \
--cc=urban.m@ca.rr.com \
--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).