Benutzerdefinierte Schreibmaschinenschriftart kann mit dem Fontspec-Paket nicht ausgewählt werden

Benutzerdefinierte Schreibmaschinenschriftart kann mit dem Fontspec-Paket nicht ausgewählt werden

Ich habe die Schriftart FantasqueSansMono-Normal.zip heruntergeladen vonHier. Ich habe den TTF-Font mit den Schriftarten extrahiert:

➜  naulatex git:(logical-markup) ✗ tree TTF
TTF
├── FantasqueSansMono-Bold.ttf
├── FantasqueSansMono-BoldItalic.ttf
├── FantasqueSansMono-Italic.ttf
└── FantasqueSansMono-Regular.ttf

1 directory, 4 files

Ich möchte diese Schriftart als Schreibmaschinenschriftart für mein Dokument auswählen. So wie ich fontspecdas Paket texdoc verstanden habe, müsste ich ungefähr so ​​vorgehen:

% !TeX program = lualatex
\documentclass[11pt]{report}

\usepackage{polyglossia}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
\setmonofont{TTF/FantasqueSansMono-Regular.ttf}[
    BoldFont = TTF/FantasqueSansMono-Bold.ttf,
    ItalicFont = TTF/FantasqueSansMono-Italic.ttf,
    BoldItalicFont = TTF/FantasqueSansMono-BoldItalic.ttf ]

\setmainlanguage{ukrainian}
\setotherlanguages{english, russian}


\begin{document}

    Привіт, Світ! Hello, World!

    \texttt{Some tt text}
    
\end{document}

Aber dieses Setup funktioniert nicht. Es erzeugt:

fantasque.tex|| LaTeX Font Warning: Font shape `TU/TTF/FantasqueSansMono-Regular.ttf(0)/m' undefined using `TU/lmr/m/n' instead on input line 21.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing number, treated as zero.
fantasque.tex|21 error| Illegal unit of measure (pt inserted).
fantasque.tex|21 error| Missing = inserted for ifdim.
fantasque.tex|21 error| ==> Fatal error occurred, no output PDF file produced!

In den fontspecDokumenten steht etwas über echte Schriftarten oder so etwas in der Art. Ich komme nicht dahinter, ob mit den TTF-Dateien oder der Fantasque-Schriftart selbst oder der Art, wie ich sie in LaTeX einstelle, etwas nicht stimmt.

Die nicht ganz so kurze Einführung in LaTeX macht dasselbe wie ich, sie gibt nur die Dateipfade zu Schriftarten an. Was ist falsch?

Gibt es Ratschläge zur Auswahl dieser Schriftart als TT oder allgemeine Ratschläge zur Schriftartauswahl?

Antwort1

FantasqueSansMono-Regular.ttfNicht verwenden TTF/FantasqueSansMono-Regular.ttfund TTF/über die PathTaste angeben.

verwandte Informationen