7

Using Adobe's Garamond Premier Pro Opticals (latest version: 2.104) the closing German doublequotes are set exactly above (instead of behind) a sentence's closing dot (e.g. questionmark is not affected). The red mark within the following screenshot shows the result. The screenshot also shows that only the Regular-shape seems to be affected, as the output using Subhead-sizes and Caption-sizes is fine (see the green marks): enter image description here

System environment: Windows 7 Pro 64-bit

Tex environment: texlive 2014; lates updates (frozen); lualtex or xelatex

Font: GaramondPremrPro Version 2.104;PS 2.000;hotconv 1.0.70;makeotf.lib2.5.5900

Minimum Working Example:

\documentclass[12pt]{article}

\usepackage{fontspec}
%\setmainfont{Times New Roman}
\setmainfont{Garamond Premier Pro}

\usepackage{polyglossia}
\setdefaultlanguage[babelshorthands=true,variant=german,spelling=new]{german}
\setotherlanguage[variant=british]{english}
\setotherlanguage{french}

\usepackage[autostyle=true,german=quotes]{csquotes}

\newcommand{\testOutput}{%
    "`Hallo Welt."' (old school)

    \enquote{Hallo Welt.} (enquote)

    \enquote{Hallo Welt,} (enquote)

    \foreignquote{english}{Hello World.} (foreignquote, en.)

    \foreignquote{french}{Salut tout le monde.} (foreignquote, fr.)

    \hrulefill  
}

\begin{document}

\noindent
GaramondPremierPro-Regular:

\testOutput

\Large
\noindent
GaramondPremierPro-Subhead:

\testOutput

\tiny
\noindent
GaramondPremierPro-Caption:

\testOutput

\end{document}

With a comma instead of the dot, the result seems to look better to me, but far from excellent (in direct comparison to the subhead- or caption-size).

Question(s): Can you reproduce the output? If so, what's the most probable cause and what should be the next steps to further narrow the cause? And what could be a proper solution or at least a workaround?

10
  • 2
    Could you please try to get the same result with free fonts or even standard fonts shipped by TL14? You will get help much quicker then. Thanks. If it is just about this font, it would be maybe off-topic as it has to do with the kerning provided by the font.
    – LaRiFaRi
    May 11, 2015 at 10:11
  • No, sorry. I think it's a font specific kerning problem: If I load the font using the option [Kerning=Off] the quotes are placed correctly, but the overall output is a mess, because of no kerning.
    – user74259
    May 11, 2015 at 10:13
  • I can reproduce your output on a MacOSX system (since Garamond Premier Pro is one of the system fonts). I think the lack of horizontal separation between the period ("full stop") and the closing quotation marks may be a font design "thing", i.e., something that's built into the font's kerning tables. Interestingly, Sabon Next LT Pro (a commercial font, also patterned on "Garamond") gives a very similar result. In contrast, EB Garamond does not, i.e., there's a noticeable distance between the period and the closing quotation marks.
    – Mico
    May 11, 2015 at 11:12
  • @Mico: Thank you for your feedback. There are more reproducible kerning problems with this font: If you extend the above MWE with: Ich sage: Hallo Welt! you should get a miss-kerned result in the Subhead-size: the colon seems to have a leading whitespace (Regular is fine here)...
    – user74259
    May 11, 2015 at 11:15
  • 1
    I guess it can be said that you're "discovering" for yourself why many typophiles generally admire GPP but have a lot of reservations about actually having to use it... About changing the kerning table: The best way to do that would be through a "feature file", in which you define your own kerning adjustments for various character pairs.
    – Mico
    May 11, 2015 at 12:07

2 Answers 2

6

I won't consider this as a bug. It’s kind of common sense for – at least some – designer/typographers to kern the period and a quotations mark in that way. The amount of necessary kerning depends on the typeface and is subjective to the designer’s eye, though.

On my system all optical sizes apply the same kerning:

“wrong” kerning

