I'm trying to typeset my document with Times with XeLaTeX. Because Times does not include small caps, I want to use TeX Gyre Termes only for small caps. I tried this method, but it didn't work. A warning is issued and the output is not small caps.
The question:
- What is wrong?
- How can I do this?
Here's a MWE:
\documentclass{article}
\usepackage{fontspec}
\setmainfont[
SmallCapsFont={TeX Gyre Termes},
SmallCapsFeatures={Letters=SmallCaps},
]{Times}
\begin{document}
Hello!
\textsc{Hello!}
\end{document}
and the warning:
*************************************************
* fontspec warning: "aat-feature-not-exist-in-font"
*
* AAT feature 'Letters=SmallCaps' (3,3) not available in font 'TeX Gyre
* Termes'.
*************************************************
What I've tried:
- I tried typesetting with LuaLaTeX and the result was fine with no warnings.
- I replaced
Times
withTimes New Roman
and there was no problem. - I added
Renderer=ICU
and the warning changed toicu-feature-not-exist-in-font
. It seems that fontspec can use.dfont
with ICU? - I replaced
Times
with another.dfont
fontHelvetica Neue
and the problem disappeared. Thus not all.dfont
font cause the problem....
I'm using MacTeX 2013 on OS X Mountain Lion.
Update
Following a suggestion from @KhaledHosny,
I tried adding \the\XeTeXfonttype\font
before and after \textsc{
,
and both returned 1
(AAT font).
With Render=ICU
they returned 2
(OpenType font), but I got no small caps.
It seems that XeTeX can treat Times as OpenType, but even then SmallCapsFeatures
doesn't work.
Times
? XeLaTeX will work with system-installed fonts, while LuaLaTeX searches for fonts more broadly.Times
andTeX Gyre Termes
are listed inFont Book.app
.Times New Roman PS Std
. However, my Times version has also Small Caps, the reason why I do not need the TeX Gyre Termes. But it also works with the small caps from Termes..dfont
format and apparentlyfontspec
is not able to use it other than with the AAT renderer, which is not available for TeX Gyre Termes; you should also have aTimes New Roman.ttf
in/Library/Fonts
and on my system the combination works.\the\XeTeXfonttype\font
should print the type of the font engine XeTeX choses for this font (0 for TFM fonts, 1 for AAT, 2 for OpenType and 3 for Graphite).