%D \module
%D   [       file=type-imp-ebgaramond,
%D        version=2016.05.02,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=Garamond Premier Pro,
%D         author=MF,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\definefontfeature
  [garamond-premier-pro-normal]
  [default]
  [onum=yes,liga=yes]
%  [mode=node,ccmp=yes,calt=yes,
%   liga=yes,dlig=yes,hlig=yes,
%   kern=yes,mark=yes,mkmk=yes,
%   onum=yes,pnum=yes,salt=yes,
%   script=latn]

\definefontfeature
  [garamond-premier-pro-smallcaps]
  [garamond-premier-pro-normal]
  [smcp=yes,c2sc=yes]

\starttypescriptcollection[GaramondPremierPro]

    \starttypescript [serif] [GaramondPremierPro]
        \loadfontgoodies[garamondpremierpro]
        \setups[font:fallback:serif]
        \definefontsynonym [Serif]       [file:GaramondPremierPro-Regular] [features=garamond-premier-pro-normal]
        \definefontsynonym [SerifItalic] [file:GaramondPremierPro-Italic]  [features=garamond-premier-pro-normal]
        \definefontsynonym [SerifBold]   [file:GaramondPremierPro-Bold]    [features=garamond-premier-pro-normal]
        \definefontsynonym [SerifBoldItalic][file:GaramondPremierPro-BoldItalic][features=garamond-premier-pro-normal]
        \definefontsynonym [SerifCaps]   [Serif]                   [features=garamond-premier-pro-smallcaps]
    \stoptypescript

    \starttypescript[GaramondPremierPro]
        \definetypeface [GaramondPremierPro] [rm] [serif] [GaramondPremierPro] [default] [designsize=auto]
        \definetypeface [GaramondPremierPro] [tt] [mono]  [dejavu]     [default]
        \definetypeface [GaramondPremierPro] [mm] [math]  [bonum]      [default]
    \stoptypescript

\stoptypescriptcollection
