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

Long division looks broken in LuaTeX and XeTeX #527

Closed matteocoder closed 2 years ago

matteocoder commented 4 years ago

Description

The line over the numbers or formula in a long division does not connect well to the u+027cc symbol.

Add info or delete as appropriate:

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{XITSMath-Regular.otf}% Try STIX2Math.otf or cambria.ttc as well.
\begin{document}
\[
  \longdivision{a = b}
\]
\end{document}

Further details

Setup: TeX Live 2019 for Windows, LuaTeX 1.10, XeTeX 3.14159265-2.6-0.999991, unicode-math 0.80.

Edit: here are the screenshots for the fonts mentioned previously:

stone-zeng commented 4 years ago

Cambria Math is actually correct, you need to scale it to enough size:

image

For small size your os may not render it smoothly.

But for XITS and STIX2, the problem is from the design of these fonts:

image

The value radicalRuleThickness in XITS Math/STIXTwoMath is 66/68, while the actual thickness of the horizontal line in uni27CC is 54/55, so you may expect the breaking point. For Cambria Math, however, this value is 133 (ignore the device table) and the line is 133 as well, so it goes fit.

Reference: https://docs.microsoft.com/typography/opentype/spec/math

matteocoder commented 4 years ago

Thanks for your thorough reply @stone-zeng . In this case, should I open an issue on the XITS and STIX repos?