 %D \module
%D   [       file=type-imp-texgyre,
%D        version=2007.07.30,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=\TEX Gyre Fonts,
%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.

%D There are some weird ones that are never used .. all these Caps ... we can better
%D split them into pagella-caps etc.

%D The tx and px font setups depend on the definitions in px-math.lfg and tx-math.lfg
%D and because these fonts (mappings, names) are not that stable you should not use
%D these variants. At some point I will remove this because we have \OPENTYPE\ fonts
%D that (mostly) work. The mechanism to construct virtual math fonts will probably stay
%D around but I won't waste time on sorting out all the (changing) font hassles. Also,
%D the T1 fonts involved are unlikely to be available.

% \definefontfeature[mathextra][collapseitalics]

\starttypescriptcollection[texgyre]

    \doifunknownfontfeature {pagella-math-bold} {\definefontfeature[pagella-math-bold][boldened]}
    \doifunknownfontfeature {schola-math-bold}  {\definefontfeature[schola-math-bold] [boldened]}
    \doifunknownfontfeature {bonum-math-bold}   {\definefontfeature[bonum-math-bold]  [boldened]}
    \doifunknownfontfeature {termes-math-bold}  {\definefontfeature[termes-math-bold] [boldened]}

    \definetypescriptprefix [f:pagella] [pagella]
    \definetypescriptprefix [f:termes]  [termes]
    \definetypescriptprefix [f:heros]   [heros]
    \definetypescriptprefix [f:bonum]   [bonum]
    \definetypescriptprefix [f:schola]  [schola]
    \definetypescriptprefix [f:adventor][adventor]
    \definetypescriptprefix [f:cursor]  [cursor]
    \definetypescriptprefix [f:chorus]  [chorus]

    \definetypescriptprefix [f:pagella-nt] [pagella]
    \definetypescriptprefix [f:termes-nt]  [termes]
    \definetypescriptprefix [f:bonum-nt]   [bonum]
    \definetypescriptprefix [f:schola-nt]  [schola]

    \definetypescriptprefix [f:palatino]   [pagella]
    \definetypescriptprefix [f:times]      [termes]
    \definetypescriptprefix [f:helvetica]  [heros]
    \definetypescriptprefix [f:bookman]    [bonum]
    \definetypescriptprefix [f:schoolbook] [schola]
    \definetypescriptprefix [f:avantgarde] [adventor]
    \definetypescriptprefix [f:courier]    [cursor]
    \definetypescriptprefix [f:chancery]   [chorus]

    \definetypescriptprefix [n:pagella]  [TeXGyrePagella]
    \definetypescriptprefix [n:termes]   [TeXGyreTermes]
    \definetypescriptprefix [n:heros]    [TeXGyreHeros]
    \definetypescriptprefix [n:bonum]    [TeXGyreBonum]
    \definetypescriptprefix [n:schola]   [TeXGyreSchola]
    \definetypescriptprefix [n:adventor] [TeXGyreAdventor]
    \definetypescriptprefix [n:cursor]   [TeXGyreCursor]
    \definetypescriptprefix [n:chorus]   [TeXGyreChorus]

    \definetypescriptprefix [n:pagella-nt] [TeXGyrePagella]
    \definetypescriptprefix [n:termes-nt]  [TeXGyreTermes]
    \definetypescriptprefix [n:bonum-nt]   [TeXGyreBonum]
    \definetypescriptprefix [n:schola-nt]  [TeXGyreSchola]

    \definetypescriptprefix [n:palatino]   [TeXGyrePagella]
    \definetypescriptprefix [n:times]      [TeXGyreTermes]
    \definetypescriptprefix [n:helvetica]  [TeXGyreHeros]
    \definetypescriptprefix [n:bookman]    [TeXGyreBonum]
    \definetypescriptprefix [n:schoolbook] [TeXGyreSchola]
    \definetypescriptprefix [n:adventor]   [TeXGyreAdventor]
    \definetypescriptprefix [n:courier]    [TeXGyreCursor]
    \definetypescriptprefix [n:chancery]   [TeXGyreChorus]

    \starttypescript [\s!serif,\s!sans] [adventor,bonum,bookman,heros,helvetica,pagella,palatino,schola,schoolbook,termes,times,%
                                         pagella-nt,termes-nt,bonum-nt,schola-nt]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular]        [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular]    [\s!features=\s!default,\s!goodies=texgyre-text]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic]         [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic]     [\s!features=\s!default,\s!goodies=texgyre-text]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold]           [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold]       [\s!features=\s!default,\s!goodies=texgyre-text]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic]     [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!default,\s!goodies=texgyre-text]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Caps]           [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular]    [\s!features=\s!smallcaps]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-ItalicCaps]     [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic]     [\s!features=\s!smallcaps]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldCaps]       [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold]       [\s!features=\s!smallcaps]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps] [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!smallcaps]
    \stoptypescript

    \starttypescript [\s!mono] [cursor,courier]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Regular]        [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-regular]    [\s!features=\s!none]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Italic]         [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-italic]     [\s!features=\s!none]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-Bold]           [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bold]       [\s!features=\s!none]
        \definefontsynonym [\typescriptprefix{n:\typescripttwo}-BoldItalic]     [\s!file:texgyre\typescriptprefix{f:\typescripttwo}-bolditalic] [\s!features=\s!none]
    \stoptypescript

    \starttypescript [\s!serif,\s!calligraphy] [chorus,chancery]
        \definefontsynonym [TeXGyreChorus-MediumItalic] [\s!file:texgyrechorus-mediumitalic] [\s!features=\s!default]
    \stoptypescript

    \starttypescript [\s!serif] [pagella,palatino,termes,times,bonum,bookman,schola,schoolbook,%
                                 pagella-nt,termes-nt,bonum-nt,schola-nt] [\s!name]
        \definefontsynonym [\s!Serif]             [\typescriptprefix{n:\typescripttwo}-Regular]
        \definefontsynonym [\s!SerifItalic]       [\typescriptprefix{n:\typescripttwo}-Italic]
        \definefontsynonym [\s!SerifBold]         [\typescriptprefix{n:\typescripttwo}-Bold]
        \definefontsynonym [\s!SerifBoldItalic]   [\typescriptprefix{n:\typescripttwo}-BoldItalic]
        \definefontsynonym [\s!SerifSlanted]      [\s!SerifItalic]
        \definefontsynonym [\s!SerifBoldSlanted]  [\s!SerifBoldItalic]
        \definefontsynonym [\s!SerifCaps]         [\typescriptprefix{n:\typescripttwo}-Caps]
    \stoptypescript

    \starttypescript [\s!serif] [pagella-caps,palatino-caps,termes-caps,times-caps,bonum-caps,bookman-caps,schola-caps,schoolbook-caps] [\s!name]
        \definefontsynonym [\s!Serif]             [\typescriptprefix{n:\typescripttwo}-Caps]
        \definefontsynonym [\s!SerifItalic]       [\typescriptprefix{n:\typescripttwo}-ItalicCaps]
        \definefontsynonym [\s!SerifBold]         [\typescriptprefix{n:\typescripttwo}-BoldCaps]
        \definefontsynonym [\s!SerifBoldItalic]   [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps]
        \definefontsynonym [\s!SerifSlanted]      [\s!SerifItalic]
        \definefontsynonym [\s!SerifBoldSlanted]  [\s!SerifBoldItalic]
    \stoptypescript

    \starttypescript [\s!serif] [chorus,chancery] [\s!name]
        \definefontsynonym [\s!Serif]            [TeXGyreChorus-MediumItalic]
        \definefontsynonym [\s!SerifItalic]      [\s!Serif]
        \definefontsynonym [\s!SerifBold]        [\s!Serif]
        \definefontsynonym [\s!SerifBoldItalic]  [\s!Serif]
        \definefontsynonym [\s!SerifSlanted]     [\s!Serif]
        \definefontsynonym [\s!SerifBoldSlanted] [\s!Serif]
        \definefontsynonym [\s!SerifCaps]        [\s!Serif]
    \stoptypescript

    \starttypescript [\s!calligraphy] [chorus,chancery] [\s!name]
        \definefontsynonym [Calligraphy] [TeXGyreChorus-MediumItalic]
    \stoptypescript

    \starttypescript [\s!sans] [heros,helvetica,adventor] [\s!name]
        \definefontsynonym [\s!Sans]            [\typescriptprefix{n:\typescripttwo}-Regular]
        \definefontsynonym [\s!SansItalic]      [\typescriptprefix{n:\typescripttwo}-Italic]
        \definefontsynonym [\s!SansBold]        [\typescriptprefix{n:\typescripttwo}-Bold]
        \definefontsynonym [\s!SansBoldItalic]  [\typescriptprefix{n:\typescripttwo}-BoldItalic]
        \definefontsynonym [\s!SansSlanted]     [\s!SansItalic]
        \definefontsynonym [\s!SansBoldSlanted] [\s!SansBoldItalic]
        \definefontsynonym [\s!SansCaps]        [\typescriptprefix{n:\typescripttwo}-Caps]
    \stoptypescript

    \starttypescript [\s!sans] [heros-caps,helvetica-caps,adventor-caps] [\s!name]
        \definefontsynonym [\s!Sans]            [\typescriptprefix{n:\typescripttwo}-Caps]
        \definefontsynonym [\s!SansItalic]      [\typescriptprefix{n:\typescripttwo}-ItalicCaps]
        \definefontsynonym [\s!SansBold]        [\typescriptprefix{n:\typescripttwo}-BoldCaps]
        \definefontsynonym [\s!SansBoldItalic]  [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps]
        \definefontsynonym [\s!SansSlanted]     [\s!SansItalic]
        \definefontsynonym [\s!SansBoldSlanted] [\s!SansBoldItalic]
    \stoptypescript

    \starttypescript [\s!mono] [cursor,courier] [\s!name]
        \definefontsynonym [\s!Mono]             [\typescriptprefix{n:\typescripttwo}-Regular]
        \definefontsynonym [\s!MonoItalic]       [\typescriptprefix{n:\typescripttwo}-Italic]
        \definefontsynonym [\s!MonoBold]         [\typescriptprefix{n:\typescripttwo}-Bold]
        \definefontsynonym [\s!MonoBoldItalic]   [\typescriptprefix{n:\typescripttwo}-BoldItalic]
        \definefontsynonym [\s!MonoSlanted]      [\s!MonoItalic]
        \definefontsynonym [\s!MonoBoldSlanted]  [\s!MonoBoldItalic]
        \definefontsynonym [\s!MonoCaps]         [\typescriptprefix{n:\typescripttwo}-Caps]
    \stoptypescript

    \starttypescript [\s!mono] [cursor-caps,courier-caps] [\s!name]
        \definefontsynonym [\s!Mono]            [\typescriptprefix{n:\typescripttwo}-Caps]
        \definefontsynonym [\s!MonoItalic]      [\typescriptprefix{n:\typescripttwo}-ItalicCaps]
        \definefontsynonym [\s!MonoBold]        [\typescriptprefix{n:\typescripttwo}-BoldCaps]
        \definefontsynonym [\s!MonoBoldItalic]  [\typescriptprefix{n:\typescripttwo}-BoldItalicCaps]
        \definefontsynonym [\s!MonoSlanted]     [\s!MonoItalic]
        \definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic]
    \stoptypescript

    % interesting is that we cannot move these definitions up (without loosing features)

    % caps: \definetypeface [pagella] [rm] [serif] [pagella-caps] [default]

    \starttypescript [termes,termes-nt,times]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [helvetica]      [\s!default] [\s!rscale=0.9]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [modern]         [\s!default] [\s!rscale=1.05]
    \stoptypescript
    \starttypescript [termes,times]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [termes]         [\s!default]
        \quittypescriptscanning
    \stoptypescript
    \starttypescript [termes-nt]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [termes-nt]      [\s!default]
        \quittypescriptscanning
    \stoptypescript

    \starttypescript [pagella,pagella-nt,palatino]
        %
