Smallcaps con TeX Gyre Pagella y XeLaTeX

Smallcaps con TeX Gyre Pagella y XeLaTeX

Esta pregunta ya está hechaaquí, pero la respuesta aceptada vuelve a pdflatex, que no funcionará para este proyecto.

Originalmente especifiqué la fuente Palatino con \usepackage[sc, osf]{mathpazo}, sin embargo, tengoaprendióque dado polyglossiaque necesito para varios idiomas internacionales, se carga implícitamente fontspec, en su lugar estoy usando \setmainfont{TeX Gyre Pagella}una fuente que instalé manualmente en el sistema (OS X) desdeCTANdescargar.

TeX Gyre Pagellano parece incluir versalitas, así que lo descargué e instalé Palatino Small Caps & Old Style Figures.ttfcomo se muestra aquí:

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

Por lo que puedo deducir de la siguiente información de fuente, Palatino-SC sería el nombre a utilizar como referencia:

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.

Pero en este ejemplo, no se muestran versalitas:

\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}

Lo que ESTÁ funcionando es la siguiente fontspecsustitución de familia de fuentes:

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

¿Alguien puede explicar 1. Por qué los setmainfontparámetros no funcionan y 2. ¿Cómo puedo hacer que se muestre OldStyleNums?

Respuesta1

La definición de fuentes dentro de XeLaTeX depende de cómo las instaló.

Si TeX Gyre Pagella está disponible como fuente del sistema, entonces

\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}

Será suficiente. De lo contrario, deberá utilizar las fuentes de la distribución TeX Live con un método un poco más complicado.

Si ejecuto el ejemplo con xelatex -output-driver="xdvipdfmx -vv", obtengo el siguiente resultado en la 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])

que muestra que instalé las fuentes TeX Gyre /Library/Fontsy que son utilizadas por xdvipdfmx.

La versión un poco más complicada es

\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}

y la salida detallada se convierte

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])

mostrando que se utilizan directorios TeX Live.

La salida es la misma en ambos casos.

ingrese la descripción de la imagen aquí

Como puede ver, se respetan las versalitas.

información relacionada