Feeding xelatex or lualatex with
\documentclass{article} \pagestyle{empty} \usepackage{unicode-math} \setmainfont[Ligatures=TeX]{TeX Gyre Termes} \setsansfont{TeX Gyre Heros}[Scale=0.88]%%% Somewhat ok. \setmonofont{TeX Gyre Cursor}%%% No explicit turning on ligatures for the monospaced font. \setmathfont[Ligatures=TeX]{TeX Gyre Termes Math} \tracinglostchars=2 \begin{document} \(\mathit{\vec{i}}\) \end{document} results in
i
without any arrow. Of course, the problem can be circumvented by dropping \usepackage{unicode-math} … \setmathfont[Ligatures=TeX]{TeX Gyre Termes Math} or exchanging the order of calling \vec and \mathit or simply dropping \mathit for single-letter arguments (as no kerning between adjacent letters of the argument would be needed). However, since the calls to the two macros may be hidden inside other macros (and for my larger, non-minimal LaTeX sources, they are indeed hidden inside other macros), it would be better to solve the problem already on the level of the preamble or in the unicode-math package or by patching it or, ideally, extending the TeX Gyre Termes Math font in such a way that the user's main document needn't be changed. Any idea how to do this?
PS. For latex/pdflatex and NewTX, cf. \mathit{\vec{…}} silently swallows up the vector when using latex/pdflatex and newtxmath .
\tracinglostchars=2, thanks!!!\usepackage[mathit=sym]{unicode-math}, then \mathit will no longer switch to a text font. But basically your input is errounous.\mathitis not a command to make a mathematical expression italic, but should normally be used with letters only.