我无法让小写字母与 XeLaTeX 中的任何字体兼容。以下输出分别说明了 Charis SIL、Garuda 和 Times New Roman 的问题。下面粘贴的是 MWE 以及版本和软件包信息。
最小工作示例:
\listfiles
\documentclass{article}
\usepackage{fontspec,xunicode,xltxtra}
\def\sample{The quick brown fox jumped.}
\begin{document}\Large
\fontspec{Charis SIL}
Normal\hfil\sample\par
\textsc{Small Caps\hfil\sample}\par
\textbf{Boldface\hfil\sample}\par
\textit{Italics\hfil\sample}\par\medskip
\hfil\rule{6cm}{5mm}\hfil\par
\fontspec{Garuda}
Normal\hfil\sample\par
\textsc{Small Caps\hfil\sample}\par
\textbf{Boldface\hfil\sample}\par
\textit{Italics\hfil\sample}\par\medskip
\hfil\rule{6cm}{5mm}\hfil\par
\fontspec{Times New Roman}
Normal\hfil\sample\par
\textsc{Small Caps\hfil\sample}\par
\textbf{Boldface\hfil\sample}\par
\textit{Italics\hfil\sample}\par
\end{document}
\listfiles
输出:
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
fontspec.sty 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX
expl3.sty 2013/07/28 v4582 L3 Experimental code bundle wrapper
l3names.sty 2012/12/07 v4346 L3 Namespace for primitives
l3bootstrap.sty 2013/07/28 v4581 L3 Experimental bootstrap code
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty 2013/07/28 v4581 L3 Basic definitions
l3expan.sty 2013/07/24 v4565 L3 Argument expansion
l3tl.sty 2013/07/28 v4581 L3 Token lists
l3seq.sty 2013/07/28 v4581 L3 Sequences and stacks
l3int.sty 2013/07/28 v4581 L3 Integers
l3quark.sty 2013/07/21 v4564 L3 Quarks
l3prg.sty 2013/07/28 v4581 L3 Control structures
l3clist.sty 2013/07/28 v4581 L3 Comma separated lists
l3token.sty 2013/07/28 v4581 L3 Experimental token manipulation
l3prop.sty 2013/07/28 v4581 L3 Property lists
l3msg.sty 2013/07/28 v4581 L3 Messages
l3file.sty 2013/07/28 v4581 L3 File and I/O operations
l3skip.sty 2013/07/28 v4581 L3 Dimensions and skips
l3keys.sty 2013/07/28 v4581 L3 Experimental key-value interfaces
l3fp.sty 2013/07/09 v4521 L3 Floating points
l3box.sty 2013/07/28 v4581 L3 Experimental boxes
l3coffins.sty 2012/09/09 v4212 L3 Coffin code layer
l3color.sty 2012/08/29 v4156 L3 Experimental color support
l3luatex.sty 2013/07/28 v4581 L3 Experimental LuaTeX-specific functions
l3candidates.sty 2013/07/24 v4576 L3 Experimental additions to l3kernel
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
xparse.sty 2013/07/28 v4582 L3 Experimental document command parser
fontspec-patches.sty 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTe
X
fixltx2e.sty 2006/09/13 v1.1m fixes to LaTeX
fontspec-xetex.sty 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX
fontenc.sty
eu1enc.def 2010/05/27 v0.1h Experimental Unicode font encodings
eu1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty 2011/09/09 v0.981 provides access to latin accents and many oth
er characters in Unicode lower plane
eu1lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
xetex.def 2013/04/29 v0.96 LaTeX color/graphics driver for XeTeX (RRM/JK)
fontspec.cfg
xltxtra.sty 2010/09/20 v0.5e Improvements for the "XeLaTeX" format
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
realscripts.sty 2013/03/18 v0.3c Access OpenType subscripts and superscripts
metalogo.sty 2010/05/29 v0.12 Extended TeX logo macros
t3cmr.fd 2001/12/31 TIPA font definitions
最后,我的操作系统和 TeX 发行版的版本信息:
XeTeX 3.1415926-2.5-0.9999.3-2013060708 (TeX Live 2013)
kpathsea version 6.1.1
Copyright 2013 SIL International and Jonathan Kew.
There is NO warranty. Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 51.1; using 51.1
Compiled with zlib version 1.2.7; using 1.2.7
Compiled with FreeType2 version 2.4.11; using 2.4.11
Compiled with Graphite2 version 1.2.1; using 1.2.1
Compiled with HarfBuzz version 0.9.15; using 0.9.15
Compiled with fontconfig version 2.10.93; using 2.8.0
Compiled with libpng version 1.5.16; using 1.5.16
Compiled with poppler version 0.22.2
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
答案1
对于 Charis SIL,请尝试使用Renderer=ICU
。从此邮件列表帖子
Charis SIL 是一种混合 OpenType/Graphite 字体,在 0.9998 中选择了 OpenType,但在 0.9999 中选择了 Graphite(对 OpenType 和 Graphite 使用 HarfBuzz 的副作用)我还没有决定是否将其视为错误或功能。
无论如何,对于这种混合字体,最好明确说明要使用哪种字体技术,添加“Renderer=ICU”将强制使用 OpenType 布局(现在应该重命名为“Renderer=OT”,但它仍然有效)。
Windows XP 附带的 Times New Roman 版本没有任何小型大写字母,但 Windows 8.1 附带的版本有小型大写字母,并且可以与 XeTeX 完美兼容(不知道其他版本的字体是否如此)。
但对 Garuda 一无所知。
答案2
我不知道 Garuda 的情况,但 Charis SIL 肯定没有小写字母。Times New Roman 取决于系统上安装的实际字体,但 Mac OS X 提供的字体也没有小写字母。事实上,我收到了消息
LaTeX Font Warning: Font shape `EU1/CharisSIL(0)/m/sc' undefined
(Font) using `EU1/CharisSIL(0)/m/n' instead on input line 9.
LaTeX Font Warning: Font shape `EU1/TimesNewRoman(0)/m/sc' undefined
(Font) using `EU1/TimesNewRoman(0)/m/n' instead on input line 23.
意思正是如此。
在某些情况下你可以找到替代品,例如 TeX Gyre Termes 有小型大写字母:
\documentclass{article}
\usepackage{fontspec}
\newcommand\sample{The quick brown fox jumped.}
\begin{document}
\fontspec[
SmallCapsFont=TeX Gyre Termes,
SmallCapsFeatures={Letters=SmallCaps},
]{Times New Roman}
\begin{tabular}{ll}
Normal &\sample\\
\textsc{Small Caps} &\textsc{\sample}\\
\textbf{Boldface} &\textbf{\sample}\\
\textit{Italics} &\textit{\sample}
\end{tabular}
\end{document}
对于 Charis Sil,我认为你无法解决缺少小型大写字母变体的问题。
答案3
旧帖子,但我本周遇到了同样的问题:使用 XeLaTeX,Times New Roman 和 Arial(Ubuntu 18.04)中没有小写字母。我在 Windows 上也检查了我的最小示例,小写字母没有问题。
对于 Times New Roman 和 Arial,我通过将较新版本的字体(从我的 Windows 笔记本电脑和互联网上获取)复制到 解决了该问题/usr/share/fonts/truetype/msttcorefonts
。文件夹中的文件来自 2000 年甚至更早。