1

I'm trying to fiddle TeX Gyre Heros' Small caps into Helvetica using fontspec and xelatex; here's an MWE of my code:

\documentclass{standalone}
\usepackage{fontspec} %v2.5a

%\setmainfont{texgyreheros-bold.otf} % this works
%\setmainfont{Helvetica} % this also works
\setmainfont{Helvetica}[BoldFeatures = { SmallCapsFont = {texgyreheros-bold.otf} }] % this does not work
\begin{document}
Test
\end{document}

As you can see be the comments, both Helvetica and TeX Gyre Heros alone work fine. However, if I try to specify TeX Gyre Heros as Bold/Small caps font for Helvetica I get the following error:

kpathsea: Running mktextfm texgyreheros-bold/AAT
/usr/local/texlive/2016/texmf-dist/web2c/mktexnam: Could not map source abbreviation A for AAT.
/usr/local/texlive/2016/texmf-dist/web2c/mktexnam: Need to update /usr/local/texlive/2016/texmf-dist/fonts/map/fontname/special.map?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input AAT
This is METAFONT, Version 2.7182818 (TeX Live 2016) (preloaded base=mf)


kpathsea: Running mktexmf AAT
! I can't find file `AAT'.
<*> \mode:=ljfour; mag:=1; nonstopmode; input AAT

Please type another input file name
! Emergency stop.
<*> \mode:=ljfour; mag:=1; nonstopmode; input AAT

Transcript written on mfput.log.
grep: AAT.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input AAT' failed to make AAT.tfm.
kpathsea: Appending font creation commands to missfont.log.


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "texgyreheros-bold.otf" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.6 ... SmallCapsFont = {texgyreheros-bold.otf} }]
                                                   % this does not work

Can I intermix Helvetica and TeX Gyre Heros using fontspec (this way)? If not, why? (I have no clue what is happening, but I'd like to get some understanding to avoid pitfalls in the future.)

If I'm missing any important information, let me know.

Thanks for your time.

1 Answer 1

0

It seems that mixing renderers is not accepted by fontspec:

\documentclass{article}
\usepackage{fontspec} %v2.5a

\setmainfont{Helvetica}[
  Renderer=OpenType,
  BoldFeatures = {
    SmallCapsFont = {TeX Gyre Heros/B},
  },
  SmallCapsFeatures = {
    Script=Default,
    Language=Default,
    Letters=SmallCaps,
  },
] % this does not work

\setsansfont{TeX Gyre Heros}

\begin{document}
Test\textbf{\textsc{Abc}}

\sffamily % as a check
Test\textbf{\textsc{Abc}}

\end{document}

enter image description here

2
  • What do you mean by "missing renderers"? That the options is not set? Or that it is not available on the system? Because I have another document where I had to set Renderer = AATby hand to get small caps from Hoefler Text. So I think AAT-Renderer is available on my system. Jul 27, 2016 at 13:22
  • @user3284229 Typo: mixing, not missing
    – egreg
    Jul 27, 2016 at 13:33

You must log in to answer this question.

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