%D \module
%D   [       file=type-imp-minion,
%D        version=2016.06.14,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=Minion,
%D         author=Hans Hagen,
%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.

\definefontfallback[MinionMathFallback]    [file:latinmodern-math.otf][uppercasescript]
\definefontfallback[MinionBoldMathFallback][file:latinmodern-math.otf][uppercasescript]

\starttypescriptcollection[minion]

    \starttypescript [\s!serif][minion][\s!all]
        \loadfontgoodies[minion]
        \definefontsynonym[\s!Serif]          [Minion-Regular]   [\s!features=\s!default,\s!goodies=minion]
        \definefontsynonym[\s!SerifBold]      [Minion-Bold]      [\s!features=\s!default,\s!goodies=minion]
        \definefontsynonym[\s!SerifItalic]    [Minion-Italic]    [\s!features=\s!default,\s!goodies=minion]
        \definefontsynonym[\s!SerifBoldItalic][Minion-BoldItalic][\s!features=\s!default,\s!goodies=minion]
    \stoptypescript

    \starttypescript [\s!serif][minion-medium][\s!all]
        \loadfontgoodies[minion]
        \definefontsynonym[\s!Serif]          [Minion-Regular]     [\s!features=\s!default,\s!goodies=minion]
        \definefontsynonym[\s!SerifBold]      [Minion-Medium]      [\s!features=\s!default,\s!goodies=minion]
        \definefontsynonym[\s!SerifItalic]    [Minion-Italic]      [\s!features=\s!default,\s!goodies=minion]
        \definefontsynonym[\s!SerifBoldItalic][Minion-MediumItalic][\s!features=\s!default,\s!goodies=minion]
    \stoptypescript

    \starttypescript [\s!math][minion][\s!all]
        \loadfontgoodies[minion-math]
        \definefontsynonym[\s!MathRoman]    [Minion-Math]    [\s!features={\s!math\mathsizesuffix,mathextra},\s!designsize=\s!auto,\s!goodies=minion-math,\s!fallbacks=MinionMathFallback]
        \definefontsynonym[\s!MathRomanBold][Minion-BoldMath][\s!features={\s!math\mathsizesuffix,mathextra},\s!designsize=\s!auto,\s!goodies=minion-math,\s!fallbacks=MinionBoldMathFallback]
    \stoptypescript

    \starttypescript [\s!math][minion-medium][\s!all]
        \loadfontgoodies[minion-math]
        \definefontsynonym[\s!MathRoman]    [Minion-Math]      [\s!features={\s!math\mathsizesuffix,mathextra},\s!designsize=\s!auto,\s!goodies=minion-math,\s!fallbacks=MinionMathFallback]
        \definefontsynonym[\s!MathRomanBold][Minion-MediumMath][\s!features={\s!math\mathsizesuffix,mathextra},\s!designsize=\s!auto,\s!goodies=minion-math,\s!fallbacks=MinionBoldMathFallback]
    \stoptypescript

    \starttypescript [minion,minion-medium]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [dejavu]         [\s!default] [\s!rscale=0.8]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [dejavu]         [\s!default] [\s!rscale=0.8]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [\typescriptone] [\s!default]
    \stoptypescript

\stoptypescriptcollection
