%D \module
%D   [       file=type-imp-kurier,
%D        version=2023.11.5, % 2021.10.24,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=Kurier,
%D         author=Hans Hagen \& Mikael Sundqvist,
%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.

\starttypescriptcollection[kurier]

    \pushglobalsetups

        \startsetups[\s!math:kurier]
            \setmathfenceparameter\c!alternative{1}%
        \stopsetups

        \startsetups[\s!math:kurier-light]      \fastsetup{\s!math:kurier}\stopsetups
        \startsetups[\s!math:kurier-medium]     \fastsetup{\s!math:kurier}\stopsetups
        \startsetups[\s!math:kurier-heavy]      \fastsetup{\s!math:kurier}\stopsetups
        \startsetups[\s!math:kurier-cond]       \fastsetup{\s!math:kurier}\stopsetups
        \startsetups[\s!math:kurier-light-cond] \fastsetup{\s!math:kurier}\stopsetups
        \startsetups[\s!math:kurier-medium-cond]\fastsetup{\s!math:kurier}\stopsetups
        \startsetups[\s!math:kurier-heavy-cond] \fastsetup{\s!math:kurier}\stopsetups

    \popglobalsetups

    \definefontfeature[virtualmath-kurier]          [virtualmath][virtualweight=kurier]
    \definefontfeature[virtualmath-kurier-light]    [virtualmath][virtualweight=kurier-light]
    \definefontfeature[virtualmath-kurier-medium]   [virtualmath][virtualweight=kurier-medium]
    \definefontfeature[virtualmath-kurier-heavy]    [virtualmath][virtualweight=kurier-heavy]

    \definefontfeature[virtualmath-kurier-nt]       [virtualmath][virtualweight=kurier-nt]
    \definefontfeature[virtualmath-kurier-light-nt] [virtualmath][virtualweight=kurier-light-nt]
    \definefontfeature[virtualmath-kurier-medium-nt][virtualmath][virtualweight=kurier-medium-nt]
    \definefontfeature[virtualmath-kurier-heavy-nt] [virtualmath][virtualweight=kurier-heavy-nt]

    \starttypescript [\s!sans] [%
        kurier,kurier-light,kurier-medium,kurier-heavy,kurier-cond,%
        kurier-nt,kurier-light-nt,kurier-medium-nt,kurier-heavy-nt%
    ]
        \definefontsynonym [Kurier-Regular]           [\s!file:kurierregular]           [\s!features=\s!default]
        \definefontsynonym [Kurier-Italic]            [\s!file:kurieritalic]            [\s!features=\s!default]
        \definefontsynonym [Kurier-Bold]              [\s!file:kurierbold]              [\s!features=\s!default]
        \definefontsynonym [Kurier-BoldItalic]        [\s!file:kurierbolditalic]        [\s!features=\s!default]
        \definefontsynonym [Kurier-Light]             [\s!file:kurierlightregular]      [\s!features=\s!default]
        \definefontsynonym [Kurier-LightItalic]       [\s!file:kurierlightitalic]       [\s!features=\s!default]
        \definefontsynonym [Kurier-Medium]            [\s!file:kuriermediumregular]     [\s!features=\s!default]
        \definefontsynonym [Kurier-MediumItalic]      [\s!file:kuriermediumitalic]      [\s!features=\s!default]
        \definefontsynonym [Kurier-Heavy]             [\s!file:kurierheavyregular]      [\s!features=\s!default]
        \definefontsynonym [Kurier-HeavyItalic]       [\s!file:kurierheavyitalic]       [\s!features=\s!default]
    \stoptypescript

    \starttypescript [\s!sans] [%
        kurier-cond,kurier-light-cond,kurier-medium-cond,kurier-heavy-cond,%
        kurier-cond-nt,kurier-light-cond-nt,kurier-medium-cond-nt,kurier-heavy-cond-nt%
    ]
        \definefontsynonym [Kurier-Cond-Regular]      [\s!file:kuriercondregular]       [\s!features=\s!default]
        \definefontsynonym [Kurier-Cond-Italic]       [\s!file:kurierconditalic]        [\s!features=\s!default]
        \definefontsynonym [Kurier-Cond-Bold]         [\s!file:kuriercondbold]          [\s!features=\s!default]
        \definefontsynonym [Kurier-Cond-BoldItalic]   [\s!file:kuriercondbolditalic]    [\s!features=\s!default]
        \definefontsynonym [Kurier-Cond-Light]        [\s!file:kuriercondlightregular]  [\s!features=\s!default]
        \definefontsynonym [Kurier-Cond-LightItalic]  [\s!file:kuriercondlightitalic]   [\s!features=\s!default]
        \definefontsynonym [Kurier-Cond-Medium]       [\s!file:kuriercondmediumregular] [\s!features=\s!default]
        \definefontsynonym [Kurier-Cond-MediumItalic] [\s!file:kuriercondmediumitalic]  [\s!features=\s!default]
        \definefontsynonym [Kurier-Cond-Heavy]        [\s!file:kuriercondheavyregular]  [\s!features=\s!default]
        \definefontsynonym [Kurier-Cond-HeavyItalic]  [\s!file:kuriercondheavyitalic]   [\s!features=\s!default]
    \stoptypescript

    % [all] is redundant

    \starttypescript [\s!math][kurier][\s!all]
        \definefontsynonym[\s!MathRoman]    [kuriermath@kurier-math]
        \definefontsynonym[\s!MathRomanBold][kuriermediummath@kurier-medium-math]
    \stoptypescript
    \starttypescript [\s!math][kurier-light,kurier-light-cond][\s!all]
        \definefontsynonym[\s!MathRoman]    [kurierlightmath@kurier-light-math]
        \definefontsynonym[\s!MathRomanBold][kuriermath@kurier-math]
    \stoptypescript
    \starttypescript [\s!math][kurier-medium,kurier-medium-cond][\s!all]
        \definefontsynonym[\s!MathRoman]    [kuriermediummath@kurier-medium-math]
        \definefontsynonym[\s!MathRomanBold][kurierheavymath@kurier-heavy-math]
    \stoptypescript
    \starttypescript [\s!math][kurier-heavy,kurier-heavy-cond][\s!all]
        \definefontsynonym[\s!MathRoman][kurierheavymath@kurier-heavy-math]
    \stoptypescript

    \starttypescript [\s!math][kurier-nt,kurier-cond-nt][\s!all]
        \definefontsynonym[\s!MathRoman]    [kuriermathnt@kurier-math-nt]
        \definefontsynonym[\s!MathRomanBold][kuriermediummathnt@kurier-medium-math-nt]
    \stoptypescript
    \starttypescript [\s!math][kurier-light-nt,kurier-light-cond-nt][\s!all]
        \definefontsynonym[\s!MathRoman]    [kurierlightmathnt@kurier-light-math-nt]
        \definefontsynonym[\s!MathRomanBold][kuriermathnt@kurier-math-nt]
    \stoptypescript
    \starttypescript [\s!math][kurier-medium-nt,kurier-medium-cond-nt][\s!all]
        \definefontsynonym[\s!MathRoman]    [kuriermediummathnt@kurier-medium-math-nt]
        \definefontsynonym[\s!MathRomanBold][kurierheavymathnt@kurier-heavy-math-nt]
    \stoptypescript
    \starttypescript [\s!math][kurier-heavy-nt,kurier-heavy-cond-nt][\s!all]
        \definefontsynonym[\s!MathRoman][kurierheavymathnt@kurier-heavy-math-nt]
    \stoptypescript

    \starttypescript [\s!math] [%
        kurier,kurier-light,kurier-medium,kurier-heavy,%
        kurier-nt,kurier-light-nt,kurier-medium-nt,kurier-heavy-nt,%
        kurier-cond,kurier-light-cond,kurier-medium-cond,kurier-heavy-cond,%
        kurier-cond-nt,kurier-light-cond-nt,kurier-medium-cond-nt,kurier-heavy-cond-nt,%
    ] [\s!all]
        \loadfontgoodies[kurier-math]
    \stoptypescript

    \starttypescript [\s!sans] [kurier,kurier-nt] [\s!name]
        \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Sans]           [Kurier-Regular]
        \definefontsynonym [\s!SansItalic]     [Kurier-Italic]
        \definefontsynonym [\s!SansBold]       [Kurier-Bold]
        \definefontsynonym [\s!SansBoldItalic] [Kurier-BoldItalic]
    \stoptypescript

    \starttypescript [\s!sans] [kurier-light,kurier-light-nt] [\s!name]
        \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Sans]           [Kurier-Light]
        \definefontsynonym [\s!SansItalic]     [Kurier-LightItalic]
        \definefontsynonym [\s!SansBold]       [Kurier-Medium]
        \definefontsynonym [\s!SansBoldItalic] [Kurier-MediumItalic]
    \stoptypescript

    \starttypescript [\s!sans] [kurier-medium,kurier-medium-nt] [\s!name]
        \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Sans]           [Kurier-Medium]
        \definefontsynonym [\s!SansItalic]     [Kurier-MediumItalic]
        \definefontsynonym [\s!SansBold]       [Kurier-Heavy]
        \definefontsynonym [\s!SansBoldItalic] [Kurier-HeavyItalic]
    \stoptypescript

    \starttypescript [\s!sans] [kurier-heavy,kurier-heavy-nt] [\s!name]
        \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Sans]           [Kurier-Heavy]
        \definefontsynonym [\s!SansItalic]     [Kurier-HeavyItalic]
        \definefontsynonym [\s!SansBold]       [Kurier-Heavy]
        \definefontsynonym [\s!SansBoldItalic] [Kurier-HeavyItalic]
    \stoptypescript

    \starttypescript [\s!sans] [kurier-light-cond,kurier-light-cond-nt] [\s!name]
        \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Sans]           [Kurier-Cond-Light]
        \definefontsynonym [\s!SansItalic]     [Kurier-Cond-LightItalic]
        \definefontsynonym [\s!SansBold]       [Kurier-Cond-Medium]
        \definefontsynonym [\s!SansBoldItalic] [Kurier-Cond-MediumItalic]
    \stoptypescript

    \starttypescript [\s!sans] [kurier-cond,kurier-cond-nt] [\s!name]
        \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Sans]           [Kurier-Cond-Regular]
        \definefontsynonym [\s!SansItalic]     [Kurier-Cond-Italic]
        \definefontsynonym [\s!SansBold]       [Kurier-Cond-Bold]
        \definefontsynonym [\s!SansBoldItalic] [Kurier-Cond-BoldItalic]
    \stoptypescript

    \starttypescript [\s!sans] [kurier-medium-cond,kurier-medium-cond-nt] [\s!name]
        \setups[\s!font:\s!fallback:\s!sans]
        \definefontsynonym [\s!Sans]           [Kurier-Cond-Medium]
        \definefontsynonym [\s!SansItalic]     [Kurier-Cond-MediumItalic]
        \definefontsynonym [\s!SansBold]       [Kurier-Cond-Heavy]
        \definefontsynonym [\s!SansBoldItalic] [Kurier-Cond-HeavyItalic]
    \stoptypescript

    \starttypescript [%
        kurier,kurier-light,kurier-medium,kurier-heavy,%
        kurier-nt,kurier-light-nt,kurier-medium-nt,kurier-heavy-nt,%
        kurier-cond,kurier-light-cond,kurier-medium-cond,kurier-heavy-cond,%
        kurier-cond-nt,kurier-light-cond-nt,kurier-medium-cond-nt,kurier-heavy-cond-nt%
    ]
        \definetypeface[\typescriptone][\s!ss][\s!sans] [\typescriptone][\s!default]
        \definetypeface[\typescriptone][\s!rm][\s!serif][modern]        [\s!default]
        \definetypeface[\typescriptone][\s!tt][\s!mono] [modern]        [\s!default]
        \definetypeface[\typescriptone][\s!mm][\s!math] [\typescriptone][\s!default][text=ss]
        \quittypescriptscanning
    \stoptypescript

\stoptypescriptcollection
