latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
277 stars 34 forks source link

Again a problem with loading a math font #354

Closed hvoss49 closed 5 years ago

hvoss49 commented 5 years ago

Check/indicate

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Calibri}
\begin{document}
\[
  a = b
\]
\end{document}

Further details

Using Calibri as math font is nonsense. However, it should not break the lua(xe)latex run.:

(/usr/local/texlive/2018/texmf-dist/tex/latex/unicode-math/unicode-math-table.t
ex)))

Package fontspec Warning: Font "Calibri" does not contain requested Script "".
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.4 \begin
          {document}

In the pdf-output you'll find "MathMathMathMath" at the beginning. Which is the reason for the LaTeX error.

Up-to-date TL2018

wspr commented 5 years ago

Hi Herbert. Sorry for this. I think the version on CTAN (uploaded about 24 hrs ago) has fixed this problem — it may not have propagated to TL completely yet.

But something else is up. This example should work but unicode-math is now giving me some errors :(

wspr commented 5 years ago

Actually the errors I'm now receiving are probably expected and not new behaviour:

Package fontspec Warning: Font 'Times' does not contain script 'Math'.
./small.tex:7: Font \TU/Times(0)/m/n/10 has only 8 fontdimen parameters.

As of a few (?) versions ago, unicode-math now requires that the first font loaded is a "real" unicode-math font. But I thought there was a sensible error message...

RuixiZhang42 commented 5 years ago

The “leaking” of the strings “Math” was a bug also reported here in issue 346. This was swiftly resolved in v2.7a of fontspec and we just needed to wait…