4

I am trying to get the ligatures with long s, the ſ with Cormorant Garamond but this does not appear...

My code:

\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}

My output:

enter image description here

A note: At the .ttf file I noticed the name .ss02 on the ligates of the type ſ, I tried StylisticSet=2, but did not work too.

  • medi, clig, and rlig features aren’t found in Cormorant Garamond, so selecting Ligatures={Required,Contextual} and Contextuals=Inner does nothing. No feature controlling ‘ſ’ automatically has been defined, so you’ll have to type it directly (in luatex, you could define a feature on the fly, but it would be complicated to do correctly). – Thérèse Jun 9 '18 at 2:56
  • @Thérèse Yes... Thhi is terrible, unfortunately... – Gergian Jun 14 '18 at 0:24
  • It would be terrible in long texts, but the Cormorant fonts were designed for display, and the manual interventions required aren’t very burdensome in short, display texts. – Thérèse Jun 14 '18 at 0:35
5

To obtain the font go here: https://github.com/CatharsisFonts/Cormorant/releases (it's free)

I don't know how to do it in XeTeX, but in LuaTeX you can make those ligatures available with a little bit of Lua code. I guess that is also the reason why you cannot easily access them otherwise. All the slots have a .liga attached to their name.

\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}

enter image description here

  • Sorry for the delay, but thanks for your answer, maybe I consider change to LuaLateX :) – Gergian Jun 14 '18 at 0:23
  • 1
    @Gergian If you don't need bidirectional typesetting or complex scripts (like Devanagari or Arabic), there is no reason not to switch to LuaTeX, especially because math typesetting is much more robust in LuaTeX. – Henri Menke Jun 14 '18 at 0:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.