我该如何修复这个 polyglossia/fontscpec 冲突?

我该如何修复这个 polyglossia/fontscpec 冲突?

这是我的 MWE,看来MedeivalSharp用任何 TTF 文件替换都可以。

\documentclass{article}
\usepackage[T1]{fontenc} 
\usepackage{fontspec}
\usepackage[osf,proportional]{Baskervaldx}
\usepackage{polyglossia}

\newfontfamily\msharp[
Path = {/home/kristian/.fonts/},
Extension = .ttf
]
{MedievalSharp}
\begin{document}

{\msharp{This is Medieval Sharp.}}

But this is not Baskerville.

\end{document}

答案1

根据以上评论,我似乎找到了解决方案:

\documentclass{article}
\usepackage{polyglossia}

\usepackage{fontspec}
\defaultfontfeatures{Ligatures={NoRequired}}

\setmainfont[
Ligatures = TeX,
Path = /home/kristian/.fonts/,
BoldFont = Baskervaldx-Bol.otf,
ItalicFont = Baskervaldx-Ita.otf,
BoldItalicFont  = Baskervaldx-BolIta.otf]
{Baskervaldx-Reg.otf}

\newfontfamily\msharp[
Path = {/home/kristian/.fonts/},
Extension = .ttf
]
{MedievalSharp}

\begin{document}
{\msharp{This is Medieval Sharp.}}

And this is \textsc{Baskerville}. 12345. \textit{test} -- \textbf{test}
\end{document}

我添加了\defaultfontfeatures{Ligatures={NoRequired}}以摆脱奇怪的(OE,AE)连字符。

相关内容