1

I'm using a font with "calt" (contextual alternates) on LuaLaTeX - as a matter of fact, BemboBookMT. So, for example, Q has a "tail" when followed by a u:

Q vs Quote

When I use lettrine, I get a standard Q even if Q is followed by a u: possibly because LaTeX doesn't "see" the chain due to lettrine implementation.

A possibility I see is to manually select the alternative glyph; with

\lettrine{\symbol{"E001}}{}uestion

I obtain a long-tail Q even in Lettrine Though, this is a bit tricky, and I wonder if there's a better way to deal with the issue. For example adjusting the font features through Lua. Perhaps there's a way to code the chain substitution, provided that you know how lettrine exactly works...

I thought also of setting the long tail Q as default (with a type = "substitution" feature), and then set a "chainsubstitution" feature only for the cases where I want the standard tail. But I didn't manage to make it work.

EDIT: Here an example of how the desired output could work:

enter image description here

3
  • 1
    Welcome to TeX.SE!
    – Mensch
    Oct 15, 2021 at 14:51
  • I don't quite understand how you want the output to look. If your dropped capital gets a tail, where do you want the tail to go? Under the second line? Oct 15, 2021 at 14:57
  • Thanks @MarcelKrüger. I added an image of the possible output. Oct 15, 2021 at 15:11

2 Answers 2

7

As Daniel Flipo, author of lettrine, says, contextual alternates won’t work here. But I’ve never liked the way Monotype’s Bembo handles Q, so I turn calt off and do it myself. If your text almost always has room for the longest tail, you can make that the default but still choose the short or medium tail if needed, like this:

\documentclass[12pt]{article}
\usepackage{fontspec,lettrine}
\directlua{
  fonts.handlers.otf.addfeature{
    name = "bigq",
    type = "alternate",
    data = {
      Q = "Q.001",
    },
  }
  fonts.handlers.otf.addfeature{
    name = "medq",
    type = "alternate",
    data = {
      Q = "Q.002",
    },
  }
}
\setmainfont{Bembo Book MT Pro}[
  Contextuals=NoAlternate,
  RawFeature=+bigq]
\linespread{1.10345}% approx. 12/16, making room for the tails
\begin{document}
\lettrine{Q}{uaesitum} est de Deo, Angelo et homine. De Deo quaesitum
est et quantum ad divinam naturam et quantum ad naturam humanam
assumptam. Quantum ad divinam naturam quaesitum est: utrum beatus
Benedictus in visione qua vidit totum mundum, divinam essentiam
viderit.

{\addfontfeature{RawFeature={-bigq,+medq}}Qi Gong}

{\addfontfeature{RawFeature=-bigq}(NASDAQ.)}
\end{document}

output

5

You can't expect contextual alternates to work on the "Q" with lettrine, as the command \lettrine puts its first argument into a box.

But you could force the long tailed Q in that box, here is an example with the kpfonts-otf:

\documentclass[12pt,a4paper,french]{article}
\usepackage[margin=4cm]{geometry}
\usepackage{lettrine}
\usepackage{babel}
\usepackage{kpfonts-otf}
\begin{document}
 \lettrine{\addfontfeatures{Style=Swash}Q}{uelques kilomètres} 
 au nord d'Aigues-Mortes, se trouve  la Tour Carbonnière.
 Construite au XIII\ieme~siècle, elle contrôlait l'unique
 accès terrestre à la ville fortifiée, celle qui menait à 
 Psalmody, l'une des  abbayes de sel dont il ne reste que 
 quelques vestiges.
\end{document}

And the resulting output :

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .