latex3 / luaotfload

OpenType font loader for LuaTeX
Other
56 stars 6 forks source link

error attempt to index a number value (local 'chainstep') #193

Open ulilaube opened 3 years ago

ulilaube commented 3 years ago

Hi!

I switched to TeXLive 2021 recently and recompiled last years version of a document with lualatex. Now I have the following errors at the beginning of the document

(./labguide.bbl) (./frontmatter.tex [1{/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2] (./labguide.toc [3]) [4]
Overfull \hbox (0.10481pt too wide) in paragraph at lines 32--33
[]\TU/PragmataProMonoLiga(0)/m/n/10 RB8&$S \TU/MinionPro(0)/m/n/10 cap-ti-al let-ter R ca-pi-tal let-ter B eight am-per-sand dol-lar si-gn ca-pi-tal let-ter |

warning  (node filter): error: ...xmf-dist/tex/luatex/luaotfload/fontloader-2021-05-20.lua:23437: attempt to index a number value (local 'chainstep')

.
<argument> ...type:D \tex_kern:D \c_zero_dim \fi: \tex_par:D 
                                                  \hook_use:n {para/after}\@...

l.41 

warning  (node filter): error: ...xmf-dist/tex/luatex/luaotfload/fontloader-2021-05-20.lua:23437: attempt to index a number value (local 'chainstep')

.
<argument> ...type:D \tex_kern:D \c_zero_dim \fi: \tex_par:D 
                                               (./labguide.bbl) (./frontmatter.tex [1{/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2] (./labguide.toc [3]) [4]

with

$ lualatex --version                                                                                                                                                                                                      
This is LuaHBTeX, Version 1.13.2 (TeX Live 2021)

and

$ luaotfload-tool --version
luaotfload-tool:
        Luaotfload font management and diagnostic utility.
        License: GNU GPL v2.0.
        Report problems to <https://github.com/latex3/luaotfload/issues>

luaotfload-tool version: "3.18"
Revision: nil
Lua interpreter: stock; version "Lua 5.3"
Luatex version: 1.13
Platform: type=unix name=linux
    +  machine: x86_64
    + nodename: thinkpad
    +  release: 5.12.13-1-default
    +  sysname: Linux
    +  version: #1 SMP Mon Jun 28 06:37:23 UTC 2021 (74bd8c0)
Index: version=-2 created="2021-07-06 11:07:30" modified="2021-07-06 11:07:30"

If I go back to

sudo tlmgr restore luaotfload 57443  

and run it with

$ luaotfload-tool --version
luaotfload-tool:
        Luaotfload font management and diagnostic utility.
        License: GNU GPL v2.0.
        Report problems to <https://github.com/latex3/luaotfload/issues>

luaotfload-tool version: "3.17"
Revision: nil
Lua interpreter: stock; version "Lua 5.3"
Luatex version: 1.13
Platform: type=unix name=linux
    +  machine: x86_64
    + nodename: thinkpad
    +  release: 5.12.13-1-default
    +  sysname: Linux
    +  version: #1 SMP Mon Jun 28 06:37:23 UTC 2021 (74bd8c0)
Index: version=-2 created="2021-07-06 11:07:30" modified="2021-07-06 11:07:30"

the errors go away. If I go back 57443 -> 59293 via

$ tlmgr update --all

The error comes back again. Throwing away the font name database and caches under

/home/xxx/.texlive2021/texmf-var/luatex-cache/generic/names/luaotfload-names.lua.gz /home/xxx/.texlive2021/texmf-var/luatex-cache/generic/names/luaotfload-names.luc /home/xxx/.texlive2021/texmf-var/luatex-cache/generic/fonts/

and regenerating them makes no difference.

Cheers Uli

zauguin commented 3 years ago

Please provide a minimal LaTeX source file producing the error, otherwise we can't reproduce it.

If possible, it would also be particularly helpful if you can reproduce the issue without Minion Pro.

ulilaube commented 3 years ago

It boils down to

\documentclass{minimal}
\usepackage{fontspec}
\setmonofont{Pragmata Pro Mono Liga}
\begin{document}
\texttt{!=}

\texttt{==}
\end{document}

Each \texttt{} is producing one of the errors.

The font Pragmata Pro contains extra glyphs for programming symbols. In this case a monospaced == could be replaced with a single glyph that looks like == but with less spacing.

!= can be replaced by tighter version of != and monospaced things like => can be replaced with proper arrow looking glyph.

ulilaube commented 2 years ago

Today I updated via via tlmgr to revision 62239 of the luaotfload package.

$ luaotfload-tool --version

luaotfload-tool:
        Luaotfload font management and diagnostic utility.
        License: GNU GPL v2.0.
        Report problems to <https://github.com/latex3/luaotfload/issues>

luaotfload-tool version: "3.20"
Revision: nil
Lua interpreter: stock; version "Lua 5.3"
Luatex version: 1.13
Platform: type=unix name=linux
    +  machine: x86_64
    + nodename: thinkpad
    +  release: 5.16.11-1-default
    +  sysname: Linux
    +  version: #1 SMP PREEMPT Thu Feb 24 05:07:05 UTC 2022 (90630c5)
Index: version=6 created="2022-02-28 08:12:44" modified="2022-02-28 08:12:44"

The problem remains as described above.

zauguin commented 2 years ago

As a workaround you could try adding [Renderer=HarfBuzz] after \setmonofont to use the HarfBuzz based renderer instead. But since I don't have the font I don't know what causes the underlying issue.

ulilaube commented 2 years ago

I have finally found the time to test the workaround. Adding [Renderer=HarfBuzz] helps for the MWE and the original document from the original post. Is there more information on the different renderer / shaper combinations besides what is available in texdoc fontspec?