%         \definefontfallback[pagellamonofallback] [\s!name:dejavusansmono*none][0x0000-0x1FFFF][rscale=0.82] % [force=yes]
%         \definefontfallback[pagellamonofallback] [\s!file:concretemath.otf*none][0x0000-0x1FFFF][rscale=0.82] % [force=yes]
        %
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [modern]         [\s!default] [\s!rscale=1.075]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [modern]         [\s!default] [\s!rscale=1.075]% ,\s!fallbacks=pagellamonofallback]
    \stoptypescript
    \starttypescript [pagella,palatino]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [pagella]        [\s!default]
        \quittypescriptscanning
    \stoptypescript
    \starttypescript [pagella-nt]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [pagella-nt]     [\s!default]
        \quittypescriptscanning
    \stoptypescript

    \starttypescript [schola,schola-nt,schoolbook]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [modern]         [\s!default] [\s!rscale=1.1]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [modern]         [\s!default] [\s!rscale=1.1]
    \stoptypescript
    \starttypescript [schola,schoolbook]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [schola]         [\s!default]
        \quittypescriptscanning
    \stoptypescript
    \starttypescript [schola-nt]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [schola-nt]      [\s!default]
        \quittypescriptscanning
    \stoptypescript

    \starttypescript [bonum,bonum-nt,bookman]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [modern]         [\s!default] [\s!rscale=1.1]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [modern]         [\s!default] [\s!rscale=1.1]
    \stoptypescript
    \starttypescript [bookman,bonum]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [bonum]          [\s!default]
        \quittypescriptscanning
    \stoptypescript
    \starttypescript [bonum-nt]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [bonum-nt]       [\s!default]
        \quittypescriptscanning
    \stoptypescript

    \starttypescript [chancery,chorus]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [modern]         [\s!default]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [modern]         [\s!default]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [modern]         [\s!default]
        \quittypescriptscanning
    \stoptypescript

    \starttypescript [helvetica,heros]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern]         [\s!default] [\s!rscale=1.15]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [modern]         [\s!default] [\s!rscale=1.15]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [modern]         [\s!default] [\s!rscale=1.15]
        \quittypescriptscanning
    \stoptypescript

    \starttypescript [avantgarde,adventor]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [adventor] [\s!default]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern]   [\s!default] [\s!rscale=1.15]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [modern]   [\s!default] [\s!rscale=1.15]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [modern]   [\s!default]
        \quittypescriptscanning
    \stoptypescript

    \starttypescript [courier,cursor]
        \definetypeface [\typescriptone] [\s!tt] [\s!mono]  [\typescriptone] [\s!default]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [modern]         [\s!default]
        \definetypeface [\typescriptone] [\s!ss] [\s!sans]  [modern]         [\s!default]
        \definetypeface [\typescriptone] [\s!mm] [\s!math]  [modern]         [\s!default]
        \quittypescriptscanning
    \stoptypescript

