从 TL2021 升级到 TL2022 后出现 LuaLaTeX 字体问题

从 TL2021 升级到 TL2022 后出现 LuaLaTeX 字体问题

我从 TeXlive 2021 升级到 TeXlive 2022 的时间比较晚,因为我担心兼容性问题。我的文档可以编译,但出现了一个奇怪的问题,看起来\textit{}不正常。我正在lualatex使用Arial字体进行编译,这是我本地 TeXlive 2022 安装上的样子:

局部从头

当我使用 2022 版 LuaLaTeX 在 OverLeaf 上编译时,我的 MWE 编译如下(注意:两张图片都是以 125% 缩放比例从各自的 PDF 中拍摄的):

在此处输入图片描述

是什么原因导致斜体变成这样?我的一种引用风格涉及biblatex斜体引用,例如(2),这也受到了影响。Andrew Stacey 针对另一个问题的解决方案TL2022 升级后 lualatex 问题没有起作用(诚然,通过运行解决了另一个问题fmtutil-sys --all,但觉得可以在询问之前消除它)。

梅威瑟:

\documentclass{book}

\usepackage{fontspec}
\setmainfont{Arial}

\newcommand*\denovo{\textit{de novo}}
\newcommand*\Denovo{\textit{De novo}}   

\begin{document}

Foo \denovo. \Denovo\ bar.

\end{document}

我曾经\listfiles获取过版本号。对于我的本地 2022 安装,这些是 LuaLaTeX 版本和软件包:

This is LuaHBTeX, Version 1.15.0 (TeX Live 2022)
 *File List*
    book.cls    2022/07/02 v1.4n Standard LaTeX document class
    bk10.clo    2022/07/02 v1.4n Standard LaTeX file (size option)
fontspec.sty    2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX
  xparse.sty    2023-02-02 L3 Experimental document command parser
   expl3.sty    2023-02-07 L3 programming layer (loader) 
l3backend-luatex.def    2023-01-16 L3 backend support: PDF output (LuaTeX)
fontspec-luatex.sty    2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX

 fontenc.sty    2021/04/29 v2.0v Standard LaTeX package
fontspec.cfg
  ts1cmr.fd    2022/07/10 v2.5l Standard LaTeX font definitions
 ***********

在 OverLeaf 上,这些是 LuaLaTeX 和包版本:

This is LuaHBTeX, Version 1.15.0 (TeX Live 2022)  (format=lualatex 2022.8.9)
 *File List*
    book.cls    2021/10/04 v1.4n Standard LaTeX document class
    bk10.clo    2021/10/04 v1.4n Standard LaTeX file (size option)
fontspec.sty    2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX
  xparse.sty    2022-06-22 L3 Experimental document command parser
   expl3.sty    2022-08-05 L3 programming layer (loader) 
l3backend-luatex.def    2022-08-05 L3 backend support: PDF output (LuaTeX)
fontspec-luatex.sty    2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty    2021/04/29 v2.0v Standard LaTeX package
fontspec.cfg
  ts1cmr.fd    2019/12/16 v2.5j Standard LaTeX font definitions
 ***********

当我使用(即我的 2021 LuaLaTeX)编译 MWE 时$ C:\texlive\2021\bin\win32\lualatex.exe untitled-1.tex,这些是版本:

This is LuaHBTeX, Version 1.13.2 (TeX Live 2021/W32TeX)  (format=lualatex 2021.5.20)
 *File List*
    book.cls    2020/04/10 v1.4m Standard LaTeX document class
    bk10.clo    2020/04/10 v1.4m Standard LaTeX file (size option)
fontspec.sty    2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX
  xparse.sty    2021-01-09 L3 Experimental document command parser
   expl3.sty    2021-05-11 L3 programming layer (loader) 
l3backend-luatex.def    2021-05-07 L3 backend support: PDF output (LuaTeX)
xparse-2020-10-01.sty    
fontspec-luatex.sty    2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX

 fontenc.sty
fontspec.cfg
  ts1cmr.fd    2019/12/16 v2.5j Standard LaTeX font definitions
 ***********

这些是完整的日志。对于运行 MWE 的本地 TeXlive 2022 安装:

