From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: Alan BRASLAU <alan.braslau@cea.fr>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: font switches: bold, slanted, etc.
Date: Sat, 13 Feb 2016 18:11:39 +0100 [thread overview]
Message-ID: <56BF63CB.3090109@gmail.com> (raw)
In-Reply-To: <20160213085502.1421bb9f@cea.fr>
[-- Attachment #1.1: Type: text/plain, Size: 1054 bytes --]
> Alan BRASLAU <mailto:alan.braslau@cea.fr>
> 13. Februar 2016 um 16:55
> On Sat, 13 Feb 2016 11:47:52 +0100
>
> Thank you.
>
> This is nice, as TeX Gyre is a very good base for most use (unless one
> specifically needs/wants a different font). So I wonder if \smallcaps
> could be easily made to use this \feature automagically if it exists in
> the font? Maybe it does this already:
>
> \setupbodyfont[pagella]
>
> \starttext
>
> Text {\bf Text \feature[+][smallcaps]Text}
>
> Text {\bf Text \smallcaps Text}
>
> \stoptext
The \smallcaps command only enables the feature in the font but it
performs no check.
You can use the \doifelsecurrentfonthasfeatur command to check if a
feature is present
in the currently used font.
\def\autosmallcaps
{\doifelsecurrentfonthasfeature{smcp}\setsmallcaps\sc}
\starttext
{Text \autosmallcaps Text} {\it Text \autosmallcaps Text} {\bf Text
\autosmallcaps Text}
\blank \setupbodyfont[pagella]
{Text \autosmallcaps Text} {\it Text \autosmallcaps Text} {\bf Text
\autosmallcaps Text}
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2178 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2016-02-13 17:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 23:23 Alan BRASLAU
2016-02-13 1:14 ` Pablo Rodriguez
2016-02-13 10:02 ` Alan BRASLAU
2016-02-13 10:20 ` Pablo Rodriguez
2016-02-13 9:53 ` Wolfgang Schuster
2016-02-13 10:30 ` Alan BRASLAU
2016-02-13 10:47 ` Wolfgang Schuster
2016-02-13 15:55 ` Alan BRASLAU
2016-02-13 17:11 ` Wolfgang Schuster [this message]
2016-02-13 11:42 ` Hans Hagen
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=56BF63CB.3090109@gmail.com \
--to=schuster.wolfgang@gmail.com \
--cc=alan.braslau@cea.fr \
--cc=ntg-context@ntg.nl \
/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).