In XeTeX you can define custom kerning between (groups/classes) of letters:

  1. Switch on custom kerning:

    \XeTeXinterchartokenstate = 1
    
  2. Define a new class with:

    \newXeTeXintercharclass <classmacro>
    
  3. Add letters to a class:

    \XeTeXcharclass <letter code> = <classmacro>
    

    To add a letter not by it’s code but directly use a back tick, e.g. `“

  4. Add extra tokes (e.g. kerning) between tow classes:

    \XeTeXinterchartoks <classmacro 1> <classmacro 2> = <tokens>
    

    Note that the classes must be in the same rode as the letters would appear in the document.

Add this code to your example, to “fix” the kerning:

\XeTeXinterchartokenstate=1

\newXeTeXintercharclass \kernclassRQuote
   \XeTeXcharclass `“ = \kernclassRQuote

\newXeTeXintercharclass \kerncharclassDot
\XeTeXcharclass `. = \kerncharclassDot
\XeTeXcharclass `, = \kerncharclassDot

\XeTeXinterchartoks \kerncharclassDot \kernclassRQuote = {\kern-0.05em}

“right” kerning

As I said, the value you prefer is not necessarily the “right” one for others ;-)

4
  • Thank you very much for your answer. I have not tested your suggestion yet, but am I right that it won't work with lualatex (i prefer lualatex because of the selnolig package? Another problem probably is, that the default kerning varies here between different optical sizes - how can I address this using xelatex and/or lualatex? Currently I try to implement a small feature file, but I'm unsure, whether different feature files can be applied to different optical sizes...
    – user74259
    May 11, 2015 at 12:55
  • forget about it - I though these features and feature file definitions are additive, but they seem to override the current definition overall (for all optical sizes). Thats seems fine to me. But I need some more time to investigate the details. @TobiW: +1 for XeLaTeX
    – user74259
    May 11, 2015 at 13:12
  • Actually I have no idea if you can change the kerning different for different sizes (maybe if you implement size depending code directly in <tokens>) and I also don’t know how to do the same with Luatex …
    – Tobi
    May 11, 2015 at 13:16
  • Using lualatex and font feature files different optical sizes can be addressed (for details, please see my previous answer).
    – user74259
    May 12, 2015 at 22:44
5

I don't know what negative side effects this ugly workaround will cause, but it seems to work (tested with lualatex):

\enquote{Hallo Welt\mbox{.}}

Are there better alternatives?

Yes, next to Tobi's answer that addresses xeLaTeX the following solution is compatible with luaLaTeX. It implements a font feature file that introduces two additional features that are bound to regular-size (upright and bold). They are called:

  1. kruq (kern regular upright quotedblleft)
  2. krbq (kern regular bold quotedblleft)

The following MWE shows the details - the kerning spaces (900 - 1600) are very large, just to visualize the differences. You should be able to easily adept and extend them to your needs:

\documentclass[12pt]{article}

\usepackage{filecontents,fontspec}

\begin{filecontents*}{gpp20104.fea}
languagesystem DFLT dflt;
languagesystem latn dflt;

lookup reg_up_quotedblleft {
    pos [period ellipsis]' 1600 quotedblleft;
    pos comma' 1200 quotedblleft;
} reg_up_quotedblleft;

lookup reg_bd_quotedblleft {
    pos [period ellipsis]' 1200 quotedblleft;
    pos comma' 900 quotedblleft;
} reg_bd_quotedblleft;

feature kruq {
    lookup reg_up_quotedblleft;
} kruq;

feature krbq {
    lookup reg_bd_quotedblleft;
} krbq;
\end{filecontents*}

