# Fontspec can't find fonts included in tex live 2018 [closed]

This MWE works in tex live versions prior to the 2018 version:

\documentclass{article}

\usepackage{fontspec, lipsum}
\setmainfont{Libertinus Serif}

\begin{document}
\lipsum
\end{document}


In tex live 2018, compiling this results in the error

! fontspec error: "font-not-found"
!
! The font "Libertinus Serif" cannot be found.


I've checked, and the Libertinus Serif font is included in the folder texlive/texmf-dist/fonts/opentype/public/libertinus, just as it was in tex live 2017. Since this no longer compiles, I assume fontspec or xelatex has made some recent changes with respect to how it loads fonts?

EDIT:

I've installed tex live 2018 as a portable version in Windows 7 (just as I have done with every single tex live version since 2012).

If I hard code the path and the names of the individual fonts included in the tex live fonts folder, everything works fine:

\documentclass{article}

\usepackage{fontspec, lipsum}
\setmainfont{libertinusserif-}[%
Path = C:/texlive/texmf-dist/fonts/opentype/public/libertinus/,
Extension = .otf,
UprightFont = *regular,
BoldFont = *semibold,
ItalicFont = *italic,
BoldItalicFont = *semibolditalic]

\begin{document}
\lipsum
\end{document}


## closed as unclear what you're asking by Keks Dose, Troy, TeXnician, Phelype Oleinik, Stefan PinnowJun 15 '18 at 13:19

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• works ok for me. But I have windows 10 and not a portable version. What happens if you run fc-cache -fv? Does it search the texmf-tree? And does it write a cache in texmf-var\fonts\cache? – Ulrike Fischer Jun 11 '18 at 13:56
• @UlrikeFischer 'fc-cache' is not recognized as an internal or external command, operable program or batch file. – Sverre Jun 11 '18 at 14:00
• Did you use the texlive command line? Is fc-cache in the bin folder? – Ulrike Fischer Jun 11 '18 at 14:03
• Ok - I renamed texlive2018 back to texlive, and now everything works. Interesting that this wasn't an issue with tex live 2017, which I also renamed texlive2017 after installing it. – Sverre Jun 11 '18 at 14:10
• > »Hm! Does this mean that it's a problem that I have renamed the texlive folder to texlive2018?« // Really, you should have mentioned that in your question. And what I don't understand: If you renamed it, why is the path in your examples C:\texlive\..., instead of C:\texlive2018\...? – Keks Dose Jun 12 '18 at 12:46