如何解决有关缺失或错误的度量数据的 LuaLaTeX 字体错误?

如何解决有关缺失或错误的度量数据的 LuaLaTeX 字体错误?

当我想用 lualatex 编译我的 tex 文件时,我总是收到以下错误:

Font \TU/lmr/m/n/10.95=[lmroman10-regular]:+tlig; at 10.95pt not loadable: metric data not found or bad. \normalsize

我不知道我改变了什么,或者说,我用 tikz 替换了 overpic,出现了另一个错误,将其改回来,现在我又出现了这个错误。

最小示例后的日志文件:

This is LuaTeX, Version 1.07.0 (MiKTeX 2.9.6630 64-bit)  (format=lualatex 2018.8.14)  14 AUG 2018 17:34
 restricted system commands enabled.
**document.tex
(./document.tex
LaTeX2e <2017-04-15>
Lua module: luaotfload-main 2017/01/29 2.80001 OpenType layout system.
Lua module: lualibs 2017-02-01 2.5 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2017-02-01 2.5 ConTeXt Lua libraries -- extended co
llection.(using cache: C:/Users/gerd_/AppData/Local/MiKTeX/2.9/luatex-cache/gene
ric)
luaotfload | conf : Root cache directory is C:/Users/gerd_/AppData/Local/MiKTeX/
2.9/luatex-cache/generic/names.
luaotfload | init : Loading fontloader “fontloader-2017-02-11.lua” from kpse
-resolved path “C:/Program Files/MiKTeX 2.9/tex/luatex/luaotfload/fontloader-2
017-02-11.lua”.
Lua-only attribute luaotfload@state = 1
Lua-only attribute luaotfload@noligature = 2
Lua-only attribute luaotfload@syllabe = 3
luaotfload | init : Context OpenType loader version “3.027”
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 4
luaotfload | conf : Root cache directory is C:/Users/gerd_/AppData/Local/MiKTeX/
2.9/luatex-cache/generic/names.
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 2 in `luaotfload.patch
_font'.
Inserting `luaotfload.aux.fixup_fontdata' at position 1 in `luaotfload.patch_fon
t_unsafe'.
Inserting `luaotfload.aux.set_capheight' at position 3 in `luaotfload.patch_font
'.
Inserting `luaotfload.rewrite_fontname' at position 4 in `luaotfload.patch_font'
.
luaotfload | main : initialization completed in 0.422 seconds
Babel <3.18> and hyphenation patterns for 1 language(s) loaded.
("C:/Program Files/MiKTeX 2.9/tex/latex/koma-script/scrreprt.cls"
Document Class: scrreprt 2018/03/30 v3.25 KOMA-Script document class (report)
("C:/Program Files/MiKTeX 2.9/tex/latex/koma-script/scrkbase.sty"
Package: scrkbase 2018/03/30 v3.25 KOMA-Script package (KOMA-Script-dependent ba
sics and keyval usage)

("C:/Program Files/MiKTeX 2.9/tex/latex/koma-script/scrbase.sty"
Package: scrbase 2018/03/30 v3.25 KOMA-Script package (KOMA-Script-independent b
asics and keyval usage)

("C:/Program Files/MiKTeX 2.9/tex/latex/graphics/keyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:/Program Files/MiKTeX 2.9/tex/latex/koma-script/scrlfile.sty"
Package: scrlfile 2018/03/30 v3.25 KOMA-Script package (loading files)
)))
("C:/Program Files/MiKTeX 2.9/tex/latex/koma-script/tocbasic.sty"
Package: tocbasic 2018/03/30 v3.25 KOMA-Script package (handling toc-files)
\scr@dte@tocline@numberwidth=\skip41
\scr@dte@tocline@numbox=\box26
)
Package tocbasic Info: omitting babel extension for `toc'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `toc' on input line 136.
Package tocbasic Info: defining new hook before heading of `' on input line 1667
.
Package scrreprt Info: You've used standard option `11pt'.
(scrreprt)             This is correct!
(scrreprt)             Internally I'm using `fontsize=11pt'.
(scrreprt)             If you'd like to set the option with \KOMAoptions,
(scrreprt)             you'd have to use `fontsize=11pt' there
(scrreprt)             instead of `11pt', too.
Class scrreprt Info: File `scrsize11pt.clo' used to setup font sizes on input li
ne 2328.

("C:/Program Files/MiKTeX 2.9/tex/latex/koma-script/scrsize11pt.clo"
File: scrsize11pt.clo 2018/03/30 v3.25 KOMA-Script font size class option (11pt)

luaotfload | db : Font names database loaded from C:/Users/gerd_/AppData/Local/M
iKTeX/2.9/luatex-cache/generic/names/luaotfload-names.luc
! Font \TU/lmr/m/n/10.95=[lmroman10-regular]:+tlig; at 10.95pt not loadable: met
ric data not found or bad.
<to be read again> 
relax 
l.112 \normalsize

I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.

) ("C:/Program Files/MiKTeX 2.9/tex/latex/koma-script/typearea.sty"
Package: typearea 2018/03/30 v3.25 KOMA-Script package (type area)
\ta@bcor=\skip42
\ta@div=\count79
Package typearea Info: You've used standard option `a4paper'.
(typearea)             This is correct!
(typearea)             Internally I'm using `paper=a4'.
(typearea)             If you'd like to set the option with \KOMAoptions,
(typearea)             you'd have to use `paper=a4' there
(typearea)             instead of `a4paper', too.
\ta@hblk=\skip43
\ta@vblk=\skip44
\ta@temp=\skip45
\footheight=\skip46

! Arithmetic overflow.
\\typearea ...by100 \divide \ta@temp by\@tempdima 
                                                  \@tempcnta =\ta@temp \ifnu...
l.1706 \typearea[current]{current}

I can't carry out that multiplication or division,
since the result is out of range.


Package typearea Warning: Bad type area settings!
(typearea)                The detected line width is about 27410792%
(typearea)                larger than the heuristically detected line width.
(typearea)                You should e.g. decrease DIV, increase fontsize
(typearea)                or change papersize.

Package typearea Info: These are the values describing the layout:
(typearea)             DIV  = 10
(typearea)             BCOR = 0.0pt
(typearea)             \paperwidth      = 597.50793pt
(typearea)              \textwidth      = 418.25555pt
(typearea)              DIV departure   = -27410792%
(typearea)              \evensidemargin = 47.2316pt
(typearea)              \oddsidemargin  = -12.5192pt
(typearea)             \paperheight     = 845.04694pt
(typearea)              \textheight     = 595.80026pt
(typearea)              \topmargin      = -25.16531pt
(typearea)              \headheight     = 17.0pt
(typearea)              \headsep        = 20.40001pt
(typearea)              \topskip        = 11.0pt
(typearea)              \footskip       = 47.6pt
(typearea)              \baselineskip   = 13.6pt
(typearea)              on input line 1706.
)
\c@part=\count80
\c@chapter=\count81
\c@section=\count82
\c@subsection=\count83
\c@subsubsection=\count84
\c@paragraph=\count85
\c@subparagraph=\count86
\scr@dte@part@maxnumwidth=\skip47
\scr@dte@chapter@maxnumwidth=\skip48
\scr@dte@section@maxnumwidth=\skip49
\scr@dte@subsection@maxnumwidth=\skip50
\scr@dte@subsubsection@maxnumwidth=\skip51
\scr@dte@paragraph@maxnumwidth=\skip52
\scr@dte@subparagraph@maxnumwidth=\skip53
\abovecaptionskip=\skip54
\belowcaptionskip=\skip55
\c@pti@nb@sid@b@x=\box27
\scr@dte@figure@maxnumwidth=\skip56
Package tocbasic Info: omitting babel extension for `lof'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `lof' on input line 6247.
\c@figure=\count87
\scr@dte@table@maxnumwidth=\skip57
Package tocbasic Info: omitting babel extension for `lot'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `lot' on input line 6264.
\c@table=\count88
Class scrreprt Info: Redefining `\numberline' on input line 6433.
\bibindent=\dimen102
)

LaTeX Warning: Unused global option(s):
    [ngerman].

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

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 2.
LaTeX Font Info:    ... okay on input line 2.
 [1

Missing character: There is no H (U+0048) in font nullfont!
Missing character: There is no e (U+0065) in font nullfont!
Missing character: There is no l (U+006C) in font nullfont!
Missing character: There is no l (U+006C) in font nullfont!
Missing character: There is no o (U+006F) in font nullfont!
Missing character: There is no W (U+0057) in font nullfont!
Missing character: There is no o (U+006F) in font nullfont!
Missing character: There is no r (U+0072) in font nullfont!
Missing character: There is no l (U+006C) in font nullfont!
Missing character: There is no d (U+0064) in font nullfont!
Missing character: There is no ! (U+0021) in font nullfont!
Missing character: There is no 1 (U+0031) in font nullfont!
] (./document.aux))

Here is how much of LuaTeX's memory you used:
 2397 strings out of 494447
 100000,221844 words of node,token memory allocated
 375 words of node memory still in use:
   2 hlist, 1 vlist, 1 rule, 2 glue, 3 attribute, 49 glue_spec, 3 attribute_list
, 1 write nodes
   avail lists: 2:21,3:2,4:1,5:24,6:1,7:24,8:1,9:9
 6582 multiletter control sequences out of 65536+200000
 14 fonts using 591871 bytes
 42i,6n,66p,9102b,150s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on document.pdf (1 page, 837 bytes).

PDF statistics: 6 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 131072)
 1 words of extra memory for PDF output out of 10000 (max. 100000000)

答案1

这确实是 MikTex 安装有问题。无法更新甚至卸载 MikTex。我使用强力方法删除了所有与 MikTex 相关的内容(在我的 Windows 笔记本电脑上的程序和用户文件夹中),然后运行注册表清理程序(CCleaner)。然后我再次安装了 MikTex,然后,它就正常工作了。

相关内容