在下面的程式碼中,追蹤與libertine
字體,但不與Alegreya
字體。這是為什麼?
\documentclass{article}
\usepackage[tracking = true, letterspace = 100]{microtype}
\usepackage{libertine} % <- tracking works with small caps
%\usepackage{Alegreya} % <- tracking does not work with small caps
\begin{document}
\textls{ABCD} \textsc{abcd} \textls{\textit{ABCD \textsc{abcd}}}
\end{document}
浪蕩子:
阿萊格雷亞:
答案1
Alegreya 小型大寫字母是一個系列,而不是一個形狀,因此 microtype 的預設設定不會影響它們。您必須自行啟動追蹤:
\documentclass{article}
\usepackage[tracking = true, letterspace = 500]{microtype}
\usepackage{Alegreya} % <- tracking does not work with small caps
\DeclareMicrotypeSet*[tracking]{alegreyasc}
{ font = */AlegreyaSC-TLF/*/*/* }
\begin{document}
\textit{ABCD} \textsc{abcd}
\end{document}
答案2
您可以使用該otfinfo
命令查找有關特定 OpenType 或 TrueType 字體的資訊。特別是,使用該-f
標誌來尋找它所支援的功能。
與 Libertine(即 OpenType)相比,Alegreya 字型(即 TrueType)的羅馬版本似乎不具有小型大寫字母。因此,您看到的小型大寫字母本身不受字體支援。
我不是字體方面的專家,我無法告訴你為什麼這會對microtype
.如果添加\textls
,它也適用於 Alegreya。
比較:
$ otfinfo -f /usr/local/texlive/2014/texmf-dist/fonts/opentype/public/libertine/LinLibertine_R.otf
aalt Access All Alternates
c2sc Small Capitals From Capitals
case Case-Sensitive Forms
ccmp Glyph Composition/Decomposition
cpsp Capital Spacing
dlig Discretionary Ligatures
fina Terminal Forms
frac Fractions
hlig Historical Ligatures
kern Kerning
lfbd Left Bounds
liga Standard Ligatures
lnum Lining Figures
mark Mark Positioning
mkmk Mark to Mark Positioning
nalt Alternate Annotation Forms
onum Oldstyle Figures
pnum Proportional Figures
rtbd Right Bounds
salt Stylistic Alternates
sinf Scientific Inferiors
smcp Small Capitals
ss01 Stylistic Set 1
ss02 Stylistic Set 2
ss03 Stylistic Set 3
ss04 Stylistic Set 4
ss05 Stylistic Set 5
ss06 Stylistic Set 6
sups Superscript
tnum Tabular Figures
zero Slashed Zero
和:
$ otfinfo -f /usr/local/texlive/2014/texmf-dist/fonts/truetype/huerta/alegreya/Alegreya-Regular.ttf
cpsp Capital Spacing
dnom Denominators
frac Fractions
liga Standard Ligatures
lnum Lining Figures
numr Numerators
onum Oldstyle Figures
pnum Proportional Figures
sinf Scientific Inferiors
sups Superscript
tnum Tabular Figures
答案3
隨著新版本的Alegreya
,其中 的定義\scshape
已更改為更妥善處理,追蹤將開箱即用,無需\DeclareMicrotypeSet
像烏爾里克的回答。
\documentclass{article}
\usepackage[tracking = true, letterspace = 100]{microtype}
\usepackage{Alegreya} % <- tracking now works with small caps
\begin{document}
\textls{ABCD} \textsc{abcd} \textls{\textit{ABCD \textsc{abcd}}}
\end{document}