-----------------------------------------------------------------
(LuaLaTeX) LuaLaTeX engine
-----------------------------------------------------------------
This is LuaHBTeX, Version 1.15.0 (TeX Live 2022) 
 restricted system commands enabled.
(./untitled-1.tex
LaTeX2e <2022-11-01> patch level 1
 L3 programming layer <2023-02-07>
(c:/texlive/2022/texmf-dist/tex/latex/base/book.cls
Document Class: book 2022/07/02 v1.4n Standard LaTeX document class
(c:/texlive/2022/texmf-dist/tex/latex/base/bk10.clo))
(c:/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.sty
(c:/texlive/2022/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(c:/texlive/2022/texmf-dist/tex/latex/l3kernel/expl3.sty
(c:/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)))
(c:/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(c:/texlive/2022/texmf-dist/tex/latex/base/fontenc.sty)
(c:/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
No file untitled-1.aux.
(c:/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd) [1{c:/texlive/2022/texmf-
var/fonts/map/pdftex/updmap/pdftex.map}] (./untitled-1.aux)

 *File List*
    book.cls    2022/07/02 v1.4n Standard LaTeX document class
    bk10.clo    2022/07/02 v1.4n Standard LaTeX file (size option)
fontspec.sty    2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX
  xparse.sty    2023-02-02 L3 Experimental document command parser
   expl3.sty    2023-02-07 L3 programming layer (loader) 
l3backend-luatex.def    2023-01-16 L3 backend support: PDF output (LuaTeX)
fontspec-luatex.sty    2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX

 fontenc.sty    2021/04/29 v2.0v Standard LaTeX package
fontspec.cfg
  ts1cmr.fd    2022/07/10 v2.5l Standard LaTeX font definitions
 ***********

)
 406 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 48 glue_spec
, 4 attribute_list, 1 write nodes
   avail lists: 2:36,3:4,4:1,5:24,6:2,7:74,9:18
<c:/Windows/Fonts/ARIALNI.TTF><c:/Windows/Fonts/arial.ttf>
Output written on untitled-1.pdf (1 page, 26929 bytes).
Transcript written on untitled-1.log.

和 OverLeaf:

This is LuaHBTeX, Version 1.15.0 (TeX Live 2022)  (format=lualatex 2022.8.9)  14 FEB 2023 17:24
 system commands enabled.
**main.tex
(./main.tex
LaTeX2e <2022-06-01> patch level 5
Lua module: luaotfload 2022-03-18 3.21 Lua based OpenType font support
Lua module: lualibs 2021-05-20 2.74 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2021-05-20 2.74 ConTeXt Lua libraries -- extended collection.
luaotfload | conf : Root cache directory is "/home/tex/texmf-var/luatex-cache/generic/names".
luaotfload | init : Loading fontloader "fontloader-2022-02-24.lua" from kpse-resolved path "/usr/local/texlive/2022/texmf-dist/tex/luatex/luaotfload/fontloader-2022-02-24.lua".
Lua-only attribute luaotfload@noligature = 1
luaotfload | init : Context OpenType loader version 3.119
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.glyph_stream' at position 1 in `glyph_stream_provider'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 2
luaotfload | conf : Root cache directory is "/home/tex/texmf-var/luatex-cache/generic/names".
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_opentype_file'.
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_truetype_file'.
Removing  `luaotfload.glyph_stream' from `glyph_stream_provider'.
Inserting `luaotfload.harf.glyphstream' at position 1 in `glyph_stream_provider'.
Inserting `luaotfload.harf.finalize_vlist' at position 1 in `post_linebreak_filter'.
Inserting `luaotfload.harf.finalize_hlist' at position 2 in `hpack_filter'.
Inserting `luaotfload.cleanup_files' at position 1 in `wrapup_run'.
Inserting `luaotfload.harf.finalize_unicode' at position 1 in `finish_pdffile'.
Inserting `luaotfload.glyphinfo' at position 1 in `glyph_info'.
Lua-only attribute luaotfload.letterspace_done = 3
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_font'.
Inserting `luaotfload.aux.set_font_index' at position 2 in `luaotfload.patch_font'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 3 in `luaotfload.patch_font'.
Inserting `luaotfload.aux.fixup_fontdata' at position 1 in `luaotfload.patch_font_unsafe'.
Inserting `luaotfload.aux.set_capheight' at position 4 in `luaotfload.patch_font'.
Inserting `luaotfload.aux.set_xheight' at position 5 in `luaotfload.patch_font'.
Inserting `luaotfload.rewrite_fontname' at position 6 in `luaotfload.patch_font'. L3 programming layer <2022-08-05>
Inserting `tracingstacklevels' at position 1 in `input_level_string'. (/usr/local/texlive/2022/texmf-dist/tex/latex/base/book.cls
Document Class: book 2021/10/04 v1.4n Standard LaTeX document class
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/bk10.clo
File: bk10.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from /home/tex/texmf-var/luatex-cache/generic/names/luaotfload-names.luc.gz)
\c@part=\count183
\c@chapter=\count184
\c@section=\count185
\c@subsection=\count186
\c@subsubsection=\count187
\c@paragraph=\count188
\c@subparagraph=\count189
\c@figure=\count190
\c@table=\count191
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen137
) (/usr/local/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/local/texlive/2022/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2022-08-05 L3 programming layer (loader) 
(/usr/local/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
File: l3backend-luatex.def 2022-08-05 L3 backend support: PDF output (LuaTeX)
\l__color_backend_stack_int=\count192
\l__pdf_internal_box=\box51
))
Package: xparse 2022-06-22 L3 Experimental document command parser
)
Package: fontspec 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX
Lua module: fontspec 2022/01/15 2.8a Font selection for XeLaTeX and LuaLaTeX (/usr/local/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
Package: fontspec-luatex 2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX
\l__fontspec_script_int=\count193
\l__fontspec_language_int=\count194
\l__fontspec_strnum_int=\count195
\l__fontspec_tmp_int=\count196
\l__fontspec_tmpa_int=\count197
\l__fontspec_tmpb_int=\count198
\l__fontspec_tmpc_int=\count199
\l__fontspec_em_int=\count266
\l__fontspec_emdef_int=\count267
\l__fontspec_strong_int=\count268
\l__fontspec_strongdef_int=\count269
\l__fontspec_tmpa_dim=\dimen138
\l__fontspec_tmpb_dim=\dimen139
\l__fontspec_tmpc_dim=\dimen140
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
) (/usr/local/texlive/2022/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
luaotfload | cache : Lookup cache loaded from /home/tex/texmf-var/luatex-cache/generic/names/luaotfload-lookup-cache.luc.
luaotfload | aux : font no 18 (nil) defines no feature for script latn
luaotfload | aux : font no 18 (nil) defines no feature for script dflt

Package fontspec Info: Font family 'Arial(0)' created for font 'Arial' with
(fontspec)             options [Ligatures=TeX].
(fontspec)              
(fontspec)              This font family consists of the following NFSS
(fontspec)             series/shapes:
(fontspec)              
(fontspec)             - 'normal' (m/n) with NFSS spec.:
(fontspec)             <->"Arial:mode=node;language=dflt;+tlig;"
(fontspec)             - 'small caps'  (m/sc) with NFSS spec.: 
(fontspec)             - 'bold' (b/n) with NFSS spec.:
(fontspec)             <->"Arial/B:mode=node;language=dflt;+tlig;"
(fontspec)             - 'bold small caps'  (b/sc) with NFSS spec.: 
(fontspec)             - 'italic' (m/it) with NFSS spec.:
(fontspec)             <->"Arial/I:mode=node;language=dflt;+tlig;"
(fontspec)             - 'italic small caps'  (m/scit) with NFSS spec.: 
(fontspec)             - 'bold italic' (b/it) with NFSS spec.:
(fontspec)             <->"Arial/BI:mode=node;language=dflt;+tlig;"
(fontspec)             - 'bold italic small caps'  (b/scit) with NFSS spec.: 

(./output.aux)
\openout1 = output.aux

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 9.
LaTeX Font Info:    Trying to load font information for TS1+cmr on input line 9.
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 2019/12/16 v2.5j Standard LaTeX font definitions
)
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 9.
LaTeX Font Info:    ... okay on input line 9.

Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid
(fontspec)             this).

