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

`CharacterVariant` doesn't work for smaller font sizes with LuaTeX #587

Open teatimeguest opened 2 years ago

teatimeguest commented 2 years ago

Description

When using LuaTeX, the CharacterVariant feature doesn't work for small font sizes such as \scriptstyle and \footnotesize. This problem doesn't occur with XeTeX.

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{STIXTwoMath-Regular.otf}[CharacterVariant=3]
\begin{document}
  $\varnothing$
  % The following produce incorrect output:
  $\scriptstyle\varnothing$
  $\scriptscriptstyle\varnothing$
  \footnotesize$\varnothing$
  \scriptsize$\varnothing$
  \tiny$\varnothing$
\end{document}

Further details

Compiling the above code yields the following output: