[Tex/LaTex] How to use Arial in math mode alongside the default font settings

math-mode

I want some symbols/text in math mode to be Arial? This cannot ve done by changing the settings for various kinds of text in math mode like the default italic text or the default bold text. Put another way, I want something like \arial{text} the same there is stuff like \mathbb{text} and \mathcal{text}. How do I do this?

Best Answer

With unicode-math, you can:

\DeclareMathAlphabet{\matharial}{Arial}[
   Ligatures={Common, Tex} ,
   Scale = MatchLowercase ]

In legacy NFSS, you can load uarial or winfonts along with amsmath and then select the font inside a \text command, e.g.

\newcommand\matharial[1]{\text{\normalfont\itshape\fontfamily{arial}\selectfont #1}}