latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
239 stars 28 forks source link

mathversion and bold symbols #512

Open stone-zeng opened 5 years ago

stone-zeng commented 5 years ago

Description

Now ExtraBold, Heavy, Ultra in Fira Math do not have bold symbols (U+1D400 etc).

If using several weights containing the above ones, for example, Thin+Ultra, then when set \mathversion for them, the bold symbols of the normal weights (Thin in the example) will disappear.

Check/indicate

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{amsmath,unicode-math}
\setmathfont{FiraMath-Thin.otf}[version=Thin]
\setmathfont{FiraMath-Regular.otf}[version=Regular]
% \setmathfont{FiraMath-Ultra.otf}[version=Ultra]

\begin{document}
\mathversion{Thin}    $ ABC abc \symbf{abc} $ \par
\mathversion{Regular} $ ABC abc \symbf{abc} $ \par
% \mathversion{Ultra}   $ ABC abc \symbf{abc} $ \par
\end{document}

image

If uncomment the Ultra lines, then the bold symbols of Thin and Regular disappear:

image

Further details

The only other math font that contains multiple weights is (as far as I know) is XITS Math Bold. But it uses the same glyphs as normal weights for the bold weights (U+1D400 is the same as U+0041). So should I create the mapping in Fira Math Ultra etc as in XITS Math Bold?

wspr commented 5 years ago

Interesting (albeit problematic!). Thanks for the nice test case.

The math version implementation has always had its problems; I think the \symXX commands need a lot more work to hook in correctly with the math versions.

Unfortunately I can’t promise a timely fix at the moment, it’s a busy time of year...