我在 OS X Yosemite 上的 TexLive 中使用 XeLaTeX 和 fontspec。
问题是我无法使用 Seravek 字体的小型大写字母。但是,如果我直接定义字体系列“Seravek ExtraLight”,小型大写字母就可以使用。
已确认 Seravek 和我的 Mac 上的版本支持小型大写字母。
以下是简化的代码:
\documentclass{article}
\usepackage{fontspec}
\newfontfamily \seravek[BoldFont = * ExtraLight]{Seravek}
\newfontfamily \seravekEL{Seravek ExtraLight}
\newfontfamily \avenir{Avenir Next}
\begin{document}
\seravek \scshape Small Caps Testing
\seravek \scshape \textbf{Small Caps Testing}
\seravekEL \scshape Small Caps Testing
\avenir \scshape Small Caps Testing
\end{document}
输出:
如您所见,Seravek 没有小写字母。按照定义字体系列的正常方式,不同字体粗细也没有小写字母。
有关 fontspec 的日志信息表明 fontspec 无法为 Seravek 加载小型大写字母,如下所示:
. fontspec info: "defining-font"
.
. Font family 'Seravek(0)' created for font 'Seravek' with options [].
.
. This font family consists of the following shapes:
.
. * 'normal' with NFSS spec.:
. <->"Seravek/ICU:"
.
. * 'bold' with NFSS spec.:
. <->"Seravek ExtraLight/ICU:"
.
. * 'italic' with NFSS spec.:
. <->"Seravek/I/ICU:"
.
. * 'bold italic' with NFSS spec.:
. <->"Seravek ExtraLight/I/ICU:"
.................................................
\g_fontspec_family_Seravek ExtraLight_int=\count124
.................................................
. fontspec info: "defining-font"
.
. Font family 'SeravekExtraLight(0)' created for font 'Seravek ExtraLight'
. with options [].
.
. This font family consists of the following shapes:
.
. * 'normal' with NFSS spec.:
. <->"Seravek ExtraLight/ICU:script=latn;language=DFLT;"
.
. * 'small caps' with NFSS spec.:
. <->"Seravek ExtraLight/ICU:script=latn;language=DFLT;+smcp;"
.
. * 'bold' with NFSS spec.:
. <->"Seravek ExtraLight/B/ICU:script=latn;language=DFLT;"
.
. * 'italic' with NFSS spec.:
. <->"Seravek ExtraLight/I/ICU:script=latn;language=DFLT;"
.
. * 'italic small caps' with NFSS spec.:
. <->"Seravek ExtraLight/I/ICU:script=latn;language=DFLT;+smcp;"
.
. * 'bold italic' with NFSS spec.:
. <->"Seravek ExtraLight/BI/ICU:script=latn;language=DFLT;"
.................................................
\g_fontspec_family_Avenir Next_int=\count125
.................................................
. fontspec info: "defining-font"
.
. Font family 'AvenirNext(0)' created for font 'Avenir Next' with options [].
.
. This font family consists of the following shapes:
.
. * 'normal' with NFSS spec.:
. <->"Avenir Next/ICU:script=latn;language=DFLT;"
.
. * 'small caps' with NFSS spec.:
. <->"Avenir Next/ICU:script=latn;language=DFLT;+smcp;"
.
. * 'bold' with NFSS spec.:
. <->"Avenir Next/B/ICU:script=latn;language=DFLT;"
.
. * 'bold small caps' with NFSS spec.:
. <->"Avenir Next/B/ICU:script=latn;language=DFLT;+smcp;"
.
. * 'italic' with NFSS spec.:
. <->"Avenir Next/I/ICU:script=latn;language=DFLT;"
.
. * 'italic small caps' with NFSS spec.:
. <->"Avenir Next/I/ICU:script=latn;language=DFLT;+smcp;"
.
. * 'bold italic' with NFSS spec.:
. <->"Avenir Next/BI/ICU:script=latn;language=DFLT;"
.
. * 'bold italic small caps' with NFSS spec.:
. <->"Avenir Next/BI/ICU:script=latn;language=DFLT;+smcp;"
.................................................
问题出在哪里?我该如何解决?谢谢!
答案1
这看起来确实是一个可能的fontspec
问题,因为手动加载字体确实允许选择小写字母。(我没有意识到 Seravek 与 Mavericks 捆绑在一起。)我可能需要一点时间才能解决这个问题。
与此同时,你可以使用一种丑陋的字体加载形式:
\documentclass[a4paper]{article}
\usepackage{fontspec}
\begin{document}
\fontspec[SmallCapsFont=Seravek,SmallCapsFeatures={RawFeature=+smcp}]{Seravek}
regular \textsc{small caps}
\end{document}
问题一定在于检查字体功能是否存在的代码中;这也可能是 XeTeX 的错误。