First a little background. I am using MathTime Pro II (which is not an OpenType Font) as my math font and do not want to replace it. I think this precludes my loading unicode-math if I want to use the OTF versions of all other fonts. I am successfully using the OTF versions of TeX Gyre Termes for Roman, TeX Gyre Heros for sans serif, and Microsoft's Consolas for typewriter. Obviously, I am compiling with XeTeX and using fontspec but not unicode-math.
Now to the specifics of my question(s) (which was difficult to condense into the question title). I have figured out how to access individual characters from the OTF version of Stix Two Math using, for instance, {{fontspec{STIX Two Math}\char"27D3}}, although I am not sure this will work in math mode (I am using that particular character as a type of QED symbol and it is in text mode). So my first question is:
- Will this work in math mode? If not, what alteration do I need to make to get this to work in math mode?
I have not figured out how to access characters with codes above FFFF. The errors I was getting led me to Bad Character Code Error in Math Mode for Unicode Character, where I thought I had found the answer; despite numerous attempts, I have been unable to wrestle that code into a form that solves my problem. So my second question is:
- How can I access characters with codes above FFFF in the Stix Two Math OTF font (or any font, for that matter)?
I realize this is a multifaceted question but was afraid breaking it up into two questions would obfuscate the answer. I hope I have successfully provided the setting and what I am trying to accomplish. Ultimately, I want the entire Stix Two Math OTF font available to me without having to replace MathTime Pro II. I will likely only need a few characters at a time.


\newcommand\defend{{\fontspec{STIX Two Math}\char"27D3}}. But as I said, this was text mode. – Mike Pugh Jul 01 '23 at 16:43