TeX Gyre Pagella 및 XeLaTeX를 사용한 Smallcaps

TeX Gyre Pagella 및 XeLaTeX를 사용한 Smallcaps

이 질문은 이미 요청되었습니다.여기, 그러나 허용된 답변은 pdflatex로 되돌아가며 이 프로젝트에서는 작동하지 않습니다.

원래 Palatino 글꼴을 으로 지정 \usepackage[sc, osf]{mathpazo}했지만배운polyglossia다양한 국제 언어에 필요한 가 암시적으로 로드되기 때문에 대신 (OS X) 시스템에 수동으로 설치한 글꼴인 를 fontspec사용하고 있습니다.\setmainfont{TeX Gyre Pagella}CTAN다운로드.

TeX Gyre Pagellasmallcaps가 포함되어 있지 않은 것 같아서 Palatino Small Caps & Old Style Figures.ttf다음과 같이 다운로드하여 설치했습니다.

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

다음 글꼴 정보에서 알 수 있는 한 Palatino-SC는 사용 시 참조할 이름입니다.

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.

하지만 이 예에서는 작은 대문자가 표시되지 않습니다.

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

작동하는 것은 다음과 같은 fontspec글꼴 모음 대체입니다.

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

누군가가 1. setmainfont매개변수가 작동하지 않는 이유와 2. OldStyleNums를 표시하는 방법을 설명할 수 있습니까?

답변1

XeLaTeX 내에서 글꼴을 정의하는 방법은 설치 방법에 따라 다릅니다.

TeX Gyre Pagella를 시스템 글꼴로 사용할 수 있는 경우

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

충분할 것입니다. 그렇지 않으면 약간 더 복잡한 방법으로 TeX Live 배포판의 글꼴을 사용해야 합니다.

를 사용하여 예제를 실행하면 xelatex -output-driver="xdvipdfmx -vv"터미널에 다음과 같은 출력이 표시됩니다.

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

이것은 내가 TeX Gyre 글꼴을 설치했고 /Library/Fonts이것들이 에서 사용된다는 것을 보여줍니다 xdvipdfmx.

약간 더 복잡한 버전은

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

자세한 출력은 다음과 같습니다.

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

TeX Live 디렉토리가 사용됨을 보여줍니다.

두 경우 모두 출력은 동일합니다.

여기에 이미지 설명을 입력하세요

보시다시피, 작은 대문자가 존중됩니다.

관련 정보