字体无法加载:未找到度量数据或数据错误

字体无法加载:未找到度量数据或数据错误

好的,我遇到了以下问题,它与其他人报告的问题类似。但是,我还没有看到任何和我一样简单的问题,也没有找到适合我的操作系统的解决方案。我正尝试使用 LuaLaTeX 在 Windows 上编译以下文档(我使用 Miktex 来管理我的 LaTeX 包):

\documentclass[10]{article}
\usepackage{bbold}
\begin{document}
Inserting some words here. 
\[
   \mathbb{1}
\]
\end{document}

我收到的错误如下:

This is LuaTeX, Version beta-0.80.0 (MiKTeX 2.9 64-bit) (rev 5238)  (format=lualatex 2016.1.5)  12 JAN 2016 14:47
 file:line:error style messages enabled.
**test.tex
(./test.tex
LaTeX2e <2015/10/01> patch level 2
Babel <3.9m> and hyphenation patterns for 69 languages loaded.
(C:/Miktex64/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(C:/Miktex64/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (C:/Miktex64/tex/latex/bbold/bbold.sty
Package: bbold 1994/04/06 Bbold symbol package
)

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

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

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 16.
LaTeX Font Info:    ... okay on input line 16.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 16.
LaTeX Font Info:    ... okay on input line 16.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 16.
LaTeX Font Info:    ... okay on input line 16.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 16.
LaTeX Font Info:    ... okay on input line 16.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 16.
LaTeX Font Info:    ... okay on input line 16.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 16.
LaTeX Font Info:    ... okay on input line 16.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 18.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <5> on input line 18.
LaTeX Font Info:    Try loading font information for U+bbold on input line 19.
 (C:/Miktex64/tex/latex/jknappen/ubbold.fd
File: ubbold.fd 1996/01/01 Blackboard Bold Font Definition File (jk)
)
./test.tex:19: Font \U/bbold/m/n/10=bbold10 at 10pt not loadable: metric data no
t found or bad.
<to be read again> 
relax 
l.19    \mathbb{R}

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>'.

./test.tex:19: Font \U/bbold/m/n/7=bbold7 at 7pt not loadable: metric data not f
ound or bad.
<to be read again> 
relax 
l.19    \mathbb{R}

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>'.

./test.tex:19: Font \U/bbold/m/n/5=bbold5 at 5pt not loadable: metric data not f
ound or bad.
<to be read again> 
relax 
l.19    \mathbb{R}

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>'.

./test.tex:20: \textfont4 is undefined (character 82).
\]  ->\relax \ifmmode \ifinner \@badmath \else $$
                                                 \fi \else \@badmath \fi \ig...
l.20 \]

Somewhere in the math formula just ended, you used the
stated character from an undefined font family. For example,
plain TeX doesn't allow \it or \sl in subscripts. Proceed,
and I'll try to forget that I needed that character.

[1

{C:/Users/John Rinehart/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(./test.aux))

Here is how much of LuaTeX's memory you used:
 265 strings out of 494933
 100000,89155 words of node,token memory allocated
 264 words of node memory still in use:
    nodes
   avail lists: 2:12,3:4,4:29,5:1,6:32,7:1,9:7,10:2
 3973 multiletter control sequences out of 65536+200000
 25 fonts using 995431 bytes
 23i,4n,17p,127b,110s stack positions out of 5000i,500n,10000p,200000b,50000s
<<C:/Miktex64/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on test.pdf (1 page, 13591 bytes).

PDF statistics: 10 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. 10000000)

答案1

与 pdflatex 不同,如果 lualatex 找不到 tfm,它就不会从 mf 源触发 tfm 生成(这不是 miktex 特有的:它也不会在 texlive 中执行此操作,但是主树中存在 bbold10.tfm,而 miktex 仅安装 mf 源)。

因此,在 miktex 中,必须首先调用 pdflatex 来触发 tfm 的创建,然后才能将它们与 lualatex 一起使用。

答案2

当我尝试用 编译较大的文档时,我遇到了同样的错误消息lualatex。我最初是为 编写此文档的pdflatex,因此我仍然\usepackage[T1]{fontenc}在序言中使用。

切换到fontspec,例如

\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Linux Libertine O}
\setsansfont[Mapping=tex-text]{Source Sans Pro}
\setmonofont[Mapping=tex-text]{DejaVu Sans Mono}

为我解决了这个问题。

相关内容