透過 LetterSpace 使用 XeTeX 進行追蹤

透過 LetterSpace 使用 XeTeX 進行追蹤

當我使用 PDFLaTeX 時,我有一個設置microtype以及小型大寫字母可用的字體(例如 \usepackage{lmodern}),

\usepackage[
protrusion=true,
expansion=true,
kerning=true,
spacing=true,
tracking=true,
factor=1100,
stretch=40,
shrink=10
]{microtype}
\SetTracking{encoding={*}, family= *, shape=fsc}{16}

我想要對 XeLaTeX 進行相同的設定(盡可能多)。我知道 XeLaTeX 只允許使用 microtype 進行突出,但我的命令中有很多\rmfamily\bfseries\scshape(用於部分等),並且我想啟用全局跟踪,就像 microtype 對 PDFLaTeX 所做的那樣。我知道我可以LetterSpace在本地完成,但是有沒有辦法一勞永逸?

答案1

這是 Linux Libertine 的方案:

\documentclass{article}
\usepackage{fontspec}

\setmainfont[
  Ligatures=TeX,
  UprightFeatures={
    SmallCapsFont={Linux Libertine O},
    SmallCapsFeatures={Letters=SmallCaps,LetterSpace=50},
  },
  BoldFeatures={
    SmallCapsFont={LinLibertineOB},
    SmallCapsFeatures={Letters=SmallCaps,LetterSpace=50},
  },
  ItalicFeatures={
    SmallCapsFont={LinLibertineOI},
    SmallCapsFeatures={Letters=SmallCaps,LetterSpace=50},
  },
  BoldItalicFeatures={
    SmallCapsFont={LinLibertineOBI},
    SmallCapsFeatures={Letters=SmallCaps,LetterSpace=50},
  },
]{Linux Libertine O}

\begin{document}

This is text and \textsc{This is in Small Caps}

Don't use the following combinations, please:

{\scshape\bfseries This is Bold Small Caps}

{\scshape\itshape This is Italic Small Caps}

{\scshape\bfseries\itshape This is Bold Italic Small Caps}

\end{document}

適應您的設定。追蹤設定為50,當然太多了,只是為了清楚地顯示效果。

在此輸入影像描述

相關內容