\symlegacymaths=\mathgroup4
LaTeX Font Info:    Overwriting symbol font `legacymaths' in version `bold'
(Font)                  OT1/cmr/m/n --> OT1/cmr/bx/n on input line 9.
LaTeX Font Info:    Redeclaring math accent \acute on input line 9.
LaTeX Font Info:    Redeclaring math accent \grave on input line 9.
LaTeX Font Info:    Redeclaring math accent \ddot on input line 9.
LaTeX Font Info:    Redeclaring math accent \tilde on input line 9.
LaTeX Font Info:    Redeclaring math accent \bar on input line 9.
LaTeX Font Info:    Redeclaring math accent \breve on input line 9.
LaTeX Font Info:    Redeclaring math accent \check on input line 9.
LaTeX Font Info:    Redeclaring math accent \hat on input line 9.
LaTeX Font Info:    Redeclaring math accent \dot on input line 9.
LaTeX Font Info:    Redeclaring math accent \mathring on input line 9.
LaTeX Font Info:    Redeclaring math symbol \colon on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Gamma on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Delta on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Theta on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Lambda on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Xi on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Pi on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Sigma on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Upsilon on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Phi on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Psi on input line 9.
LaTeX Font Info:    Redeclaring math symbol \Omega on input line 9.
LaTeX Font Info:    Redeclaring math symbol \mathdollar on input line 9.
LaTeX Font Info:    Redeclaring symbol font `operators' on input line 9.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `normal' on input line 9.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> TU/Arial(0)/m/n on input line 9.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `bold' on input line 9.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> TU/Arial(0)/m/n on input line 9.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  TU/Arial(0)/m/n --> TU/Arial(0)/m/n on input line 9.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> TU/Arial(0)/m/it on input line 9.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> TU/Arial(0)/b/n on input line 9.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> TU/lmss/m/n on input line 9.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/m/n on input line 9.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  TU/Arial(0)/m/n --> TU/Arial(0)/b/n on input line 9.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> TU/Arial(0)/b/it on input line 9.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> TU/lmss/b/n on input line 9.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/b/n on input line 9.
LaTeX Font Info:    Font shape `TU/Arial(0)/m/sl' in size <10> not available
(Font)              Font shape `TU/Arial(0)/m/it' tried instead on input line 13.
[1{/usr/local/texlive/2022/texmf-var/fonts/map/pdftex/updmap/pdftex.map}

] (./output.aux)

 *File List*
    book.cls    2021/10/04 v1.4n Standard LaTeX document class
    bk10.clo    2021/10/04 v1.4n Standard LaTeX file (size option)
