mktextfm ecss0400 失败

mktextfm ecss0400 失败

我在 Linux Mint 17.2 机器上更新了 texlive 2017 安装,从那时起我就无法编译这个最小(不)工作的示例。完全重新安装(完整版本)texlive 并没有改变错误。


\documentclass{beamer}    
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}    
\begin{document}    
\frame{
    Hello World!
}    
\end{document}

pdf 已创建,看起来不错,但使用 METAFONT 和 ecss0400 失败。将 documentclass 更改为 scrartcl 不会产生任何错误。

如果我使用 pdflatex 编译这个 MWE,它会调用 ecss0400 的某些东西,然后失败。


Prozess gestartet: pdflatex -synctex=1 -interaction=nonstopmode -shell-escape "beispiel".tex    
kpathsea: Running mktextfm ecss0400    
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecss0400

! Font T1/cmss/m/n/4=ecss0400 at 4.0pt not loadable: Metric (TFM) file not foun
d.
<to be read again> 
                   relax 
l.12 }

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

创建了两个附加日志文件。首先,missfont.log 文件包含几行“mktextfm ecss0400”。

另一个文件名为“ecss0400.log”,很长,因此我只会发布其中几个部分。它以

This is METAFONT, Version 2.7182818 (TeX Live 2017) (preloaded base=mf 2017.7.28)  28 JUL 2017 11:23
**\mode:=ljfour; mag:=1; nonstopmode; input ecss0400
(/home/ME/.texlive2017/texmf-var/fonts/source/jknappen/ec/ecss0400.mf
(/localhdd/ME/texlive/2017/texmf-dist/fonts/source/jknappen/ec/exbase.mf)
(/localhdd/ME/texlive/2017/texmf-dist/fonts/source/jknappen/ec/ecss.mf
(/localhdd/ME/texlive/2017/texmf-dist/fonts/source/jknappen/ec/exroman.mf
 Ok
(/localhdd/ME/texlive/2017/texmf-dist/fonts/source/jknappen/ec/exaccess.mf
 Ok)
(/localhdd/ME/texlive/2017/texmf-dist/fonts/source/jknappen/ec/expseudo.mf
 Ok)
(/localhdd/ME/texlive/2017/texmf-dist/fonts/source/jknappen/ec/exruwest.mf
 Ok [192] [193] [194] [195] [196] [197] [198] [199] [200] [201] [202] [203]
[204] [205] [206] [207] [208] [209] [210] [211] [212] [213] [214] [215]
[216] [217] [218] [219] [220] [221] [222] [223])
(/localhdd/ME/texlive/2017/texmf-dist/fonts/source/jknappen/ec/exrlwest.mf
 Ok [224] [225] [226] [227] [228] [229] [230] [231] [232] [233] [234] [235]
[236] [237] [238] [239] [240] [241] [242] [243] [244] [245] [246] [247]
[248] [249] [250] [251] [252]
> 0 NNE 1 NNW WNW 2 (WSW) SSW 3 (SSE ESE) ENE NNE ENE ESE SSE SSW 4 5 WSW 0 (WN
W NNW)
! Strange path (turning number is zero).
<to be read again> 
                   ;
<for(%CAPSULE10676)> ...oke.z3e---z5e...{left}z6e;
                                                  pickup.fine.nib;pos6'(bot_...
l.1012 repeat_once
                  ;
The path doesn't have a counterclockwise orientation,
so I'll probably have trouble drawing it.
(See Chapter 27 of The METAFONTbook for more help.)

有几个错误,例如

[184]
! Square root of -1.16454 has been replaced by 0.
diag_ratio->...((EXPR2)*((EXPR5)++(EXPR4)*sqrt.a_)
                                                  -b_*(EXPR5))/a_/(EXPR4)end...
<for(1)> ...stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3))
                                                  ;penpos1(alpha*(z_stem-tin...
l.1025 repeat_once
                  ;
Since I don't take square roots of negative numbers,
I'm zeroing this one. Proceed, with fingers crossed.

但最后却

Font metrics written on ecss0400.tfm.
Output written on ecss0400.600gf (256 characters, 20732 bytes).

我目前认为 texlive 提供的字体文件存在错误。我能做什么呢?

如果我使用 lualatex 进行编译,一切都会正常。

答案1

beamer更准确地说,该类别beamerbasefont.sty有自己的\DeclareFontShape计算机现代/欧洲现代字体。

这些声明是有争议的,因为标准不敢选择设计尺寸低于 5pt 的字体(低于此阈值的字体会被缩放)。与fix-cm.sty此相比

\DeclareFontShape{T1}{cmss}{m}{n}{
        <-9>    ecss0800
        <9-10>  ecss0900
        <10-12> ecss1000
        <12-17> ecss1200
        <17->   ecss1728
      }{}

beamerbasefont.sty

\def\EC@family#1#2#3#4#5{%
  \DeclareFontShape{#1}{#2}{#3}{#4}%
  {<3><4><5><6><7><8><9><10><10.95><12><14.4>%
   <17.28><20.74><24.88><29.86><35.83><42.99><51.59>genb*#5}{}}

\EC@family{T1}{cmss}{m}{n}{ecss}

罪魁祸首是:当\Tiny处理 时,它选择 4pt 为基本字体大小,而 TeX 需要生成ecss0400,这不是一个经过测试的设计大小,因此它的创建确实失败了。

包裹beamerfontsize.sty应该被修复不是使用如此小的设计尺寸并改用fix-cm.sty

解决方法:\usepackage{lmodern}

答案2

第一个问题是,这个看似无害的文件到底为什么会调用 4pt 设计大小的字体 ecss0400?

不幸的是,如此小的尺寸使得 ec 字体的 METAFONT 源无法正常工作,因此可能会出现错误。这是字体的一个特性,而不是错误。

相关内容