\stoptypescriptcollection

% We no longer support tx and px in LMTX. These fonts were used in the transition from
% traditional (type one) fonts to the new gyre fonts. The LMTX distribution no longer
% ships these fonts anyway.

\ifcase\contextlmtxmode \else
    \disablemode[pxmath]
    \disablemode[txmath]
\fi

\startmode[txmath]

    \starttypescriptcollection[texgyre-math-termes]

        \starttypescript [\s!math][termes,times][\s!all]
            \loadfontgoodies[tx-math]
            \definefontsynonym[\s!MathRoman][txmath@tx-math]
          % \definefontsynonym[\s!MathRomanBold][MathRoman]
        \stoptypescript

    \stoptypescriptcollection

\stopmode

\startnotmode[txmath]

    \starttypescriptcollection[texgyre-math-termes]

        \starttypescript [\s!math][termes,termes-nt,times][\s!all]
            \checkedmapfontsize[\typescripttwo][\s!script]      [.70]%.74
            \checkedmapfontsize[\typescripttwo][\s!scriptscript][.50]%.55
        \stoptypescript
        \starttypescript [\s!math][termes,times][\s!all]
            \definefontsynonym[\s!MathRoman]    [file:texgyretermes-math.otf][\s!features={\s!math\mathsizesuffix,termes:mathextra,mathextra},\s!goodies=termes-math]
            \definefontsynonym[\s!MathRomanBold][file:texgyretermes-math.otf][\s!features={\s!math\mathsizesuffix,termes:mathextra,termes-math-bold,mathextra},\s!goodies=termes-math]
        \stoptypescript
        \starttypescript [\s!math][termes-nt][\s!all]
            \definefontsynonym[\s!MathRoman]    [file:texgyretermes-math.otf][\s!features={\s!math\mathsizesuffix,termes:mathextra,mathextra}]
            \definefontsynonym[\s!MathRomanBold][file:texgyretermes-math.otf][\s!features={\s!math\mathsizesuffix,termes:mathextra,termes-math-bold,mathextra}]
        \stoptypescript

    \stoptypescriptcollection