fontspec.sty    2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX
  xparse.sty    2022-06-22 L3 Experimental document command parser
   expl3.sty    2022-08-05 L3 programming layer (loader) 
l3backend-luatex.def    2022-08-05 L3 backend support: PDF output (LuaTeX)
fontspec-luatex.sty    2022/01/15 v2.8a Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty    2021/04/29 v2.0v Standard LaTeX package
fontspec.cfg
  ts1cmr.fd    2019/12/16 v2.5j Standard LaTeX font definitions
 ***********

)

Here is how much of LuaTeX's memory you used:
 2844 strings out of 477465
 100000,552014 words of node,token memory allocated
 406 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 48 glue_spec, 4 attribute_list, 1 write nodes
   avail lists: 2:36,3:4,4:1,5:23,6:2,7:74,9:18
 23893 multiletter control sequences out of 65536+600000
 28 fonts using 3111919 bytes
 72i,5n,79p,224b,208s stack positions out of 10000i,1000n,20000p,200000b,200000s
</usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf></usr/share/fonts/truetype/msttcorefonts/arial.ttf>
Output written on output.pdf (1 page, 23455 bytes).

PDF statistics: 22 PDF objects out of 1000 (max. 8388607)
 12 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 131072)
 1 words of extra memory for PDF output out of 10000 (max. 100000000)

答案1

(发布答案以便我可以接受并完成这个问题)。@Ulrike Fischer 的评论有效,将 MWE 更改为以下内容解决了该问题:

\documentclass{book}

\usepackage{fontspec} % LuaLaTeX
\setmainfont{Arial}[ItalicFont=ariali.ttf,BoldFont=arialbd.ttf,BoldItalicFont=arialbi.ttf]
\newcommand*\denovo{\textit{de novo}}
\newcommand*\Denovo{\textit{De novo}}   

\begin{document}

Foo \denovo. \Denovo\ bar.

\end{document}

相关内容