Can one change the font used by csquotes?

I have a XeLaTeX document that uses Palatino Linotype as main font, which looks quite nice, and I'm using the csquotes package to effect proper quotation, which works; however, at the same time this looks horrible due to Palatino's "distinctive" choice in glyphs.

Is there a way to make csquotes use a different font for its quotation replacement? I went through the manual but couldn't find anything obvious (if it requires overriding environments or writing plain TeX, that's a thing I've not done in over a decade and I no longer have any idea what would be involved)

Reduced example:

\documentclass[11pt, lettersize, oneside]{book}
\usepackage{tocloft}
\usepackage{relsize}
\usepackage{fancyhdr}

\usepackage{csquotes}
\MakeOuterQuote{"}

\pagestyle{plain}
\usepackage{xltxtra}
\setmainfont{Palatino Linotype}
\usepackage[b5paper, bindingoffset=0mm, inner=23mm, outer=23mm, top=21mm, bottom=24mm]{geometry}
\usepackage[xetex, pdfborder=0 0 0]{hyperref}

\begin{document}

The first words were: "these glyphs are not particularly good looking.",
and one had to agree. They looked all angular and terrible.

\end{document}


And corresponding screenshot:

Personal notions of aesthetics aside, for the purposes of this particular document Palatino's quotation are quite poor, and I am looking for a way to use a different font specifically only for these quotation glyphs.

• certainly, I've added a reduced example to the question. The problem is that it doesn't do anything odd with the fonts, so it just uses the font set up as main font. Which has terribly looking quotation glyphs, and I want it to use a different font specifically for the quotes csquotes introduces. – Mike 'Pomax' Kamermans Mar 22 '17 at 20:48
• I (and probably many others) don't have Palatino Linotype: can you add a scrrenshoot? (Using texgyrepagella-regular.otf, the TeX Gyre Palatino clone, looks OK.) – Joseph Wright Mar 22 '17 at 20:52
• Ah, perhaps you mean you don't like the glyph shape for quote marks in Palatino ... I have a feeling that's come up before. – Joseph Wright Mar 22 '17 at 20:58
• @Mike'Pomax'Kamermans - Please re-read the posting to which I provided a link. In both your current posting and in the earlier posting, the main issue is that the OPs don't like the opening quote marks (and possibly the closing quote marks too). My personal view is that if you choose Palatino for your document, you need to accept all of its aspects -- including the shape of the quotation marks. If, after a while, you still can't stand Palatino's quotation marks, do start looking for a different font. Aldus is quite similar overall to Palatino, but has more dominant-looking quote marks. – Mico Mar 22 '17 at 21:56
• @Mike'Pomax'Kamermans - "Did you link the wrong question?" Absolutely not. The earlier posting starts off with the OP being confused about the shape of Palatino's opening quotation marks (and thinking that they're the same as the closing quotation marks). Eventually, though, the fog clears and everyone agrees that Palatino's quotation marks are, well, quite unique and distinctive. – Mico Mar 22 '17 at 22:19

The code in csquotes works on the basis that language-dependent quotation styles map to logical mark up for quotes (see csquotes.def). In particular, for English the standard mapping is to use \textquotedblleft and \textquotedblright as the quote symbols. One could therefore redefine these to use some some font/symbol combination. Could do with more refinement, but for example

\documentclass{article}

