Невозможно выбрать пользовательский шрифт пишущей машинки с помощью пакета fontspec

Невозможно выбрать пользовательский шрифт пишущей машинки с помощью пакета fontspec

Я скачал шрифт FantasqueSansMono-Normal.zip с сайтаздесь. Я извлек TTF-файл со шрифтами:

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

1 directory, 4 files

Я хочу выбрать этот шрифт в качестве шрифта пишущей машинки для моего документа. Как я понял из fontspecпакета texdoc, мне нужно сделать что-то вроде этого:

% !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}

Но эта настройка не будет работать. Она производит:

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!

В fontspecдокументации что-то написано о настоящих шрифтах или что-то в этом роде. Я не могу понять, что-то не так с файлами TTF или самим шрифтом Fantasque или тем, как я его установил в LaTeX.

Not So Short Introduction To LaTeX делает то же, что и я, просто указывает пути к файлам шрифтов. Что не так?

Есть ли какие-нибудь советы по выбору этого шрифта в качестве tt или общие советы по выбору шрифта?

решение1

Используйте FantasqueSansMono-Regular.ttfnot TTF/FantasqueSansMono-Regular.ttfи укажите TTF/с помощью Pathключа.

Связанный контент