# Different hyphenation pattern when using oldstyle figures?

It appears that there are different hyphenation patters when using oldstyle figures or not. Consider the following MWE:

\documentclass[a4paper,10pt]{scrartcl}
\areaset[current]{336pt}{600pt}
\overfullrule=5pt

\usepackage{mathpazo}

%\usepackage[osf]{mathpazo}

%\usepackage{fontspec}
%\setmainfont[
%   Numbers={OldStyle,Proportional},
%       ]   {TeX Gyre Pagella}

\begin{document}
\noindent Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum
ut
\end{document}


Which generates an overfull hbox:

If we activate old style figures, that problem does not occur:

I have two questions:

1. What is going on here? I don't see any numbers in the text, so why would XeLaTeX generate different output?

2. Ultimately I want to use the Open Type Font TeX Gyre Pagella. If we generate this example the result is identical to the first picture, i.e. we get an overfull hbox. How can I achieve the same result as with osf-mathpazo?

-
I get essentially the same output with the simple mathpazo as well as with TeX Gyre Pagella. However the text font is not the same, so differences in character width and other aspects such as kerning can be expected. –  egreg Mar 9 '12 at 9:55
@egreg: That the output between Pazo Math and TeX Gyre Pagella can be different is clear to me, but why is the output different when using mathpazo with or without old style fonts? –  Jörg Mar 9 '12 at 10:30
With option osf mathpazo uses the family pplj and so at the end (if you look in the fd-file) pplr9o. Without the option ppl/pplr7t is used. One would have to check the tfm-file to find out where they differ. –  Ulrike Fischer Mar 9 '12 at 10:44
The abbreviation OSF usually stands for "oldstyle figures". Hence, please consider editing the title of your question to read "... oldstyle figures?" rather than "... old style fonts?. Old-style fonts tends to refer to fonts with "fancy" glyph shapes, such as a long-s -- a subject not intended to be brought up by your question, right? –  Mico Mar 9 '12 at 11:43
Title edited. As @Mico suggested I am talking about oldstyle figures, not fonts. –  Jörg Mar 9 '12 at 11:51

The different hyphenation patterns are caused by the more spacious kerning and word spacing of the pplx and pplj font families. Quoting Using common PostScript fonts with LaTeX, p. 4 (emphasis added):

By default, the package mathpazo uses the typeface family ppl as the roman text font family. The option [sc] selects Palatino with real smallcaps (family pplx) insread [sic!]. Correspondingly, the option [osf] selects Palatino with smallcaps and default oldstyle figures (family pplj). Of course, oldstyle figures will be used only in text mode, as opposed to formulas. Using either option is strongly recommended: Beside the real smallcaps, the font families pplx and pplj show further improvements over ppl: Increased word space, enhanced kerning tables, additional ‘dotlessj’ glyph.

-
So it's not a bug, it's a feature :-)! Can we "assume" that professional fonts such as Adobe Garamond Pro or Minion Pro have the "perfect" word spacing? Or is that something that can/should be improved for professional looking documents? –  Jörg Mar 9 '12 at 20:00
@Jörg You should assume that the kerning of professional fonts is already good, but that there's always room for improvement (especially for "obscure" letter pairs). –  lockstep Mar 9 '12 at 20:03
Sorry, I was actually referring to interword space, not kerning. –  Jörg Mar 9 '12 at 20:37
@Jörg: Interword spacing is somehat more a matter of taste, altough the default values of professional fonts should be sensible. –  lockstep Mar 9 '12 at 20:39

The results are very similar when

\usepackage{mathpazo}


alone is used or

\usepackage{mathpazo}
\usepackage{fontspec}
\setmainfont[Numbers={OldStyle,Proportional}]{TeX Gyre Pagella}


is specified. When only

\usepackage[osf]{mathpazo}


is declared, the result is different, because the font, for reasons that I don't know, has rather different font space parameters. With \usepackage[osf]{mathpazo} I get

Interword space: 2.91pt
Interword stretch: 1.75pt
Interword shrink: 0.7pt

while, with \usepackage{mathpazo} the result is

Interword space: 2.5pt
Interword stretch: 1.49998pt
Interword shrink: 0.59998pt

The larger interword space for Old Style Figures MathPaZo clearly accounts for the different result.

I got the table by the code

\noindent Interword space: \the\fontdimen2\font\\
Interword stretch: \the\fontdimen3\font\\
Interword shrink: \the\fontdimen4\font


issued after \begin{document}

-
Not being an expert in fonts at all, but that sounds like a bug. How do you measure the font space parameters? –  Jörg Mar 9 '12 at 10:58