xelatex 没有找到 texgyreterms

xelatex 没有找到 texgyreterms

我想将 xelatex 与 TexGyreTerms 一起使用:

\ifxetex
  \newcommand{\lsCoverTitleFont}[1]{\fontspec[LetterSpace=-2.0]{TeXGyreTermes}   \fontshape{sc}\fontsize{52pt}{16.75mm}\selectfont #1}
 \else

但是,尽管安装了软件包(Mac,texlive 2012),我还是收到以下抱怨:

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


kpathsea: Running mktexmf TeXGyreTermes
! I can't find file `TeXGyreTermes'.
<*> ...r; mag:=1; nonstopmode; input TeXGyreTermes

Please type another input file name
! Emergency stop.
<*> ...r; mag:=1; nonstopmode; input TeXGyreTermes

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

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

l.21 

我能做些什么?

感谢您的及时回复。我尝试了这种方法,但结果是:

kpathsea: Running mktextfm TeXGyreTermes-Regular
/usr/local/texlive/2012/texmf/web2c/mktexnam: Could not map source abbreviation T for TeXGyreTermes-Regular.
/usr/local/texlive/2012/texmf/web2c/mktexnam: Need to update /usr/local/texlive/2012/texmf-dist/fonts/map/fontname/special.map?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input TeXGyreTermes-Regular
This is METAFONT, Version 2.718281 (TeX Live 2012)


kpathsea: Running mktexmf TeXGyreTermes-Regular
! I can't find file `TeXGyreTermes-Regular'.
<*> ...1; nonstopmode; input TeXGyreTermes-Regular

Please type another input file name
! Emergency stop.
<*> ...1; nonstopmode; input TeXGyreTermes-Regular

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

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

l.21 

? 

我确实有这种字体:

$ otfinfo -f /usr/local/texlive/2012/texmf-dist/fonts/opentype/public/tex-gyre/texgyretermes-regular.otf
aalt    Access All Alternates
c2sc    Small Capitals From Capitals
cpsp    Capital Spacing
dlig    Discretionary Ligatures
frac    Fractions
kern    Kerning
liga    Standard Ligatures
lnum    Lining Figures
onum    Oldstyle Figures
pnum    Proportional Figures
salt    Stylistic Alternates
size    Optical Size
smcp    Small Capitals
ss01    Stylistic Set 1
ss02    Stylistic Set 2
ss03    Stylistic Set 3
ss04    Stylistic Set 4
tnum    Tabular Figures
zero    Slashed Zero

答案1

这里(在 Windows 7 上)miktex + TL 2013 找到了 Herbert 建议的名称(TeXGyreTermes-Regular)的字体。但 TL 2012 失败了。TL 2012 似乎只有在使用文件名时才会在 texmf 树中找到字体(系统字体可以很好地处理字体名称):

\documentclass[]{article}
\usepackage{fontspec}
\begin{document}
\fontspec{texgyretermes-regular.otf}   blub
\fontspec{Times New Roman} blub
\end{document}

我不知道 TL 2012 的这种行为是否是新的。

答案2

使用

\usepackage{ifxetex,fontspec}
\providecommand\lsCoverTitleFont[1]{#1}
\ifxetex
  \renewcommand\lsCoverTitleFont[1]{{\fontspec[LetterSpace=-2.0]{TeXGyreTermes-Regular}%   
  \fontshape{sc}\fontsize{52pt}{16.75mm}\selectfont #1}}
\fi

或全名字体

\fontspec[LetterSpace=-2.0]{texgyretermes-regular.otf}% 

相关内容