I have successfully setup a precompiled preamble as described in this Tex-Stackexchange post.
However, one problem remains: If I move fontspec to the preamble the ligatures stop to work.
Currently my tex file for the precompiled-preamble looks like this:
%lualatex.exe -interaction=nonstopmode -ini -jobname="preambleprecompiled" "&lualatex" mylatexformat.ltx "preambleprecompiled.tex"
\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[Ligatures=TeX]{Minion Pro}
\csname
endofdump\endcsname
and my main file like this:
%&preambleprecompiled
\endofdump
\begin{document}
Test Text \newline
-- \newline
--- \newline
` \newline
´ \newline
`' \newline
´' \newline
' \newline
\textemdash \newline
\textendash \newline
\end{document}
The dashes do not get converted in this setup - they just remain, like shown in this screenshot:
Once I move the fontspec part to the main file it works, however, that defeats the purpose.
Just to be complete - that is what it looks like then:
%&preambleprecompiled
\endofdump
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[Ligatures=TeX]{Minion Pro}
\begin{document}
Test Text \newline
-- \newline
--- \newline
` \newline
´ \newline
`' \newline
´' \newline
' \newline
\textemdash \newline
\textendash \newline
\end{document}
How could I fix this?


One question out of curiosity: Why do the fonts still work? It loads the proper font for the pdf, hence, my surprise about the ligatures.
– nhck Nov 03 '20 at 10:21