当我使用 CMU Serif 字体排版文档时,所有内容在显示上看起来都很好。但是当我打印文档时,连字和撇号的粗细不正确:
我在两台不同的计算机和打印机上进行了测试,因此,这应该不是打印机的问题。
您能否建议如何在 LuaLaTeX 中排版和打印拉丁文和西里尔文的混合体,而不会出现这些缺陷?我知道我可以关闭连字。但撇号(和引号)仍然看起来很糟糕。
示例代码:
\documentclass[20pt]{extarticle}
\usepackage{fontspec}
\setmainfont{CMU Serif}
\begin{document}
\textbf{There is something fishy.}
When printed, the thickness of ``fi'' is wrong.
Also apostrophes are wrong. What's going on?
\end{document}
使用 LuaLaTeX 和 XeLaTeX 进行测试。
更新:终端输出:
/usr/local/texlive/2019/bin/x86_64-darwin/lualatex -file-line-error -interaction=nonstopmode -synctex=1 minimal_example.tex
This is LuaTeX, Version 1.10.0 (TeX Live 2019)
restricted system commands enabled.
(./minimal_example.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-02-25> (/usr/local/texlive/2019/texmf-dist/tex/latex/extsizes/extarticle.cls
Document Class: extarticle 1996/10/08 v1.0 Non Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/extsizes/size20.clo) (/usr/local/texlive/2019/texmf-dist/tex/latex/base/exscale.sty)) (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def))) (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/base/fontenc.sty) (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
No file minimal_example.aux.
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/ts1cmr.fd) [1{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./minimal_example.aux))
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: 1:1,2:19,3:4,4:1,5:27,6:3,7:146,9:11,11:5
</Users/jan/Library/Fonts/CMUSerif-Roman.ttf></Users/jan/Library/Fonts/CMUSerif-Bold.ttf>
Output written on minimal_example.pdf (1 page, 16922 bytes).
SyncTeX written on minimal_example.synctex.gz.
Transcript written on minimal_example.log.
/usr/local/texlive/2019/bin/x86_64-darwin/lualatex -file-line-error -interaction=nonstopmode -synctex=1 minimal_example.tex
This is LuaTeX, Version 1.10.0 (TeX Live 2019)
restricted system commands enabled.
(./minimal_example.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-02-25> (/usr/local/texlive/2019/texmf-dist/tex/latex/extsizes/extarticle.cls
Document Class: extarticle 1996/10/08 v1.0 Non Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/extsizes/size20.clo) (/usr/local/texlive/2019/texmf-dist/tex/latex/base/exscale.sty)) (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def))) (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/base/fontenc.sty) (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (./minimal_example.aux) (/usr/local/texlive/2019/texmf-dist/tex/latex/base/ts1cmr.fd) [1{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./minimal_example.aux))
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: 1:1,2:19,3:4,4:1,5:27,6:3,7:146,9:11,11:5
</Users/jan/Library/Fonts/CMUSerif-Roman.ttf></Users/jan/Library/Fonts/CMUSerif-Bold.ttf>
Output written on minimal_example.pdf (1 page, 16922 bytes).
SyncTeX written on minimal_example.synctex.gz.
Transcript written on minimal_example.log.
日志文件:
This is LuaTeX, Version 1.10.0 (TeX Live 2019) (format=lualatex 2020.3.13) 27 AUG 2021 07:12
restricted system commands enabled.
file:line:error style messages enabled.
**minimal_example.tex
(./minimal_example.tex
LaTeX2e <2020-02-02> patch level 5
Lua module: luaotfload-main 2020-02-02 3.12 luaotfload entry point
Lua module: luaotfload-init 2020-02-02 3.12 luaotfload submodule / initialization
Lua module: lualibs 2020-02-02 2.70 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2020-02-02 2.70 ConTeXt Lua libraries -- extended collection.
Lua module: luaotfload-log 2020-02-02 3.12 luaotfload submodule / logging
Lua module: luaotfload-parsers 2020-02-02 3.12 luaotfload submodule / filelist
Lua module: luaotfload-configuration 2020-02-02 3.12 luaotfload submodule / config file reader
luaotfload | conf : Root cache directory is /Users/jan/Library/texlive/2019/texmf-var/luatex-cache/generic-dev/names.
luaotfload | init : Loading fontloader “fontloader-2020-01-26.lua” from kpse-resolved path “/usr/local/texlive/2019/texmf-dist/tex/luatex/luaotfload/fontloader-2020-01-26.lua”.
Lua-only attribute luaotfload@state = 2
Lua-only attribute luaotfload@noligature = 3
Lua-only attribute luaotfload@syllabe = 4
luaotfload | init : Context OpenType loader version “3.11”
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Lua module: luaotfload-loaders 2020-02-02 3.12 luaotfload submodule / callback handling
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua module: luaotfload-database 2020-02-02 3.12 luaotfload submodule / database
Lua module: luaotfload-unicode 2020-02-02 3.12 luaotfload submodule / Unicode helpers
Lua module: luaotfload-colors 2020-02-02 3.12 luaotfload submodule / color
Lua-only attribute luaotfload_color_attribute = 5
Lua module: luaotfload-resolvers 2020-02-02 3.12 luaotfload submodule / resolvers
luaotfload | conf : Root cache directory is /Users/jan/Library/texlive/2019/texmf-var/luatex-cache/generic-dev/names.
Lua module: luaotfload-features 2020-02-02 3.12 luaotfload submodule / features
Lua module: luaotfload-letterspace 2020-02-02 3.12 luaotfload submodule / color
Lua module: luaotfload-embolden 2020-02-02 3.12 luaotfload submodule / color
Lua module: luaotfload-notdef 2020-02-02 3.12 luaotfload submodule / color
Lua module: luaotfload-auxiliary 2020-02-02 3.12 luaotfload submodule / auxiliary functions
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'.
Lua module: luaotfload-fallback 2020-02-02 3.12 luaotfload submodule / fallback
Lua module: luaotfload-multiscript 2020-02-02 3.12 luaotfload submodule / multiscript
Lua module: luaotfload-script 2020-02-02 3.12 luaotfload submodule / Script helpers
Lua module: luaotfload-tounicode 2020-02-02 3.12 luaotfload submodule / tounicode
Inserting `luaotfload.rewrite_fontname' at position 6 in `luaotfload.patch_font'. L3 programming layer <2020-02-25> (/usr/local/texlive/2019/texmf-dist/tex/latex/extsizes/extarticle.cls
Document Class: extarticle 1996/10/08 v1.0 Non Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/extsizes/size20.clo
File: size20.clo 1999/11/11 NON-Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from /Users/jan/Library/texlive/2019/texmf-var/luatex-cache/generic-dev/names/luaotfload-names.luc) (/usr/local/texlive/2019/texmf-dist/tex/latex/base/exscale.sty
Package: exscale 2018/09/24 v2.1i Standard LaTeX package exscale
LaTeX Font Info: Redeclaring symbol font `largesymbols' on input line 57.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `normal'
(Font) OMX/cmex/m/n --> OMX/cmex/m/n on input line 57.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `bold'
(Font) OMX/cmex/m/n --> OMX/cmex/m/n on input line 57.
\big@size=\dimen134
)
\c@part=\count163
\c@section=\count164
\c@subsection=\count165
\c@subsubsection=\count166
\c@paragraph=\count167
\c@subparagraph=\count168
\c@figure=\count169
\c@table=\count170
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen135
) (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/local/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2020-02-25 L3 programming layer (loader)
(/usr/local/texlive/2019/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def
File: l3backend-pdfmode.def 2020-02-23 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count171
\l__pdf_internal_box=\box45
))
Package: xparse 2020-02-25 L3 Experimental document command parser
\l__xparse_current_arg_int=\count172
\g__xparse_grabber_int=\count173
\l__xparse_m_args_int=\count174
\l__xparse_v_nesting_int=\count175
)
Package: fontspec 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX
Lua module: fontspec 2020/02/21 2.7i Font selection for XeLaTeX and LuaLaTeX (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
Package: fontspec-luatex 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX
\l__fontspec_script_int=\count176
\l__fontspec_language_int=\count177
\l__fontspec_strnum_int=\count178
\l__fontspec_tmp_int=\count179
\l__fontspec_tmpa_int=\count180
\l__fontspec_tmpb_int=\count181
\l__fontspec_tmpc_int=\count182
\l__fontspec_em_int=\count183
\l__fontspec_emdef_int=\count184
\l__fontspec_strong_int=\count185
\l__fontspec_strongdef_int=\count186
\l__fontspec_tmpa_dim=\dimen136
\l__fontspec_tmpb_dim=\dimen137
\l__fontspec_tmpc_dim=\dimen138
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2020/02/11 v2.0o Standard LaTeX package
) (/usr/local/texlive/2019/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
luaotfload | cache : Lookup cache loaded from /Users/jan/Library/texlive/2019/texmf-var/luatex-cache/generic-dev/names/luaotfload-lookup-cache.luc.
luaotfload | aux : font no 33 (nil) does not define feature smcp for script latn with language dflt
luaotfload | aux : font no 34 (nil) does not define feature smcp for script latn with language dflt
luaotfload | aux : font no 35 (nil) does not define feature smcp for script latn with language dflt
luaotfload | aux : font no 36 (nil) does not define feature smcp for script latn with language dflt
Package fontspec Info: Font family 'CMUSerif(0)' created for font 'CMU Serif'
(fontspec) with 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) <->"CMUSerif:mode=node;script=latn;language=dflt;+tlig;"
(fontspec) - 'small caps' (m/sc) with NFSS spec.:
(fontspec) - 'bold' (b/n) with NFSS spec.:
(fontspec) <->"CMUSerif/B:mode=node;script=latn;language=dflt;+tlig;"
(fontspec) - 'bold small caps' (b/sc) with NFSS spec.:
(fontspec) - 'italic' (m/it) with NFSS spec.:
(fontspec) <->"CMUSerif/I:mode=node;script=latn;language=dflt;+tlig;"
(fontspec) - 'italic small caps' (m/scit) with NFSS spec.:
(fontspec) - 'bold italic' (b/it) with NFSS spec.:
(fontspec) <->"CMUSerif/BI:mode=node;script=latn;language=dflt;+tlig;"
(fontspec) - 'bold italic small caps' (b/scit) with NFSS spec.:
(./minimal_example.aux)
\openout1 = minimal_example.aux
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5.
LaTeX Font Info: Trying to load font information for TS1+cmr on input line 5.
(/usr/local/texlive/2019/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 5.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
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 5.
LaTeX Font Info: Redeclaring math accent \acute on input line 5.
LaTeX Font Info: Redeclaring math accent \grave on input line 5.
LaTeX Font Info: Redeclaring math accent \ddot on input line 5.
LaTeX Font Info: Redeclaring math accent \tilde on input line 5.
LaTeX Font Info: Redeclaring math accent \bar on input line 5.
LaTeX Font Info: Redeclaring math accent \breve on input line 5.
LaTeX Font Info: Redeclaring math accent \check on input line 5.
LaTeX Font Info: Redeclaring math accent \hat on input line 5.
LaTeX Font Info: Redeclaring math accent \dot on input line 5.
LaTeX Font Info: Redeclaring math accent \mathring on input line 5.
LaTeX Font Info: Redeclaring math symbol \colon on input line 5.
LaTeX Font Info: Redeclaring math symbol \Gamma on input line 5.
LaTeX Font Info: Redeclaring math symbol \Delta on input line 5.
LaTeX Font Info: Redeclaring math symbol \Theta on input line 5.
LaTeX Font Info: Redeclaring math symbol \Lambda on input line 5.
LaTeX Font Info: Redeclaring math symbol \Xi on input line 5.
LaTeX Font Info: Redeclaring math symbol \Pi on input line 5.
LaTeX Font Info: Redeclaring math symbol \Sigma on input line 5.
LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 5.
LaTeX Font Info: Redeclaring math symbol \Phi on input line 5.
LaTeX Font Info: Redeclaring math symbol \Psi on input line 5.
LaTeX Font Info: Redeclaring math symbol \Omega on input line 5.
LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 5.
LaTeX Font Info: Redeclaring symbol font `operators' on input line 5.
LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font
(Font) `operators' in the math version `normal' on input line 5.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> TU/CMUSerif(0)/m/n on input line 5.
LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font
(Font) `operators' in the math version `bold' on input line 5.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmr/bx/n --> TU/CMUSerif(0)/m/n on input line 5.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) TU/CMUSerif(0)/m/n --> TU/CMUSerif(0)/m/n on input line 5.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal'
(Font) OT1/cmr/m/it --> TU/CMUSerif(0)/m/it on input line 5.
LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal'
(Font) OT1/cmr/bx/n --> TU/CMUSerif(0)/b/n on input line 5.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal'
(Font) OT1/cmss/m/n --> TU/lmss/m/n on input line 5.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal'
(Font) OT1/cmtt/m/n --> TU/lmtt/m/n on input line 5.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) TU/CMUSerif(0)/m/n --> TU/CMUSerif(0)/b/n on input line 5.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'
(Font) OT1/cmr/bx/it --> TU/CMUSerif(0)/b/it on input line 5.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> TU/lmss/b/n on input line 5.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> TU/lmtt/b/n on input line 5.
[1
{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./minimal_example.aux))
Here is how much of LuaTeX's memory you used:
3064 strings out of 481351
100000,460012 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: 1:1,2:19,3:4,4:1,5:27,6:3,7:146,9:11,11:5
20171 multiletter control sequences out of 65536+600000
38 fonts using 4721955 bytes
43i,4n,70p,239b,234s stack positions out of 5000i,500n,10000p,200000b,100000s
</Users/jan/Library/Fonts/CMUSerif-Roman.ttf></Users/jan/Library/Fonts/CMUSerif-Bold.ttf>
Output written on minimal_example.pdf (1 page, 16922 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
通过比较 2016 年安装的旧 TeX 的日志(可以产生良好的打印效果)与最新版本的 TeX 的日志(会产生格式错误的打印效果),我将差异缩小到:
</usr/local/texlive/2016/texmf-dist/fonts/opentype/public/cm-unicode/cmunrm.otf></usr/local/texlive/2016/texmf-dist/fonts/opentype/public/cm-unicode/cmunbx.otf>
对阵
</Users/jan/Library/Fonts/CMUSerif-Roman.ttf></Users/jan/Library/Fonts/CMUSerif-Bold.ttf>
长话短说,我使用的是从互联网上下载的 CMU Serif 的一个拙劣版本。ttf
使用 Font Book 应用程序卸载版本(并将其替换为otf
TeX 目录中的版本)后,打印效果看起来不错。