luaotfload 找不到字体“CMU Sans Serif Demi Condensed”

luaotfload 找不到字体“CMU Sans Serif Demi Condensed”

Luaotfload 无法找到安装在我的 texmf 树中的字体。来源:

\input luaotfload.sty
\font\myfont={CMU Sans Serif Demi Condensed} at 10pt
\myfont
foo
\bye

字体已安装texmf-dist/fonts/opentype/public/cm-unicode/cmunssdc.otf,kpsewhich 找到了它。我现在该怎么办?

编辑:姊妹字体{CMU Sans Serif Bold Extended Oblique}工作正常。同一目录...

答案1

首先查看 otfl-names.lua 中是否存在字体,以及您是否使用了正确的名称。

如果字体不存在,则文件夹不会被缓存。原因和解决方法取决于您的系统。mkluatexfontdb --help说:

Fonts are searched in directories on Windows or Linux that have been
searched with fontconfig.

On Mac OS X, only fonts located in the following standard font locations are
included in the font database:
    ~/Library/Fonts          /Library/Fonts
    /System/Library/Fonts    /Network/Library/Fonts
In particular, fonts installed in other locations with "Font Book" will not
be available.

答案2

我根本无法解释这种奇怪的行为luaotfload,但对我来说(TeX Live 2010,Windows),当使用与 完全相同的字体名称时,字体就会加载fc-list,即CMU Sans Serif Demi Condensed:style=DemiCondensed

\input luaotfload.sty
\font\myfont={CMU Sans Serif Demi Condensed:style=DemiCondensed} at 10pt
\myfont
foo
\bye

对我来说很好用。

相关内容