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

`\setmathfont[range="0303]` loads \tilde but not \widetilde #558

Open sgolovan opened 3 years ago

sgolovan commented 3 years ago

Description

When I load the tilde (or hat) accent from another font using \setmathfont[range="0303]{Fontname Math}, its wide equivalent is not loaded.

Loading it via \setmathfont[range="0303="0304]{Fontname Math} works fine for \widetilde, but obviously redefines \bar, which may be not desirable.

Shouldn't the wide accent also be loaded along with the short one? Or is there a way to load the wide accent from another font separately?

I've tested this using LuaTeX with unicode-math 2020/01/31 v0.8q.

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Fira Sans}
\usepackage{unicode-math}
\begin{document}
\setmathfont{Fira Math}
Fira Math \verb|\tilde|, \verb|\widetilde|, \verb|\bar|: $\tilde{Var}$, $\widetilde{Var}$, $\bar{X}$.

\setmathfont[range="0303]{GFS Neohellenic Math}
\setmathfont[range={}]{Fira Math}

GFS Neohellenic Math \verb|\tilde|, Fira Math \verb|\widetilde|, \verb|\bar|: $\tilde{Var}$, $\widetilde{Var}$, $\bar{X}$.

\setmathfont[range="0303-"0304]{GFS Neohellenic Math}
\setmathfont[range={}]{Fira Math}

GFS Neohellenic Math \verb|\tilde|, \verb|\widetilde|, \verb|\bar|: $\tilde{Var}$, $\widetilde{Var}$, $\bar{X}$.

\end{document}
sgolovan commented 3 years ago

I forgot to mention a quick workaroud:

\setmathfont[range="0303-"0304]{GFS Neohellenic Math}
\setmathfont[range={"0304}]{Fira Math}