From: Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Bruce Horrocks via ntg-context <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: Re: Why does HerosBold give bold italic?
Date: Wed, 25 Aug 2021 14:56:29 +0200 [thread overview]
Message-ID: <b9edddae-484f-17de-8d22-81b72b61553a@gmail.com> (raw)
In-Reply-To: <CB0C86AF-65ED-4E3C-AB18-E80607135D7B@scorecrow.com>
Bruce Horrocks via ntg-context schrieb am 25.08.2021 um 14:28:
> Why does HerosBold give bold italic instead of just bold?
>
> \definefont[TestA][name:Heros at 14pt]
> \definefont[TestB][name:HerosBold at 14pt]
> \definefont[TestC][name:HerosItalic at 14pt]
> \starttext
> \TestA {The quick brown}
> \TestB {fox jumps over}
> \TestC {the lazy dog}
> \stoptext
I guess you try to use TeX Gyre Heros, when this is the case you use the
wrong names for the font. The correct names are in the following example.
Another problem is how you use the new font commands, unlike many other
user created commands \definefont creates a switch and you have to move
the left braces before the command.
\definefont [TestA] [name:texgyreheros*default at 14pt]
\definefont [TestB] [name:texgyreherosbold*default at 14pt]
\definefont [TestC] [name:texgyreherositalic*default at 14pt]
\starttext
{\TestA The quick brown}
{\TestB fox jumps over}
{\TestC the lazy dog}
\stoptext
In my cases it is easier to use \switchtobodyfont rather than using a
fixed font style, below is a modified version of your example above.
While the example itself isn't very useful the method can be used to
change the font for a header, typing environment etc.
\usebodyfont[heros]
\starttext
\style[style={\switchtobodyfont[heros,14pt]}]{The quick brown}
\style[style={\switchtobodyfont[heros,14pt]\bf}]{fox jumps over}
\style[style={\switchtobodyfont[heros,14pt]\it}]{the lazy dog}
\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
___________________________________________________________________________________
next prev parent reply other threads:[~2021-08-25 12:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 12:28 Bruce Horrocks via ntg-context
2021-08-25 12:56 ` Wolfgang Schuster via ntg-context [this message]
2021-08-25 21:15 ` Bruce Horrocks via ntg-context
2021-08-26 3:52 ` Wolfgang Schuster 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=b9edddae-484f-17de-8d22-81b72b61553a@gmail.com \
--to=ntg-context@ntg.nl \
--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).