latex3 / luaotfload

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

Harf renderer fails for otf variable font #250

Closed drs-p closed 1 year ago

drs-p commented 1 year ago

This code

\documentclass{article}
\font\testfont = [SourceSerif4Variable-Roman.otf]:mode=harf
\begin{document}
\testfont Hello, world!
\end{document}

fails with the error ".../tex/luatex/luaotfload/luaotfload-harf-var-t2-writer.lua:45: attempt to perform arithmetic on a string value (local 'first')." And indeed, the parameter first seems to often contain binary data (usually one or two bytes long) instead of a number. The .ttf version of the font is handled correctly. This is on Ubuntu 22.04 with an up-to-date TeXLive 2023 and the latest version of the font from https://github.com/adobe-fonts/source-serif/blob/release/VAR/SourceSerif4Variable-Roman.otf.

zauguin commented 1 year ago

Fixed in 9ab44953.