fontspec error (cannot resolve fontname of NewComputerModern)

Robert Alessi alessi at robertalessi.net
Sat May 22 10:20:33 CEST 2021


On Sat, May 22, 2021 at 09:38:18AM +0200, Herbert Voss wrote:
> Am 22.05.21 um 08:20 schrieb Robert Alessi:
> > With lualatex (or xelatex), I can't compile this file anymore:
> > 
> > --------------------snip--------------------
> > \documentclass{article}
> > \usepackage{fontspec}
> > \setmainfont{NewComputerModern}
> 
> \setmainfont{NewComputerModern10-Regular}
> 
> 
> 
> From my point of view the font has not the internal correct names:
> 
> bash-3.2$ otfinfo -i NewCM10-Regular.otf
> Family:              NewComputerModern10
> Subfamily:           Regular
> Full name:           NewComputerModern10-Regular
> PostScript name:     NewCM10-Regular
> Preferred family:    NewComputerModern
> Preferred subfamily: 10 Regular
> Mac font menu name:  NewComputerModern 10 Regular
> Version:             Version 3.9
> [...]
> 
> 
> Herbert

Thank you, agreed.  This makes automatic selection of font shapes
unavailable.  Besides, despite of:

robert at localost:~$ otfinfo -i NewCMSans10-Book.otf
Family:              NewComputerModern 10
Subfamily:           Book
Full name:           NewComputerModernSanss10-Book
PostScript name:     NewCMSans10-Book
Preferred family:    NewComputerModern Sans
Preferred subfamily: 10 Book
Mac font menu name:  NewComputerModern 10 Book
Version:             Version 3.9
Unique ID:           1.003;NewComputerModernSans10-Book

\setsansfont{NewComputerModernSanss10-Book}

does not work.

Robert

> 
> 
> 
> 
> > \begin{document}
> > Hello.
> > \end{document}
> > --------------------snip--------------------
> > 
> > I get this:
> > ! Package fontspec Error: The font "NewComputerModern" cannot be
> > found.
> > 
> > However, luaotfload-tool --find "NewComputerModern" returns:
> > 
> > luaotfload | resolve : Font "NewComputerModern" found!
> > luaotfload | resolve : Resolved file name "/usr/local/texlive/2021/texmf-dist/fonts/opentype/public/newcomputermodern/NewCM10-Book.otf"
> > 
> > Does anybody have an idea on what is going on?
> > 
> > Thank you,
> > 
> > Robert


More information about the tex-live mailing list.