From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94699 Path: news.gmane.org!not-for-mail From: Antoine Cailliau Newsgroups: gmane.comp.tex.context Subject: Re: Handling Optical Sizes for Minion Pro in Context (LuaTeX) Date: Mon, 9 May 2016 11:35:08 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6585939898255253872==" X-Trace: ger.gmane.org 1462787124 8832 80.91.229.3 (9 May 2016 09:45:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 May 2016 09:45:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 09 11:45:09 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 1azhkN-00081J-MG for gctc-ntg-context-518@m.gmane.org; Mon, 09 May 2016 11:45:03 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5FEE1C188; Mon, 9 May 2016 11:35:42 +0200 (CEST) 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 FY-7bmweWsq0; Mon, 9 May 2016 11:35:40 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id D869FC18A; Mon, 9 May 2016 11:35:40 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 81D7BC187 for ; Mon, 9 May 2016 11:35:39 +0200 (CEST) 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 LSMPd2MLyfDF for ; Mon, 9 May 2016 11:35:38 +0200 (CEST) Original-Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (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 BCCDEC186 for ; Mon, 9 May 2016 11:35:28 +0200 (CEST) Original-Received: by mail-lf0-f43.google.com with SMTP id m64so193163136lfd.1 for ; Mon, 09 May 2016 02:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Lb1O949zcRwyslmR/fE7uDfQrCVhD1xMkWd0q9C7ng4=; b=sni1WB7rlhlqus1v1WMuahNpaigpl0wbf5Fu9Jkbl8hy+W+DcZhrzUPl57X4YES3Zh 44e60GZJjIme+DelmneWaMoQAvdnve/VHlerd39+PBO1uL12cFknNpkgWU57ucHppKsu S59pXlCdZWxe1Dw9dYFDrGWRU4zII5LA52mkIUpt8AwHp7JbBIgCq7NauLY87L+6v9KF IwFdVd/UX/dX3Ufbmt6kp2/xUWw6kwgXiAulH7cXgdYOLcaWQYhrUxKofBeks/XssgzD Kh4/7awSNWakJ6Vzv31vVmYt2ed4ly6xTOfhVAG8UK6dw2MxP7sno9Rrtn/aEloeUAur 9L+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Lb1O949zcRwyslmR/fE7uDfQrCVhD1xMkWd0q9C7ng4=; b=ebPgJBk1gKzuvxcK/wgaRoAtNOEpdihPZov0fwEupcSyoU4ClGdwgedHRRCezxCalJ UuxL19nZAvmyfa54r6gGo5fUi3a+gjc6vBRhScKIVouPhXmVvKQm5h+mMDvEN5U0obHm JN55m33gmjAlihFP8qgGhBn4M8NphOOV3SCBhRp9swXkQd1ZLAiCIib5rzjstIZlI82p 0tXdTd2WshIM6hY79y084SAZZHtVl7MNK/e7+yGS/fpzstjr4MXu2jdj/AmuHHIjBe+m Ehqs+0NYzWLi8dNnkHNnWsJP66aJwBBiJpJ3zuPLlMG6dI94se6TcJrVKozt1MH8+7tN 7b1w== X-Gm-Message-State: AOPr4FUNw7mNjpWGXr+6JWUOIGR3VOeg1p7Nbut379w8jCIOeSrc+4d6AHNvAr9TO2Iv0HKzsXIB/BgZoDuwwQ== X-Received: by 10.25.206.130 with SMTP id e124mr14309755lfg.41.1462786528343; Mon, 09 May 2016 02:35:28 -0700 (PDT) Original-Received: by 10.112.130.197 with HTTP; Mon, 9 May 2016 02:35:08 -0700 (PDT) In-Reply-To: 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:94699 Archived-At: --===============6585939898255253872== Content-Type: multipart/alternative; boundary=001a11411f9e677e5c053265876a --001a11411f9e677e5c053265876a Content-Type: text/plain; charset=UTF-8 I found how to make it work with \switchtobodyfont, I was missing \definebodyfontenvironment for the sizes. And I had (obviously) to update the \definebodyfont with the correct sizes. But still, \tfxx and so do not switch to correct font. Thanks, Antoine On 9 May 2016 at 11:23, Antoine Cailliau wrote: > Hi, > > I'm continuing my quest for supporting Minion Pro font in my document. > > I defined the different sizes, as shown on contextgarden. But apparently, > it does not (fully) work. > > The problems are : > - When using \tfxx, \tfx, ... Regular font is always used, there is no > switch to appropriate font. > - When using \switchtobodyfont, switches are correct up to 12pt. After > that, it fallback on xits-mathbold > > Any help is welcome :-) > > The compiled file : > https://drive.google.com/file/d/0Bwo7pPA5_WkDdlNLbHdkMjg2dkU/view?usp=sharing > > The source: > > \definefontalternative[me] > ... > > \starttypescript [serif] [optical] [size] > > % design size 8 pt, size range (6 pt, 8.4 pt] > \definebodyfont [4pt,5pt,6pt,7pt,8pt] [rm] > [tf=SerifCaption sa 1, > it=SerifCaptionItalic sa 1, > me=SerifCaptionMedium sa 1, > mi=SerifCaptionMediumItalic sa 1, > se=SerifCaptionSemiBold sa 1, > si=SerifCaptionSemiBoldItalic sa 1, > bf=SerifCaptionBold sa 1, > bi=SerifCaptionBoldItalic sa 1] > > % design size 11 pt, size range (8.4 pt, 13 pt] > \definebodyfont [9pt,10pt,11pt,12pt] [rm] > [tf=SerifRegular sa 1, > it=SerifRegularItalic sa 1, > me=SerifRegularMedium sa 1, > mi=SerifRegularMediumItalic sa 1, > se=SerifRegularSemiBold sa 1, > si=SerifRegularSemiBoldItalic sa 1, > bf=SerifRegularBold sa 1, > bi=SerifRegularBoldItalic sa 1] > > % design size 19 pt, size range (13 pt, 19.9 pt] > \definebodyfont [14.4pt,17.3pt] [rm] > [tf=SerifSubhead sa 1, > it=SerifSubheadItalic sa 1, > me=SerifSubheadMedium sa 1, > mi=SerifSubheadMediumItalic sa 1, > se=SerifSubheadSemiBold sa 1, > si=SerifSubheadSemiBoldItalic sa 1, > bf=SerifSubheadBold sa 1, > bi=SerifSubheadBoldItalic sa 1] > > % design size 72 pt, size range (19.9 pt, 72 pt] > \definebodyfont [20.7pt] [rm] > [tf=SerifDisplay sa 1, > it=SerifDisplayItalic sa 1, > me=SerifDisplayMedium sa 1, > mi=SerifDisplayMediumItalic sa 1, > se=SerifDisplaySemiBold sa 1, > si=SerifDisplaySemiBoldItalic sa 1, > bf=SerifDisplayBold sa 1, > bi=SerifDisplayBoldItalic sa 1] > > \stoptypescript > > \starttypescript [serif] [minionpro] > \definefontsynonym [SerifRegular] > [file:MinionPro-Regular.otf] [features=default] > ... > \stoptypescript > > \definetypeface [source] [rm] [serif] [minionpro] [optical] > \definetypeface [source] [mm] [math] [xits] [default] > > \setupbodyfont[source, 11pt] > > \starttext > > ... > > \page > > {\tfxx \purefontname\font: \input ward \blank} > {\tfx \purefontname\font: \input ward \blank} > {\tf \purefontname\font: \input ward \blank} > {\tfa \purefontname\font: \input ward \blank} > {\tfb \purefontname\font: \input ward \blank} > {\tfc \purefontname\font: \input ward \blank} > {\tfd \purefontname\font: \input ward \blank} > > \page > > \dostepwiserecurse {6} {22} {1} > {\switchtobodyfont[#1pt] > \purefontname\font: \input ward > \blank} > > \stoptext > --001a11411f9e677e5c053265876a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I found how to make it work with \switchtobodyfont, I was missing=C2=A0\definebodyfontenvironment fo= r the sizes. And I had (obviously) to update the \definebodyfont with the c= orrect sizes.

