fontspec error (cannot resolve fontname of NewComputerModern)
Herbert Voss
Herbert.Voss at fu-berlin.de
Sat May 22 11:21:38 CEST 2021
Am 22.05.21 um 10:58 schrieb Robert Alessi:
> On Sat, May 22, 2021 at 10:40:14AM +0200, Herbert Voss wrote:
>> \documentclass{article}
>> \usepackage{fontspec}
>> \setmainfont{NewComputerModern10-Regular}
>> \setsansfont{NewCMSans10-Book}
>> \begin{document}
>> Hello. \textsf{Hello.}
>> \end{document}
>>
>> chooses Sans regular and book ....
> This time from the PostScript name! Nevertheless, with:
>
> \documentclass{article}
> \usepackage{fontspec}
> \setmainfont{NewComputerModern10-Regular}
> \setsansfont{NewCMSans10-Book}
> \begin{document}
> Hello. \textsf{Hello, \emph{hello}.}
> \end{document}
>
> One gets no italic or oblique sans serif. The only way is to specify
> everything as in fspdefault.sty...
use the file names:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{NewCM10}[
Extension = .otf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic ]
\setsansfont{NewCMSans10}[
Extension = .otf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Oblique,
BoldItalicFont = *-BoldOblique ]
\begin{document}
Hello. \textsf{Hello, \emph{hello}.}
\end{document}
Herbert
More information about the tex-live
mailing list.