I wrote
\ifx\Umathchar\undefined
\usepackage{lmodern}
\else
\usepackage{unicode-math}
\fi
..
Khaled kindly corrected me off list.
This test file is faulty, prior to 2013 \Umathchar wasn't defined
(just \XeTeX...) so the test file takes the classic tfm font route on
old installations, which
This document
\documentclass{article}
\ifx\Umathchar\undefined
\usepackage{lmodern}
\else
\usepackage{unicode-math}
\fi
\begin{document}
\sbox0{$x$}
\typeout{\expandafter\meaning\the\textfont2}
\fontdimen16\textfont2=20pt
$a_b$
\end{document}
If processed with pdflatex has an