Discussion:
[XeTeX] setting math parameters via fontdimens (or other means)
David Carlisle
2018-06-01 21:07:23 UTC
Permalink
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


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex
David Carlisle
2018-06-08 08:14:10 UTC
Permalink
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 accounts for the different output shown on
old releases.

So... this isn't a regression, sorry about the misleading initial message.

But the feature request remains, could it be possible to change the
font parameters after the initial font load so as to adjust the math
typesetting without having to use fontforge or similar to change the
parameters in a copy of the font.

David


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex

Loading...