# Replacing single codepoints in unicode-math with luatex

I would like to replace specific glyphs in the math font. It works perfectly when using a predefined range:

\setmathfont[math-style=TeX, Scale=\mathscale, Path=/u/val/Documents/thesis/fonts/xits/, Extension=.otf, StylisticSet={8}]{xits-math}
\setmathfont[range=it/Latin, Scale=\mathscale, Path=/u/val/Documents/thesis/fonts/EB_Garamond/, Extension=.otf]{EBGaramond12-Italic}


However, the following does not work:

\setmathfont[math-style=TeX, Scale=\mathscale, Path=/u/val/Documents/thesis/fonts/xits/, Extension=.otf, StylisticSet={8}]{xits-math}
\setmathfont[range={"1D434-"1D44D}, Scale=\mathscale, Path=/u/val/Documents/thesis/fonts/EB_Garamond/, Extension=.otf]{EBGaramond12-Italic}


I only replaced the 'range=it/Latin' with the codepoints. The 'it/Latin' range seems to have an additional effect.

How do I obtain the effect of 'range=it/Latin' combined with the freedom to only select specific glyphs?

I am using unicode-math 0.8b and LuaTex beta-0.80.0 (TeX Live 2015/TeX Live for SUSE Linux) EDIT: does not work with unicode-math 0.8d and LuaTex 0.95.0 (TeX Live 2016) either

Note: I also tried a wide range of different range expressions, none of which had any effect on the output whatsoever:

range="41-"5A
range={"41-"5A->"1D434-"1D44D}
range={"1D434-"1D44D->"41-"5A}
range=it/{"1D434-"1D44D}
range=it/{"41-"5A}
range={119860-119885}


and a few combinations of the above...

Edit:

a MWE to illustrate the issue:

\documentclass{minimal}
\usepackage{unicode-math}

\setmainfont{Kurier}
\setmathfont{xits}
\setmathfont{KurierItalic}[range={"1D434-"1D44D}]
% \setmathfont{KurierItalic}[range={it/Latin}]

\begin{document}
\textit{ABCDEFabcdef}
$ABCDEFabcdef$
\end{document}


When including the line that is currently commented out, this works (textit and math mode have the same uppercase letters) but the line above does not have any effect.

• Your unicode-math and luatex are outdated. Also you should make a complete example, this makes it easier to test your issue. Be aware that the range option has a number of bug. github.com/wspr/unicode-math/issues?utf8=✓&q=is%3Aissue%20is%3Aopen%20range – Ulrike Fischer Apr 19 '17 at 13:47
• @UlrikeFischer Added a MWE. Sadly, this luatex version ships with the current SUSE Leap release. I will look into updating luatex somehow... – val Apr 19 '17 at 15:22