1

This question is already asked here, but accepted answer reverts to pdflatex, which won't work for this project.

I originally specified Palatino font with \usepackage[sc, osf]{mathpazo}, however I have learned that since polyglossia, which I need for various international languages, implicitly loads fontspec, I am instead using \setmainfont{TeX Gyre Pagella}, a font which I manually installed on the (OS X) system from CTAN download.

TeX Gyre Pagella doesn't seem to include smallcaps, so I downloaded and installed Palatino Small Caps & Old Style Figures.ttf as shown here:

fc-list | grep Palatino
/Users/mikekilmer/Library/Fonts/Palatino Small Caps & Old Style Figures.ttf: Palatino Small Caps & Old Style,Palatino:style=Regular,Small Caps & Old Style Figures
/System/Library/Fonts/Palatino.ttc: Palatino:style=Bold
/System/Library/Fonts/Palatino.ttc: Palatino:style=Regular
/System/Library/Fonts/Palatino.ttc: Palatino:style=Bold Italic
/System/Library/Fonts/Palatino.ttc: Palatino:style=Italic

As far as I can tell from the following font info, Palatino-SC would be the name to reference to use:

otfinfo -i '~/Library/Fonts/Palatino Small Caps & Old Style Figures.ttf'
Family:              Palatino Small Caps & Old Style
Subfamily:           Regular
Full name:           Palatino-SC
PostScript name:     Palatino-SC
Version:             001.001
Unique ID:           Palatino Small Caps & Old Style Figures:1178633258
Copyright:           Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated.  All Rights Reserved.Palatino is a trademark of Linotype AG and/or its subsidiaries.

But in this example, there's no small caps displayed:

\documentclass[a5paper,twoside,11pt]{extbook}
\usepackage{polyglossia}
\setdefaultlanguage{english} 
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Numbers=OldStyle,
SmallCapsFont={Palatino-SC},
SmallCapsFeatures={Letters=SmallCaps}
 ]{TeX Gyre Pagella}
\begin{document}
\textsc{Once upon a time} we had a story. Once upon a time.
\end{document}

What IS working, is the following fontspec font family substitution:

\newfontfamily\scshape[Letters=SmallCaps,Scale=1.15]{Palatino-SC}

Can someone explain 1. Why the setmainfont parameters aren't working and 2. How I can get OldStyleNums to display?

14
  • Did you load fontspec?
    – Bernard
    Commented Jan 29, 2017 at 20:05
  • @Bernard polyglossia does it
    – egreg
    Commented Jan 29, 2017 at 20:09
  • Why should you need to substitute the font? With \setmainfont[Numbers=OldStyle]{TeX Gyre Pagella} I get small caps.
    – egreg
    Commented Jan 29, 2017 at 20:11
  • i have spent at least a couple of hours (from a fairly ignorant place) troubleshooting this.
    – MikeiLL
    Commented Jan 29, 2017 at 20:11
  • 1
    Do you mean CTAN rather than CPAN? There is a CPAN, but it seems an unlikely choice here. As far as I know, fc-list will not necessarily tell you which fonts are available or will be used by XeTeX/LuaTeX on OS X, because fontconfig is not the native font-handling system. On Linux, it would tell you, but on OS X, you end up with distinct font management software and you need to know which one is being used for what. (This is true on Linux, too, but much less so as almost everything now uses fontconfig.) At least, this is how it worked when I used OS X, which isn't recently.
    – cfr
    Commented Jan 29, 2017 at 21:20

1 Answer 1

2

Defining fonts within XeLaTeX depends on how you installed them.

If TeX Gyre Pagella is available as a system font, then

\documentclass{article}

\usepackage{fontspec}
\usepackage{polyglossia}

\setdefaultlanguage{english}

\setmainfont{TeX Gyre Pagella}[
  Numbers=OldStyle,
]

\begin{document}

\textsc{Once upon a time} we had a story. Once upon a time.

1234567890

\end{document}

will suffice. Otherwise, you need to use the fonts in the TeX Live distribution with a slightly more complicated method.

If I run the example with xelatex -output-driver="xdvipdfmx -vv", I get the following output on the terminal:

DVI Comment:  XeTeX output 2017.01.29:2158
<AGL:texglyphlist.txt><AGL:pdfglyphlist.txt><AGL:glyphlist.txt>[1</Library/Fonts/tex-gyre/[email protected]<NATIVE-FONTMAP:/Library/Fonts/tex-gyre/texgyrepagella-regular.otf/0/H/65536/0/0>
fontmap: /Library/Fonts/tex-gyre/texgyrepagella-regular.otf/0/H/65536/0/0 -> /Library/Fonts/tex-gyre/texgyrepagella-regular.otf(Identity-H)

pdf_font>> Input encoding "Identity-H" requires at least 2 bytes.
pdf_font>> The -m <00> option will be assumed for "/Library/Fonts/tex-gyre/texgyrepagella-regular.otf".
(CID:TeXGyrePagella-Regular)
pdf_font>> Type0 font "/Library/Fonts/tex-gyre/texgyrepagella-regular.otf" cmap_id=<Identity-H,0> opened at font_id=</Library/Fonts/tex-gyre/texgyrepagella-regular.otf/0/H/65536/0/0,0>.
></Library/Fonts/tex-gyre/[email protected]>]
otf_cmap>> Creating ToUnicode CMap for "/Library/Fonts/tex-gyre/texgyrepagella-regular.otf"...
(CID:/Library/Fonts/tex-gyre/texgyrepagella-regular.otf[SMRJXI+TeXGyrePagella-Regular][CIDFontType0][39 glyphs][5175 bytes])

which shows I installed the TeX Gyre fonts in /Library/Fonts and these are used by xdvipdfmx.

The slightly more complicated version is

\documentclass{article}

\usepackage{fontspec}
\usepackage{polyglossia}

\setdefaultlanguage{english}

\setmainfont{texgyrepagella}[
  Extension=.otf,
  UprightFont=*-regular,
  ItalicFont=*-italic,
  BoldFont=*-bold,
  BoldItalicFont=*-bolditalic,
  Numbers=OldStyle,
]

\begin{document}

\textsc{Once upon a time} we had a story. Once upon a time.

1234567890

\end{document}

and the verbose output becomes

DVI Comment:  XeTeX output 2017.01.29:2202
<AGL:texglyphlist.txt><AGL:pdfglyphlist.txt><AGL:glyphlist.txt>[1</usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/[email protected]<NATIVE-FONTMAP:/usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf/0/H/65536/0/0>
fontmap: /usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf/0/H/65536/0/0 -> /usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf(Identity-H)

pdf_font>> Input encoding "Identity-H" requires at least 2 bytes.
pdf_font>> The -m <00> option will be assumed for "/usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf".
(CID:TeXGyrePagella-Regular)
pdf_font>> Type0 font "/usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf" cmap_id=<Identity-H,0> opened at font_id=</usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf/0/H/65536/0/0,0>.
></usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/[email protected]>]
otf_cmap>> Creating ToUnicode CMap for "/usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf"...
(CID:/usr/local/texlive/2016/texmf-dist/fonts/opentype/public/tex-gyre/texgyrepagella-regular.otf[KRFMAA+TeXGyrePagella-Regular][CIDFontType0][39 glyphs][5175 bytes])

showing that TeX Live directories are used.

The output is the same in both cases.

enter image description here

As you see, small caps are honored.

1
  • The culprit turns out to have been \usepackage{newpxtext,newpxmath} which I had added at some point to show text figures, and as a set of "Palatino-like fonts" I guess was overriding the other fonts (though it was previous in the preamble) and loading lmroman10-regular.otf. Remove it and we have texgyrepagella-regular.otf.
    – MikeiLL
    Commented Jan 30, 2017 at 4:35

You must log in to answer this question.

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