=
But still, \tfxx and so do not switch= to correct font.=C2=A0
<= br>
Thanks,
<= div>
Antoine

<= div class=3D"gmail_quote">On 9 May 2016 at 11:23, Antoine Cailliau <antoinecailliau@gmail.com> wrote:
Hi,

I'm continuing my ques= t for supporting Minion Pro font in my document.=C2=A0

=
I defined the different sizes, as shown on contextgarden. But apparent= ly, it does not (fully) work.=C2=A0

The problems a= re :=C2=A0
- When using \tfxx, \tfx, ... Regular font is always u= sed, there is no switch to appropriate font.
- When using=C2=A0\s= witchtobodyfont, switches are correct up to 12pt. After that, it fallback o= n=C2=A0xits-mathbold

Any help is welcome :-)
=


The source:

\definefontalternative[me]
...

\s= tarttypescript [serif] [optical] [size]

=C2=A0 % d= esign size 8 pt, size range (6 pt, 8.4 pt]
=C2=A0 \definebodyfont= [4pt,5pt,6pt,7pt,8pt] [rm]
=C2=A0 =C2=A0 [tf=3DSerifCaption =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0= =C2=A0 =C2=A0it=3DSerifCaptionItalic =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa= 1,
=C2=A0 =C2=A0 =C2=A0me=3DSerifCaptionMedium =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0mi=3DSerifCaptionMedi= umItalic =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0se=3DSerifCaptio= nSemiBold =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0s= i=3DSerifCaptionSemiBoldItalic =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0b= f=3DSerifCaptionBold =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
<= div>=C2=A0 =C2=A0 =C2=A0bi=3DSerifCaptionBoldItalic =C2=A0 =C2=A0 =C2=A0 sa= 1]
=C2=A0 =C2=A0 =C2=A0
=C2=A0 % design size 11 pt, si= ze range (8.4 pt, 13 pt]
=C2=A0 \definebodyfont [9pt,10pt,11pt,12= pt] [rm]
=C2=A0 =C2=A0 [tf=3DSerifRegular =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0it= =3DSerifRegularItalic =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
= =C2=A0 =C2=A0 =C2=A0me=3DSerifRegularMedium =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 sa 1,
=C2=A0 =C2=A0 =C2=A0mi=3DSerifRegularMediumItalic =C2= =A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0se=3DSerifRegularSemiBold = =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0si=3DSerifR= egularSemiBoldItalic =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0bf=3DSerifR= egularBold =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0= =C2=A0 =C2=A0bi=3DSerifRegularBoldItalic =C2=A0 =C2=A0 =C2=A0 sa 1]
<= div>=C2=A0 =C2=A0 =C2=A0
=C2=A0 % design size 19 pt, size range (= 13 pt, 19.9 pt]
=C2=A0 \definebodyfont [14.4pt,17.3pt] [rm]
=
=C2=A0 =C2=A0 [tf=3DSerifSubhead =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0it=3DSerifSubheadI= talic =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2= =A0me=3DSerifSubheadMedium =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0mi=3DSerifSubheadMediumItalic =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0se=3DSerifSubheadSemiBold =C2=A0 =C2=A0 =C2=A0 = =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0si=3DSerifSubheadSemiBoldItalic = =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0bf=3DSerifSubheadBold =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0bi=3DSe= rifSubheadBoldItalic =C2=A0 =C2=A0 =C2=A0 sa 1]
=C2=A0 =C2=A0 =C2= =A0
=C2=A0 % design size 72 pt, size range (19.9 pt, 72 pt]
=
=C2=A0 \definebodyfont [20.7pt] [rm]
=C2=A0 =C2=A0 [tf=3DSer= ifDisplay =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0it=3DSerifDisplayItalic =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0me=3DSerifDisplayMedium =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0mi=3DSe= rifDisplayMediumItalic =C2=A0 =C2=A0 sa 1,
=C2=A0 =C2=A0 =C2=A0se= =3DSerifDisplaySemiBold =C2=A0 =C2=A0 =C2=A0 =C2=A0 sa 1,
=C2=A0 = =C2=A0 =C2=A0si=3DSerifDisplaySemiBoldItalic =C2=A0 sa 1,
=C2=A0 = =C2=A0 =C2=A0bf=3DSerifDisplayBold =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 sa 1,
=C2=A0 =C2=A0 =C2=A0bi=3DSerifDisplayBoldItalic =C2=A0 = =C2=A0 =C2=A0 sa 1]
=C2=A0 =C2=A0 =C2=A0
\stoptypescrip= t

