# [XeTeX] setting math parameters via fontdimens (or other means)

David Carlisle d.p.carlisle at gmail.com
Fri Jun 1 23:07:23 CEST 2018

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 excessively dropped subscript (as
specified by fontdimen16)

xelatex prior to 2013 did the same.

But post 2013 (presumably related to using the harfbuzz math layout)
you can set the fontdimen but it has no effect.

When experimenting with matching math fonts and text fonts it is not
at all uncommon to need to tweak the math fontdimens.

Does xetex have any way to get similar effects or do you have to
modify the values in the OpenType  Math table in fontforge or similar,
so modifying the font external to TeX?

David