%D \module
%D   [       file=type-imp-antykwa,
%D        version=2010.06.21,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=Antykwa Torunska,
%D         author=Mojca Miklavec \& 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[antykwa-torunska]

    \pushglobalsetups

        \startsetups[\s!math:antykwa]
            \setmathfenceparameter\c!alternative{1}%
            \setupmathradical[\c!leftmargin=.05mq,\c!mindepth=.05mx]% mathquad mathex
        \stopsetups

        % cond => -cont as in iwona

        \startsetups[\s!math:antykwa-light]              \fastsetup{\s!math:antykwa}\stopsetups
        \startsetups[\s!math:antykwa-cond]               \fastsetup{\s!math:antykwa}\stopsetups
        \startsetups[\s!math:antykwa-light-cond]         \fastsetup{\s!math:antykwa}\stopsetups
        % these long names are obsolete and will go away
        \startsetups[\s!math:antykwa-torunska]           \fastsetup{\s!math:antykwa}\stopsetups
        \startsetups[\s!math:antykwa-torunska-light]     \fastsetup{\s!math:antykwa}\stopsetups
        \startsetups[\s!math:antykwa-torunska-cond]      \fastsetup{\s!math:antykwa}\stopsetups
        \startsetups[\s!math:antykwa-torunska-light-cond]\fastsetup{\s!math:antykwa}\stopsetups

    \popglobalsetups

    % these fetaures make the loaded base font unique:

    \definefontfeature[virtualmath-antykwa]              [virtualmath][virtualweight=antykwa]
    \definefontfeature[virtualmath-antykwa-cond]         [virtualmath][virtualweight=antykwa-cond]
    \definefontfeature[virtualmath-antykwa-light]        [virtualmath][virtualweight=antykwa-light]
    \definefontfeature[virtualmath-antykwa-light-cond]   [virtualmath][virtualweight=antykwa-light-cond]

    \definefontfeature[virtualmath-antykwa-nt]           [virtualmath][virtualweight=antykwa-nt]
    \definefontfeature[virtualmath-antykwa-cond-nt]      [virtualmath][virtualweight=antykwa-cond-nt]
    \definefontfeature[virtualmath-antykwa-light-nt]     [virtualmath][virtualweight=antykwa-light-nt]
    \definefontfeature[virtualmath-antykwa-light-cond-nt][virtualmath][virtualweight=antykwa-light-cond-nt]

    \starttypescript [antykwa,antykwa-nt,antykwa-torunska,antykwa-light,antykwa-light-nt,antykwa-torunska-light,antykwa-cond,antykwa-cond-nt,antykwa-torunska-cond,antykwa-light-cond,antykwa-light-cond-nt,antykwa-torunska-light-cond]
        \definetypeface[\typescriptone][\s!rm][\s!serif][\typescriptone][\s!default]
        \definetypeface[\typescriptone][\s!ss][\s!sans] [modern]        [\s!default][\s!rscale=1.05]
        \definetypeface[\typescriptone][\s!tt][\s!mono] [modern]        [\s!default][\s!rscale=1.05]
        \definetypeface[\typescriptone][\s!mm][\s!math] [\typescriptone][\s!default]
        \quittypescriptscanning
    \stoptypescript

    \starttypescript [\s!serif] [antykwa,antykwa-nt,antykwa-torunska,antykwa-light,antykwa-light-nt,antykwa-torunska-light,antykwa-cond,antykwa-cond-nt,antykwa-torunska-cond,antykwa-light-cond,antykwa-light-cond-nt,antykwa-torunska-light-cond]
        \definefontsynonym [AntykwaTorunska-Regular]          [\s!file:AntykwaTorunska-Regular]          [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-Italic]           [\s!file:AntykwaTorunska-Italic]           [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-Bold]             [\s!file:AntykwaTorunska-Bold]             [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-BoldItalic]       [\s!file:AntykwaTorunska-BoldItalic]       [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-Light]            [\s!file:AntykwaTorunskaLight-Regular]     [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-LightItalic]      [\s!file:AntykwaTorunskaLight-Italic]      [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-Medium]           [\s!file:AntykwaTorunskaMed-Regular]       [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-MediumItalic]     [\s!file:AntykwaTorunskaMed-Italic]        [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-CondRegular]      [\s!file:AntykwaTorunskaCond-Regular]      [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-CondItalic]       [\s!file:AntykwaTorunskaCond-Italic]       [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-CondBold]         [\s!file:AntykwaTorunskaCond-Bold]         [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-CondBoldItalic]   [\s!file:AntykwaTorunskaCond-BoldItalic]   [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-CondLight]        [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-CondLightItalic]  [\s!file:AntykwaTorunskaCondLight-Italic]  [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-CondMedium]       [\s!file:AntykwaTorunskaCondMed-Regular]   [\s!features=\s!default]
        \definefontsynonym [AntykwaTorunska-CondMediumItalic] [\s!file:AntykwaTorunskaCondMed-Italic]    [\s!features=\s!default]
    \stoptypescript

    \starttypescript [\s!math][antykwa,antykwa-torunska][\s!all]
        \loadfontgoodies[antykwa-math]
        \definefontsynonym[\s!MathRoman][antykwamath@antykwa-math]
    \stoptypescript
    \starttypescript [\s!math][antykwa-light,antykwa-torunska-light][\s!all]
        \loadfontgoodies[antykwa-math]
        \definefontsynonym[\s!MathRoman][antykwalightmath@antykwa-light-math]
    \stoptypescript
    \starttypescript [\s!math][antykwa-cond,antykwa-torunska-cond][\s!all]
        \loadfontgoodies[antykwa-math]
        \definefontsynonym[\s!MathRoman][antykwacondmath@antykwa-cond-math]
    \stoptypescript
    \starttypescript [\s!math][antykwa-light-cond,antykwa-torunska-light-cond][\s!all]
        \loadfontgoodies[antykwa-math]
        \definefontsynonym[\s!MathRoman][antykwalightcondmath@antykwa-light-cond-math]
    \stoptypescript

    \starttypescript [\s!math][antykwa-nt][\s!all]
        \loadfontgoodies[antykwa-math]
        \definefontsynonym[\s!MathRoman][antykwamathnt@antykwa-math-nt]
    \stoptypescript
    \starttypescript [\s!math][antykwa-light-nt][\s!all]
        \loadfontgoodies[antykwa-math]
        \definefontsynonym[\s!MathRoman][antykwalightmathnt@antykwa-light-math-nt]
    \stoptypescript
    \starttypescript [\s!math][antykwa-cond-nt][\s!all]
        \loadfontgoodies[antykwa-math]
        \definefontsynonym[\s!MathRoman][antykwacondmathnt@antykwa-cond-math-nt]
    \stoptypescript
    \starttypescript [\s!math][antykwa-light-cond-nt][\s!all]
        \loadfontgoodies[antykwa-math]
        \definefontsynonym[\s!MathRoman][antykwacondmathnt@antykwa-light-cond-math-nt]
    \stoptypescript

    \starttypescript [\s!serif] [antykwa,antykwa-nt,antykwa-torunska] [\s!name]
        \setups[\s!font:\s!fallback:\s!serif]
        \definefontsynonym [\s!Serif]           [AntykwaTorunska-Regular]
        \definefontsynonym [\s!SerifBold]       [AntykwaTorunska-Bold]
        \definefontsynonym [\s!SerifItalic]     [AntykwaTorunska-Italic]
        \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-BoldItalic]
    \stoptypescript

    \starttypescript [\s!serif] [antykwa-light,antykwa-light-nt,antykwa-torunska-light] [\s!name]
        \setups[\s!font:\s!fallback:\s!serif]
        \definefontsynonym [\s!Serif]           [AntykwaTorunska-Light]
        \definefontsynonym [\s!SerifBold]       [AntykwaTorunska-Medium]
        \definefontsynonym [\s!SerifItalic]     [AntykwaTorunska-LightItalic]
        \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-MediumItalic]
    \stoptypescript

    \starttypescript [\s!serif] [antykwa-cond,antykwa-cond-nt,antykwa-torunska-cond] [\s!name]
        \setups[\s!font:\s!fallback:\s!serif]
        \definefontsynonym [\s!Serif]           [AntykwaTorunska-CondRegular]
        \definefontsynonym [\s!SerifBold]       [AntykwaTorunska-CondBold]
        \definefontsynonym [\s!SerifItalic]     [AntykwaTorunska-CondItalic]
        \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondBoldItalic]
    \stoptypescript

    \starttypescript [\s!serif] [antykwa-light-cond,antykwa-light-cond-nt,antykwa-torunska-light-cond] [\s!name]
        \setups[\s!font:\s!fallback:\s!serif]
        \definefontsynonym [\s!Serif]           [AntykwaTorunska-CondLight]
        \definefontsynonym [\s!SerifBold]       [AntykwaTorunska-CondMedium]
        \definefontsynonym [\s!SerifItalic]     [AntykwaTorunska-CondLightItalic]
        \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondMediumItalic]
    \stoptypescript

\stoptypescriptcollection
