From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93707 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: font switches: bold, slanted, etc. Date: Sat, 13 Feb 2016 18:11:39 +0100 Message-ID: <56BF63CB.3090109@gmail.com> References: <20160212162306.42e612a9@cea.fr> <56BEFD12.5040700@gmail.com> <20160213033051.1b90b50b@cea.fr> <56BF09D8.7000007@gmail.com> <20160213085502.1421bb9f@cea.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2773297939184133284==" X-Trace: ger.gmane.org 1455383546 5143 80.91.229.3 (13 Feb 2016 17:12:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Feb 2016 17:12:26 +0000 (UTC) Cc: mailing list for ConTeXt users To: Alan BRASLAU Original-X-From: ntg-context-bounces@ntg.nl Sat Feb 13 18:12:14 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aUdjy-00080H-AS for gctc-ntg-context-518@m.gmane.org; Sat, 13 Feb 2016 18:12:14 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C553D69F0; Sat, 13 Feb 2016 18:11:56 +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 Mnl9girYoZSa; Sat, 13 Feb 2016 18:11:55 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 854236621; Sat, 13 Feb 2016 18:11:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1302759EF for ; Sat, 13 Feb 2016 18:11:54 +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 bjH_QlySkAhE for ; Sat, 13 Feb 2016 18:11:53 +0100 (CET) Original-Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 00940560 for ; Sat, 13 Feb 2016 18:11:42 +0100 (CET) Original-Received: by mail-wm0-f49.google.com with SMTP id g62so99720466wme.0 for ; Sat, 13 Feb 2016 09:11:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=MVW7zGNLt9KCYI+rBrrzemk3N8bNMebHkQzmzRpIRKM=; b=Pa2uSxmVwMlH81G1hBLjyawHqaKI7XbAduzHI7RtDGip9chrVr1NsJSYoxahnGi632 Vvfgn5m6aEaJuM7Ey/W+9i/dGvx49ZmRvxyQGZVYZyT2Kqc5+odLMqls7vkLJB9RUGwT Dr5ToklaokHOCVXersa2QGJlSEeo2WwObdJ+4dReETx+DY8wsm5CYqj7jAtYA3iqrwXG bUfPoal6POIyOrUpPnvcgoQmVFd1rUkz29y0GN2YGgGW4XeIEk0VB+4fEaFO9lypmDWh s41qZuzO91uA1eWx9LO0kWN07CZPpcOyxZH9zufORcTvjVOF5HoKRSzmsSsowAPAXbc+ 6eVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=MVW7zGNLt9KCYI+rBrrzemk3N8bNMebHkQzmzRpIRKM=; b=X1GKGN57Zf/D0sGw/AIwgalBrORnNBxBRu49z4DWpn+Zk5Ra+Pb846kFssrZSVVWab ZMQ0hlRyo6Re90KSWdUffKthPjX2kkvgwJpwHfw6HMVklf+Bg/VQxBBgB+LlcWUckPnv LfQIPus2g73lAWHhzpDuquToQg3oUqj57mPzphG6A62P/cZ0TViblQaBvhbJvzHAupBt fBK7qKzeHqEwBdJFU9frsG4JrmI3NXOF5FOwF7muGWYUs8UK1Y6mIEkU/C7RJT6HJ9Af NJAx4uG6s7MUwwyRGAfe/Py+oyG1MGZ1wfrYZbXSMmMEOJB06guDxyRQP+2jjZDBkWP7 71SQ== X-Gm-Message-State: AG10YOQy7Jvhgrt7QaLNoifhOTCsQsnGBazrgAybodwsmrUW2tp9FQugC2Wvmt5bqgbqbw== X-Received: by 10.194.63.202 with SMTP id i10mr7550892wjs.118.1455383502590; Sat, 13 Feb 2016 09:11:42 -0800 (PST) Original-Received: from keima.localdomain (x2f2ed47.dyn.telefonica.de. [2.242.237.71]) by smtp.gmail.com with ESMTPSA id c136sm7505024wmd.3.2016.02.13.09.11.41 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Feb 2016 09:11:41 -0800 (PST) User-Agent: Postbox 4.0.8 (Macintosh/20151105) In-Reply-To: <20160213085502.1421bb9f@cea.fr> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:93707 Archived-At: This is a multi-part message in MIME format. --===============2773297939184133284== Content-Type: multipart/alternative; boundary="------------090406030102000801080701" This is a multi-part message in MIME format. --------------090406030102000801080701 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > Alan BRASLAU > 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 --------------090406030102000801080701 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
13= .=20 Februar 2016 um 16:55
On Sat, 13 Feb 2016=20 11:47:52 +0100

Thank you.

This is nice,=20 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=20 easily made to use this \feature automagically if it exists in
the=20 font? Maybe it does this already:

\setupbodyfont[pagella]

\= starttext

Text {\bf Text \feature[+][smallcaps]Text}

Text {\bf Text \smallcaps=20 Text}

\stoptext
The \smallcaps command only enables the feature in the font but it=20 performs no check.

You can use the \doifelsecurrentfonthasfeatur command to check if a=20 feature is present
in the currently used font.

\def\autosmallcaps
=C2=A0 {\doifelsecurrentfonthasfeature{smcp}\setsmallcaps\sc}

\starttext

{Text \autosmallcaps Text} {\it Text \autosmallcaps Text} {\bf Text=20 \autosmallcaps Text}

\blank \setupbodyfont[pagella]

{Text \autosmallcaps Text} {\it Text \autosmallcaps Text} {\bf Text=20 \autosmallcaps Text}

\stoptext

Wolfgang
--------------090406030102000801080701-- --===============2773297939184133284== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============2773297939184133284==--