XeLaTeX:某些字体形状不可用,已替换为默认字体

XeLaTeX:某些字体形状不可用,已替换为默认字体

当我编译以下代码时

\documentclass{article}

\usepackage{mathspec}
\setmathsfont(Latin){Neo Euler}

\begin{document}
    \( A \)
\end{document}

使用 XeLaTeX 我收到以下警告:

Font shape `TU/NeoEuler(0)/m/it' undefined(Font) using `TU/NeoEuler(0)/m/n' instead
Some font shapes were not available, defaults substituted.

我安装了一种名为 Neo Euler 的字体。我不喜欢警告,该怎么办?

答案1

您想要声明斜体字体是直立的(也是唯一的)。

\documentclass{article}

\usepackage{mathspec}
\setmathsfont(Latin)[
  ItalicFont=*
]{Neo Euler}

\begin{document}
    \( A \)
\end{document}

这是控制台输出:

This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./euler.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2017/texmf-dist/tex/xelatex/mathspec/mathspec.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2017/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/local/texlive/2017/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/tuenc.def))
(/usr/local/texlive/2017/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/keyval.tex)))))
(./euler.aux) [1] (./euler.aux) )
Output written on euler.pdf (1 page).
Transcript written on euler.log.

相关内容