我正在尝试获取带有长 s 的连字符,以及ſ
带有 Cormorant Garamond 的连字符,但是没有出现...
我的代码:
\documentclass[12pt]{book}
\usepackage{fontspec}
\setmainfont[Extension={.ttf}, BoldFont={CormorantGaramond-Bold_0}, ItalicFont={CormorantGaramond-Italic_0}, Ligatures={TeX,Rare,Historic, Required, Contextual, Common}, Contextuals=Inner]{CormorantGaramond-Regular_1}
\begin{document}
Islam aspice astice lactosio asfissia stort ctore fb ffi fi fp sk sp ss Qu Qw
\end{document}
我的输出:
注意:在 .ttf 文件中,我注意到类型的连字符上的名称为 .ss02 ſ
,我尝试了 StylisticSet=2,但没有作用。
答案1
要获取字体,请访问:https://github.com/CatharsisFonts/Cormorant/releases(免费)
我不知道如何在 XeTeX 中做到这一点,但在 LuaTeX 中,您可以使用少量 Lua 代码来使这些连字符可用。我猜这也是您无法通过其他方式轻松访问它们的原因。所有插槽的.liga
名称都附加有 。
\documentclass{article}
\usepackage{fontspec}
\directlua{
fonts.handlers.otf.addfeature({
name = "liga",
type = "ligature",
data = {
['longs_b.liga'] = { "s", "b" },
['longs_h.liga'] = { "s", "h" },
['longs_i.liga'] = { "s", "i" },
['longs_j.liga'] = { "s", "j" },
['longs_k.liga'] = { "s", "k" },
['longs_l.liga'] = { "s", "l" },
['longs_longs.liga'] = { "s", "s" },
['longs_longs_b.liga'] = { "s", "s", "b" },
['longs_longs_h.liga'] = { "s", "s", "h" },
['longs_longs_i.liga'] = { "s", "s", "i" },
['longs_longs_j.liga'] = { "s", "s", "j" },
['longs_longs_k.liga'] = { "s", "s", "k" },
['longs_longs_l.liga'] = { "s", "s", "l" },
}
})
}
\setmainfont[Ligatures={Rare,Historic}]{Cormorant-Regular.otf}
\begin{document}
Islam aspice astice lactosio asfissia stort ctore fb ffi fi fp sk sp ss Qu Qw
\end{document}