Dear ConTeXt users,

I have a question concerning font fallbacks in math fonts. I have not been able to find an option to specify optical sizes in fallbacks. I want to use Minion Math for the alphabetical symbols, and this font ships with single font files for each optical size. So I am searching for the right command to get for example the following behaviour:

Use the CambriaMath fonts for mathematical symbols and use Minion Math (Minion-Math-Regular.otf for standard size, Minion-Math-Caption.otf for indices and Minion-Math-Tiny for sub-indices) for alphabetical symbols.

Can anyone tell me which commands I have to use to achieve this?

So the general question is paraphrased as follows: Use some font as a general math font (here CambriaMath) and replace some symbols out of another fonts that ships with single files for each optical size.

One remark about that: Minion Math has supporting mkiv-files. So you can use this font (specifying all optical sizes) by writing \setupbodyfont[minion]. One could make use of that and maybe use a command like

\definefamilyfallback[MathFallback][family:minion][<range of symbols to be replaced>][force=yes].

As far as I know a command like that does not exist at present. Maybe it could be designed to take use of existing font definition files.

And I have some similar problem: I do not like the mathematical symbols of the STIX2 fonts that much (since they are mainly taken from STIX1) and let us suppose now that I want to use again CambriaMath instead for mathematical symbols. I was able to figure out the following commands that nearly achieve what I want to get:

\definefontfallback[MathFallback][file:STIX2Math.otf][lowercasescript,uppercasescript,lowercasefraktur,uppercasefraktur][force=yes]
%
\starttypescriptcollection[stix2own]
%
\starttypescript [\s!math][stix2own][\s!all]
        \loadfontgoodies[cambria-math]
        \definefontsynonym[\s!MathRoman] [Cambria-Math] [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!fallbacks={MathFallback},\s!goodies=cambria-math]
    \stoptypescript
%
\starttypescript [stix2own]
         \definetypeface [\typescriptone] [\s!mm] [\s!math]  [stix2own] [\s!default]
\stoptypescript
%
\stoptypescriptcollection

This font can be used by the command \setupbodyfont[stix2own].

The only problem is that STIX2 has design sizes embedded in the file STIX2Math.otf that are used if I am using this file as whole for math, but that are not used any longer using the mechanism defined above. That means: If I use Cambria as Math font and replace the alphabetical symbols out of STIX2Math.otf the optical sizes for indices are not used any longer.

What can be done to solve this second problem?

One last question remains: I dislike the summation symbol of CambriaMath (because it is too large in my eyes) and this is why I want to replace it by the version of STIX2Math again (this symbols is indeed redesigned in STIX2Math and looks very nice in my eyes). So I could add a second font fallback that should be applied besides the one above. The unicode slot of the summation symbol is 0x2211in STIX2Math. So I could define

\definefontfallback[SummationFallback][file:STIX2Math.otf][0x2211][force=yes]

and pass it as a second fallback as follows (changing the following line in the example above):

\definefontsynonym[\s!MathRoman] [Cambria-Math] [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!fallbacks={MathFallback,SummationFallback},\s!goodies=cambria-math]

The problem is that only one of those fallbacks is used if I pass two arguments for fallbacks. Of course this problem can be solved easily if I add the summation symbol to the list of replaced symbols in the first fallback definition. But if I want to use a summation symbol out of another font this trick does not work any longer.

Besides there is a second problem in replacing the summation symbol in the way described: Every time I am using $\sum$, ConTeXt uses the bigger symbol designed for displayed formulas and not the one designed for inline formulas. How can I solve this problem?

Thank you very much for your assistance! If running minimal examples are required I can of course provide them. But I hope someone understands the fallback mechanism better than I do and then the minimal examples written by me would be obsolete (besides the require some font definition files which makes them more of less a little complex). Besides because of Minion Math is commercial not everyone owns this font an thus is unable to run the minimal example.

Kind regards
Mathias