\starttypescript [serif] [minionpro]
= =C2=A0 =C2=A0 \definefontsynonym [SerifRegular] =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0[file:MinionPro-Regular.otf] =C2=A0 =C2=A0 =C2=A0[features=3Ddefault]
=C2=A0 =C2=A0 ...
\stoptypescript

\de= finetypeface [source] [rm] [serif] [minionpro] [optical]
\definet= ypeface [source] [mm] [math] =C2=A0[xits] =C2=A0 =C2=A0 =C2=A0[default]

\setupbodyfont[source, 11pt]

\starttext

...

\page

{\tfxx \purefontname\font: \input ward \blank}
<= div>{\tfx \purefontname\font: \input ward \blank}
{\tf \purefontn= ame\font: \input ward \blank}
{\tfa \purefontname\font: \input wa= rd \blank}
{\tfb \purefontname\font: \input ward \blank}
{\tfc \purefontname\font: \input ward \blank}
{\tfd \purefontna= me\font: \input ward \blank}

\page

<= /div>
\dostepwiserecurse {6} {22} {1}=C2=A0
=C2=A0 {\switchto= bodyfont[#1pt]
=C2=A0 =C2=A0\purefontname\font: \input ward
=
=C2=A0 =C2=A0\blank}

\stoptext

--001a11411f9e677e5c053265876a-- --===============6585939898255253872== 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= --===============6585939898255253872==--