[NTG-context] faking smallcaps font with font features and fallbacks

mf massifr at fastwebnet.it
Wed Oct 3 17:16:54 CEST 2018


\starttypescriptcollection [myriadpro]

   \definefontfeature[emboldened][effect={width=0.18,delta=0.4,factor=0.3}]

   \starttypescript [sans] [myriadpro]
     \definefontsynonym [Sans] 
[file:MyriadPro-Regular.otf]      [features=default]
     \definefontsynonym [SansItalic]         [file:MyriadPro-It.otf] 
       [features=default]
     \definefontsynonym [SansBold]           [file:MyriadPro-Bold.otf] 
       [features=default]
     \definefontsynonym [SansBoldItalic]     [file:MyriadPro-BoldIt.otf] 
       [features=default]
     \definefontsynonym [SansSlanted]        [file:MyriadPro-It.otf] 
       [features=default]
     \definefontsynonym [SansBoldSlanted]    [file:MyriadPro-BoldIt.otf] 
       [features=default]

     \definefontsynonym [SansEmboldened] [Sans] 
[features={default,emboldened}]
     \definefontfallback[FakeSansCaps]   [SansEmboldened] 
[0x0000-0xFFFF] [rscale=.8,method=uppercase]

     \definefontsynonym [SansCaps]       [file:MyriadPro-Regular.otf] 
[fallbacks=FakeSansCaps]
   \stoptypescript
   \starttypescript [myriadpro]
     \definetypeface [myriadpro] [ss] [sans]  [myriadpro] [default]
   \stoptypescript

\stoptypescriptcollection

\usetypescript[myriadpro]

\setupbodyfont[myriadpro,ss]

\starttext
   % scaled up 4 times to appreciate the thickness equalization
   \scale[sx=4,sy=4]{\sc RoLlErCoAsTeR TeXt.}\par
   \blank
   \scale[sx=4,sy=4]{\sc ÀàÉéÎîÖöÜü.}\par
   \blank
   \scale[sx=4,sy=4]{\sc ŁłĄąĞğŘřŻż.}\par
\stoptext
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fake-smallcaps.pdf
Type: application/pdf
Size: 6746 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20181003/b29b993e/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fake-smallcaps.tex
Type: text/x-tex
Size: 1485 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20181003/b29b993e/attachment-0001.tex>


More information about the ntg-context mailing list