我想更改无衬线字体的字距(字符之间的间距)。我发现我可以使用 microtype 包来更改 smallcaps 字体的字距(\textsc{foo}
),但我不知道如何制作\textsc{}
无衬线字体。
答案1
您的意思是,您只想为无衬线字体“设置跟踪”?(因为我希望您不想“让”小型大写字母变成无衬线字体……相反,您应该选择包含小型大写字母样式的无衬线字体,如下例所示。)
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage[tracking=true]{microtype}
\DeclareMicrotypeSet*[tracking]{my}
{ encoding = *,
font = */sf*/*/*/*,
}
\SetTracking[
% spacing = {500*,166, }
]{
encoding = *,
family = sf*,
}{ 500 }
\SetTracking[]{encoding = *, family = rm* }{ 10 }
\SetTracking[]{encoding = *, shape = sc }{ 100 }
\def\test{I want to change the tracking (space between the characters)
for a sans serif font. I found that I can use the microtype package
to change the tracking of the smallcaps font
({\ttfamily\textbackslash textsc\{foo\}}), but I can't figure out
how to make {\ttfamily\textbackslash textsc{}} a sans serif font.}
\begin{document}
\parskip 12pt
\parindent 0pt
RM:
\test
SF:
{\sffamily\test}
SC (RM):
{\scshape\test}
SF+SC:
{\sffamily\scshape\test}
TT:
{\ttfamily\test}
\end{document}