\setmainfont[%
FeatureFile=gpp20104.fea,
Extension = .otf ,
Path=C:/GaramondPremrPro/ ,
BoldItalicFont = {*-BdIt},
BoldFont = {*-Bd},
ItalicFont = {*-It},
UprightFont = {*},
UprightFeatures = {%
    SizeFeatures={%
        {Size={-8.9},Font={*-Capt}},
        {Size={8.91-14.9},Font={*},RawFeature={+kruq}},
        {Size={14.91-22.9},Font={*-Subh}},
        {Size={22.91-},Font={*-Disp}},
    },%
},%
ItalicFeatures = {%
    SizeFeatures={%
        {Size={-8.9},Font={*-ItCapt}},
        {Size={8.91-14.9},Font={*-It}},
        {Size={14.91-22.9},Font={*-ItSubh}},
        {Size={22.91-},Font={*-ItDisp}},
    },%
},% 
BoldFeatures = {%
    SizeFeatures={%
        {Size={-8.9},Font={*-BdCapt}},
        {Size={8.91-14.9},Font={*-Bd},RawFeature={+krbq}},
        {Size={14.91-22.9},Font={*-BdSubh}},
        {Size={22.91-},Font={*-BdDisp}},
    },%
},%
BoldItalicFeatures = {%
    SizeFeatures={%
        {Size={-8.9},Font={*-BdItCapt}},
        {Size={8.91-14.9},Font={*-BdIt}},
        {Size={14.91-22.9},Font={*-BdItSubh}},
        {Size={22.91-},Font={*-BdItDisp}},
    },%
},%
]{GaramondPremrPro}

\usepackage{polyglossia}
\setdefaultlanguage[babelshorthands=true,variant=german,spelling=new]{german}

\usepackage[autostyle=true,german=quotes]{csquotes}

\newcommand{\hw}{Hallo}
\newcommand{\hwplain}{"`{\hw}"'}
\newcommand{\hwperiod}{"`{\hw}."'}
\newcommand{\hwcomma}{"`{\hw},"'}
\newcommand{\hwscolon}{"`{\hw};"'}
\newcommand{\hwcolon}{"`{\hw}:"'}
\newcommand{\hwellip}{"`{\hw} \ldots"'}
\newcommand{\hwquest}{"`{\hw}?"'}
\newcommand{\hwexcla}{"`{\hw}!"'}
\newcommand{\testOutput}{%
    {\hwplain} \emph{\hwplain} \textbf{\hwplain} \emph{\textbf{\hwplain}}\\
    {\hwperiod} \emph{\hwperiod} \textbf{\hwperiod} \emph{\textbf{\hwperiod}}\\
    {\hwcomma} \emph{\hwcomma} \textbf{\hwcomma} \emph{\textbf{\hwcomma}}\\
    {\hwscolon} \emph{\hwscolon} \textbf{\hwscolon} \emph{\textbf{\hwscolon}}\\
    {\hwcolon} \emph{\hwcolon} \textbf{\hwcolon} \emph{\textbf{\hwcolon}}\\
    {\hwellip} \emph{\hwellip} \textbf{\hwellip} \emph{\textbf{\hwellip}}\\
    {\hwquest} \emph{\hwquest} \textbf{\hwquest} \emph{\textbf{\hwquest}}\\
    {\hwexcla} \emph{\hwexcla} \textbf{\hwexcla} \emph{\textbf{\hwexcla}}%
}

\begin{document}

\tiny
\noindent
Caption:\\
\testOutput

\normalsize
\noindent
Regular:\\
\testOutput

\Large
\noindent
Subhead:\\
\testOutput

\Huge
\noindent
Display:\\
\testOutput

\end{document}

Update:

Instead of loading the FeatureFile globally, it can be loaded locally within the size-block, right before the RawFeature option:

{Size={8.91-14.9},Font={*},FeatureFile=gpp20104.fea,RawFeature={+kruq}}

Advantage: Slightly faster compilation as not every font loads unused features (you can compare the amount of font-lua-files in texmf-var\luatex-cache\generic\fonts\otf\*.lua, with locally asserted FileFeatures only two *-gpp20104.lua files should be present).

The additional kerning problems regarding e.g. colon I mentioned before (see my comment below the question) are not caused by the font's kerning table: The cause seems to be csquote's \foreignquote{}{} which does not switch back to the default language automatically. Perhaps I'll ask a new question - I did so.

You must log in to answer this question.