\stopnotmode

\startmode[pxmath]

    \starttypescriptcollection[texgyre-math-pagella]

        \starttypescript [\s!math][palatino,pagella][\s!all]
            \loadfontgoodies[px-math]
            \definefontsynonym[\s!MathRoman][pxmath@px-math]
          % \definefontsynonym[\s!MathRomanBold][MathRoman]
        \stoptypescript

    \stoptypescriptcollection

\stopmode

\startnotmode[pxmath]

    \starttypescriptcollection[texgyre-math-pagella]

        \starttypescript [\s!math][pagella,pagella-nt,palatino]% [\s!all]
            \checkedmapfontsize[\typescripttwo][\s!script]      [.74]
            \checkedmapfontsize[\typescripttwo][\s!scriptscript][.55]
        \stoptypescript
        \starttypescript [\s!math][pagella,palatino][\s!all]
            \definefontsynonym[\s!MathRoman]    [file:texgyrepagella-math.otf][\s!features={\s!math\mathsizesuffix,pagella:mathextra,mathextra},\s!goodies=pagella-math]
            \definefontsynonym[\s!MathRomanBold][file:texgyrepagella-math.otf][\s!features={\s!math\mathsizesuffix,pagella:mathextra,pagella-math-bold,mathextra},\s!goodies=pagella-math]
        \stoptypescript
        \starttypescript [\s!math][pagella-nt][\s!all]
            \definefontsynonym[\s!MathRoman]    [file:texgyrepagella-math.otf][\s!features={\s!math\mathsizesuffix,pagella:mathextra,mathextra}]
            \definefontsynonym[\s!MathRomanBold][file:texgyrepagella-math.otf][\s!features={\s!math\mathsizesuffix,pagella:mathextra,pagella-math-bold,mathextra}]
        \stoptypescript

    \stoptypescriptcollection

\stopnotmode

\starttypescriptcollection[texgyre-math-bonum]

    \starttypescript [\s!math][bonum,bonum-nt,bookman][\s!all]
        \checkedmapfontsize[\typescripttwo][\s!script]      [.70]%.77
        \checkedmapfontsize[\typescripttwo][\s!scriptscript][.55]%.60
    \stoptypescript
    \starttypescript [\s!math][bonum,bookman][\s!all]
        \definefontsynonym[\s!MathRoman]    [file:texgyrebonum-math.otf][\s!features={\s!math\mathsizesuffix,bonum:mathextra,mathextra},\s!goodies=bonum-math]
        \definefontsynonym[\s!MathRomanBold][file:texgyrebonum-math.otf][\s!features={\s!math\mathsizesuffix,bonum:mathextra,bonum-math-bold,mathextra},\s!goodies=bonum-math]
    \stoptypescript
    \starttypescript [\s!math][bonum-nt][\s!all]
        \definefontsynonym[\s!MathRoman]    [file:texgyrebonum-math.otf][\s!features={\s!math\mathsizesuffix,bonum:mathextra,mathextra}]
        \definefontsynonym[\s!MathRomanBold][file:texgyrebonum-math.otf][\s!features={\s!math\mathsizesuffix,bonum:mathextra,bonum-math-bold,mathextra}]
    \stoptypescript

\stoptypescriptcollection

\starttypescriptcollection[texgyre-math-schola]

    \starttypescript [\s!math][schola,schola-nt,schoolbook][\s!all]
        \checkedmapfontsize[\typescripttwo][\s!script]      [.77]
        \checkedmapfontsize[\typescripttwo][\s!scriptscript][.60]
    \stoptypescript
    \starttypescript [\s!math][schola,schoolbook][\s!all]
        \definefontsynonym[\s!MathRoman]    [file:texgyreschola-math.otf][\s!features={\s!math\mathsizesuffix,schola:mathextra,mathextra},\s!goodies=schola-math]
        \definefontsynonym[\s!MathRomanBold][file:texgyreschola-math.otf][\s!features={\s!math\mathsizesuffix,schola:mathextra,schola-math-bold,mathextra},\s!goodies=schola-math]
    \stoptypescript
    \starttypescript [\s!math][schola-nt][\s!all]
        \definefontsynonym[\s!MathRoman]    [file:texgyreschola-math.otf][\s!features={\s!math\mathsizesuffix,schola:mathextra,mathextra}]
        \definefontsynonym[\s!MathRomanBold][file:texgyreschola-math.otf][\s!features={\s!math\mathsizesuffix,schola:mathextra,schola-math-bold,mathextra}]
    \stoptypescript

\stoptypescriptcollection