\usepackage{csquotes}
\MakeOuterQuote{"}
\usepackage{fontspec}
\setmainfont{texgyrepagella-regular.otf}
\DeclareTextCommand{\textquotedblleft}{TU}{%
{\fontfamily{ptm}\selectfont }%
}
\DeclareTextCommand{\textquotedblright}{TU}{%
{\fontfamily{ptm}\selectfont ''}%
}
\begin{document}
The first words were: "these glyphs are not particularly good looking.",
and one had to agree. They looked all angular and terrible.

\end{document}


would work.

(Note that this is really nothing specific to csquotes, which quite deliberately uses logical markup for the quote symbols taken from a lower level.)

• I've not really tided up the encoding, etc., but hopefully the 'point of attach' is clear. – Joseph Wright Mar 22 '17 at 21:22
• Very much so: this is perfect, thank you very much. – Mike 'Pomax' Kamermans Mar 22 '17 at 21:41
• This will change the quotes also for the sans and the mono family. Imho it would be better to declare a "TU-for-pagella"-encoding with such declarations and use it only for the main font. – Ulrike Fischer Mar 22 '17 at 21:46
• It's just as well that you didn't post a screenshot to reveal the resulting crime against typography. Using Palatino as the text font together with Times Roman-based quotation marks looks all wrong... – Mico Mar 22 '17 at 22:21
• +1 for the answer because it does what it wants. But I really want some sort of booster to assent to Mico's complaint that this is a recipe for crimes against typography. Mixing quotes from one font and letters from another is crazy. Are you going to change the commas? The apostrophes? A font hangs together as a whole, and you're about to make some sort of honey and pickle sandwich. – Paul Stanley Mar 22 '17 at 22:58

There is more than one "Palatino" font out there. The one you appear to have picked -- "Palatino Linotype" -- indeed has the "squattest" and "stubbiest" (short, barely curved) double-quotation marks among the various Palatino candidates. Not only that, it's also the most cramped-looking of all Palatino variants I'm familiar with.

Before you engage in what amounts to a type crime spree, by mixing-and-mismatching quotation marks from other font families, I believe you owe it to yourself to consider other fonts that are either in the Palatino clan or are somewhat recognizable as relatives. The following screenshot shows six candidates, starting with Palatino Linotype (your current favorite); all font specimens are scaled so that they have the exact same x-heights.

As this screenshot demonstrates (I hope...), there is quite some variation among the fonts' double-quotation marks. If you really can't stand the double-quotation marks of Palatino Linotype, you may want to contemplate making a switch to either Palatino nova or to Aldus, or, if you feel really bold, to Dante.

% !TeX program = xelatex
\documentclass{article}
\usepackage{fontspec,csquotes}
\newcommand\hello{\enquote{Hello World}}

\begin{document}
\setmainfont{Palatino Linotype}
\hello --- Palatino Linotype (Zapf)

\setmainfont[Scale=MatchLowercase]{Palatino}
\hello --- Palatino (Zapf)

\setmainfont[Scale=MatchLowercase]{TeX Gyre Pagella}
\hello --- Pagella (Palatino clone)

\setmainfont[Scale=MatchLowercase]{Palatino nova Regular}
\hello --- Palatino nova (Zapf \& Kobayashi)

\setmainfont[Scale=MatchLowercase]{Aldus LT Std}
\hello --- Aldus (Zapf)

\setmainfont[Scale=MatchLowercase]{Dante MT Std}
\hello --- Dante (Mardersteig)
\end{document}

• @Mike'Pomax'Kamermans - I'm sorry that you're evidently unable to get the points I tried to make. Your claim, "we are in control, and we control all aspects of typesetting", is not so much a tenet as a painful parody of what TeX and friends is really all about. But, you're evidently an adult, and you can do whatever you want as long as you don't hurt others. Best wishes. – Mico Mar 23 '17 at 0:28
• @Mike'Pomax'Kamermans - Does what you claim to be the "most basic tenet of TeX", viz., "we are in control, and we control of all aspects of typesetting", not also imply that there can be no such thing as type crime -- at least not as long as the document is typeset with (XeLa)TeX and the source code is "beautiful", i.e., "easy to read" and "clear in its intention"? I would certainly have to disagree with such a view. Incidentally, nowhere did I "demand [you] stick to a single font", as my answer gave several examples of alternatives to Palatino Linotype. Why the polemics and hyperbole? – Mico Mar 23 '17 at 7:54
• My apologies for the headbutting - we both have very different ways of working and very different thoughts on both how one "should" use TeX and whether the integrity of typefaces should be respected. But, that's no excuse for not carefully reading what you took time for to write up. I may very well use one of these typefaces in the future, thank you for the suggestions. – Mike 'Pomax' Kamermans Mar 23 '17 at 15:25

As a specific-to-XeLaTeX solution, this can be done by relying on XeTeX's ability to inject active tokens between characters from specific character classes, with macro substitution for those tokens:

\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{SomeFont}
\newfontfamily{\QuoteFont}{SomeOverrideFont}[Ligatures=TeX]

\usepackage{csquotes}
\MakeOuterQuote{"}

% enable inter-character token insertion and token triggers
\XeTeXinterchartokenstate=1

% A collection of active glyphs for this purpose. Assigning a class
% for characters that already belong to a class simply reassigns them.
\newXeTeXintercharclass\Quotes
\XeTeXcharclass'=\Quotes
\XeTeXcharclass"=\Quotes
\XeTeXcharclass,=\Quotes
\XeTeXcharclass’=\Quotes
\XeTeXcharclass’=\Quotes
\XeTeXcharclass“=\Quotes
\XeTeXcharclass”=\Quotes

% transitions from/to Basic Latin
\XeTeXinterchartoks 0 \Quotes = {\begingroup\selectfont\QuoteFont}
\XeTeXinterchartoks \Quotes 0 = {\endgroup}

% transitions from/to word boundaries
\XeTeXinterchartoks 4095 \Quotes = {\begingroup\selectfont\QuoteFont}
\XeTeXinterchartoks \Quotes 4095 = {\endgroup}


Putting this in the preamble (or saving as some quotestyle.tex and then using \input{quotestyle.tex} in the preamble of course) results in text typeset with the main font, and formatted with smart quote replacement through csquotes but using a secondary font for the quote glyphs.

(Also note that for older versions of XeTeX, the boundary class is 255 rather than 4095`)

This worked better for me than Joseph Wright's answer, as this allowed me to override more than just double qoutes, but if you need a generic every-LaTeX answer for just double quotes, his suggestion works quite well.