[Tex/LaTex] how can we equalize the fonts of mathtt and texttt

fontsmath-modetypewriter

I'm trying to use a mono-font in my text, but it seems that mono texts differ in character map in math and text environment. Is there any solution?

\documentclass[fleqn]{article}
\usepackage{fontspec}
\setmonofont[Mapping=tex-text]{Courier New}
\begin{document}

\texttt{Farschad \% + - * \$  ! }

\[
\mathtt{Farschad \% + - * \$ !}
\]

\end{document}

enter image description here

Best Answer

\mathtt only changes the math alphabets. Just use \texttt in math mode.

\documentclass{article}

\begin{document}

$\texttt{foo-bar!}$

\end{document}