FS#66139 - [texlive-core] lualatex searches for OTF files in current directory only

Attached to Project: Arch Linux
Opened by Gaetan Bisson (vesath) - Monday, 06 April 2020, 07:56 GMT
Last edited by Gaetan Bisson (vesath) - Monday, 08 June 2020, 09:01 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Rémy Oudompheng (remyoudompheng)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Thanks Remy for releasing the new texlive during such troubled times. I hope this report finds you well. Did I already tell you how I typeset most of my documents in Adobe Garamond Premier Pro? I've set this up using luatex with:

\RequirePackage[adobe-garamond]{mathdesign}
\RequirePackage[quiet]{fontspec}
\setmainfont[
Extension = .otf,
Path = /usr/share/texmf/fonts/opentype/adobe/garamond/,
ItalicFont = AGaramondPro-Italic,
BoldFont = AGaramondPro-Semibold,
BoldItalicFont = AGaramondPro-SemiboldItalic
]{AGaramondPro-Regular}

with the files named AGaramondPro*.otf placed under the named directory. It worked splendidly until the upgrade to 2020.54593-1 and now yields:

[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
(/usr/share/texmf-dist/tex/latex/mathdesign/mdpgd/ot1mdpgd.fd)
(/usr/share/texmf-dist/tex/latex/mathdesign/mdpgd/omlmdpgd.fd)
(/usr/share/texmf-dist/tex/latex/mathdesign/mdpgd/omsmdpgd.fd)
(/usr/share/texmf-dist/tex/latex/mathdesign/mdpgd/omxmdpgd.fd)
(/usr/share/texmf-dist/tex/latex/mathdesign/mdpgd/mdamdpgd.fd)
(/usr/share/texmf-dist/tex/latex/mathdesign/mdpgd/mdbmdpgd.fd) [1{/var/lib/texm
f/fonts/map/pdftex/updmap/pdftex.map}] (./document.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

)
13878 words of node memory still in use:
7 hlist, 2 vlist, 2 rule, 15 glue, 4 kern, 1 penalty, 1744 glyph, 473 attrib
ute, 58 glue_spec, 69 attribute_list, 1 write nodes
avail lists: 1:1,2:1988,3:134,4:21,5:847,6:24,7:2577,8:48,9:191,10:4,11:117
</usr/share/texmf/fonts/opentype/adobe/garamond/AGaramondPro-Regular.otf>{/usr/
share/texmf-dist/fonts/enc/dvips/mathdesign/a_rxz3ga.enc}
! error: (file AGaramondPro-Regular.otf) (otf font): cannot open font file for
reading 'AGaramondPro-Regular.otf'
! ==> Fatal error occurred, no output PDF file produced!make: *** [Makefile:15: document.pdf] Error 1

Note that mathdesign is provided by texlive-fontsextra but downgrading it does not remove the above error. So I suspect it is somewhere in luatex. However I'm really at a loss as to how to diagnose this. Please let me know how you wish to proceed.

Cheers from Tahiti!
This task depends upon

Closed by  Gaetan Bisson (vesath)
Monday, 08 June 2020, 09:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  texlive-core-2020.55416-1 in [testing]
Comment by Gaetan Bisson (vesath) - Monday, 06 April 2020, 07:58 GMT
I should add that putting symlinks in the present directory pointing to the actual OTF files (that is, running: `ln -s /usr/share/texmf/fonts/opentype/adobe/garamond/AGaramondPro-* .`) fixes this issue.
Comment by Jonas Witschel (diabonas) - Tuesday, 07 April 2020, 13:17 GMT
I cannot reproduce this with the minimal example document

\documentclass{article}
\usepackage[adobe-garamond]{mathdesign}
\usepackage[quiet]{fontspec}
\setmainfont[
Extension = .otf,
Path = /usr/share/texmf/fonts/opentype/adobe/garamond/,
ItalicFont = AGaramondPro-Italic,
BoldFont = AGaramondPro-Semibold,
BoldItalicFont = AGaramondPro-SemiboldItalic
]{AGaramondPro-Regular}
\begin{document}
normal \textbf{bold} \textit{italic} \textbf{\textit{bold italic}}.
\end{document}

compiled using "lualatex mwe.tex", so I suspect there is an interaction with other packages or macros in your full document.
Comment by Gaetan Bisson (vesath) - Wednesday, 08 April 2020, 07:14 GMT
Correct! But we just need to add some latin letters in math mode to trigger the bug:

\documentclass{article}
\usepackage[adobe-garamond]{mathdesign}
\usepackage[quiet]{fontspec}
\setmainfont[
Extension = .otf,
Path = /usr/share/texmf/fonts/opentype/adobe/garamond/,
ItalicFont = AGaramondPro-Italic,
BoldFont = AGaramondPro-Semibold,
BoldItalicFont = AGaramondPro-SemiboldItalic
]{AGaramondPro-Regular}
\begin{document}
$abcd$
\end{document}

Cheers.
Comment by Jonas Witschel (diabonas) - Wednesday, 08 April 2020, 20:29 GMT
Interesting, this seems to affect all TTF/OTF fonts loaded from a map file, so I can reproduce it e.g. with the Cuprum font from texlive-fontsextra:

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\fontfamily{cpr}\selectfont test
\end{document}

The immediate reason why this happens after the update is that texlive-bin 2020.54586-1 switched from "luatex" to "luahbtex", see https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/texlive-bin&id=8035b90fe6978379ca46cb0cbca50502cee3893f#n128 After switching the symlink back to "luatex" (and rebuilding the lualatex format file), the example compiles as expected.

I suggest reporting this issue to the LuaTeX mailing list (https://tug.org/mailman/listinfo/luatex) including the above example.
Comment by Jonas Witschel (diabonas) - Wednesday, 08 April 2020, 20:41 GMT
Actually the culprit might not be Lua(HB)TeX itself, but luaotfload (which comes preloaded in LuaLaTeX): the following example compiles without issues using both "luatex" and "luahbtex", so the bare font loading procedure seems to work fine.

%\input luaotfload.sty
\font\cuprum=cprmn8t
\cuprum
a
\bye

After uncommenting the "\input luaotfload.sty" line, the example still compiles with "luatex", but fails to compile with "luahbtex" with the following output:

This is LuaHBTeX, Version 1.12.0 (TeX Live 2020/Arch Linux)
restricted system commands enabled.
(./mwe-plain.tex (/usr/share/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
(/usr/share/texmf-dist/tex/latex/base/ltluatex.tex)) [1{/var/lib/texmf/fonts/ma
p/pdftex/updmap/pdftex.map}]){/usr/share/texmf-dist/fonts/enc/ttf2pk/base/T1-WG
L4.enc}
! error: (file Cuprum-Regular.ttf) (ttf font): cannot open font file for readi
ng 'Cuprum-Regular.ttf'

In that case, the luaotfload bug tracker (https://github.com/latex3/luaotfload/issues) would be the better place to report the issue.
Comment by Jonas Witschel (diabonas) - Wednesday, 08 April 2020, 21:58 GMT Comment by Jonas Witschel (diabonas) - Thursday, 09 April 2020, 16:08 GMT
My proposed fix in https://github.com/latex3/luaotfload/pull/143 has been merged to the development branch, so this should get fixed with the next luaotfload (and subsequent texlive-core Arch Linux package) release.
Comment by Gaetan Bisson (vesath) - Friday, 10 April 2020, 07:44 GMT
Thanks a lot Jonas!
Comment by Jonas Witschel (diabonas) - Wednesday, 13 May 2020, 10:19 GMT
Update: the fix has landed in luaotfload 3.13, so updating texlive-core to a version >= 2020.54971 (https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/doc/luatex/luaotfload/NEWS?view=markup&pathrev=54971) is going to pull it in.
Comment by Rémy Oudompheng (remyoudompheng) - Wednesday, 13 May 2020, 11:22 GMT
Thanks for the heads up. It wasn't there last time I looked.
Comment by Rémy Oudompheng (remyoudompheng) - Monday, 08 June 2020, 06:51 GMT
New packages uploaded. Tell me if they are fine, i believe they are the last iteration for [testing] before going to [extra]
Comment by Gaetan Bisson (vesath) - Monday, 08 June 2020, 09:00 GMT
It works great! Thank you.

Loading...