Handling Optical Sizes for Minion Pro in Context (LuaTeX)
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=sharin... 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
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
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=sharin...
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
participants (1)
-
Antoine Cailliau