summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fontspec/fontspec-doc-fontsel.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-01-24 03:00:54 +0000
committerNorbert Preining <norbert@preining.info>2020-01-24 03:00:54 +0000
commite1192611f0655a1ccaff0dff2f53c7c65fa5db07 (patch)
tree232f5be17a2221a57cc6515bfe8692772b3a3e89 /macros/latex/contrib/fontspec/fontspec-doc-fontsel.tex
parentf7e5d81fe9880913485f7f8c541eeca7adf4c195 (diff)
CTAN sync 202001240300
Diffstat (limited to 'macros/latex/contrib/fontspec/fontspec-doc-fontsel.tex')
-rw-r--r--macros/latex/contrib/fontspec/fontspec-doc-fontsel.tex19
1 files changed, 5 insertions, 14 deletions
diff --git a/macros/latex/contrib/fontspec/fontspec-doc-fontsel.tex b/macros/latex/contrib/fontspec/fontspec-doc-fontsel.tex
index 884dd409b8..85ad1ea75d 100644
--- a/macros/latex/contrib/fontspec/fontspec-doc-fontsel.tex
+++ b/macros/latex/contrib/fontspec/fontspec-doc-fontsel.tex
@@ -390,6 +390,8 @@ feature is provided.
When a font family has both slanted \emph{and} italic shapes, these may be specified separately using the analogous features \feat{SlantedFont} and \feat{BoldSlantedFont}.
Without these, however, the \LaTeX\ font switches for slanted (\cs{textsl}, \cs{slshape}) will default to the italic shape.
+For modern OpenType fonts, small caps glyphs are included within a fontface and \pkg{fontspec} will automatically detect them
+for use with the \cs{textsc} and \cs{scshape} commands.
Pre-OpenType, it was common for font families to be distributed with small caps glyphs in separate fonts, due to the limitations on the number of glyphs allowed in the PostScript Type~1 format.
Such fonts may be used by declaring the \feat{SmallCapsFont} of the family you are specifying:
\begin{Verbatim}
@@ -398,8 +400,8 @@ Such fonts may be used by declaring the \feat{SmallCapsFont} of the family you a
]
Roman 123 \\ \textsc{Small caps 456}
\end{Verbatim}
-In fact, you should specify the small caps font for each individual bold and
-italic shape as in
+In fact, this example is overly simplistic since it does not cover the other shapes in a font family.
+You should specify the small caps font for each individual bold and italic shape as in
\begin{Verbatim}
\setmainfont{ <upright> }[
UprightFeatures = { SmallCapsFont={ <sc> } } ,
@@ -440,7 +442,7 @@ In certain cases it is desirable to be able to choose this internal font family
\end{Verbatim}
To select a font for use in this way in \pkg{fontspec} use the \feat{NFSSFamily} feature:\footnote{Thanks to Luca Fascione for the example and motivation for finally implementing this feature.}
\begin{Verbatim}
- \newfontfamily\verbatimfont[NFSSFamily=myverbatimfont]{Inconsolata}
+ \newfontfamily\verbatimfont{Inconsolata}[NFSSFamily=myverbatimfont]
\end{Verbatim}
It is then possible to write commands such as:
\begin{Verbatim}
@@ -602,17 +604,6 @@ I hope this doesn't cause any problems.
\end{Verbatim}
if you really felt like it and both sets of features would be applied.
- \item
- Following standard \pkg{xparse} behaviour, there must be no space before the opening bracket; writing
- \begin{Verbatim*}
-\fontspec{myfont.otf} [Color=red]
- \end{Verbatim*}
- will result in |[Color=red]| not being recognised an argument and therefore it will be typeset as text. When breaking over lines, write either of:
- \begin{Verbatim}
- \fontspec{myfont.otf}% \fontspec{myfont.otf}[
- [Color=red] Color=Red]
- \end{Verbatim}
-
\end{enumerate}
\paragraph{Spaces}