Changes

Jump to navigation Jump to search
Created page with "== To use or not to use <code>\sc</code> == Certain older commands such as <code>\sc</code> should no longer be used for fonts that provide the desired OpenType features. Thi..."
== To use or not to use <code>\sc</code> ==

Certain older commands such as <code>\sc</code> should no longer be used for fonts that provide the desired OpenType features. This is because <code>\sc</code> does not work across all sizes and weights which provide for smallcaps.

In practice, this means that <code>\sc</code> should be used only for Latin Modern or other legacy fonts that have not been updated to OpenType. See [[Small caps across styles (bold, italics, etc.)]]

== Common OpenType style switches ==

Now that OpenType fonts and the associated features are ubiquitous, ConTeXt provides a few commonly used switches that will work across all weights and sizes of the selected typeface (= bodyfont). ConTeXt provides the following out of the box:

<texcode>
\setsmallcaps
\setoldstyle
\setfractions

\style[style=smallcaps]
\style[style=oldstyle]
\style[style=fractions]
</texcode>

Here is an example of usage:

<texcode>
\startTEXpage[offset=1em]

\startlines
abcd {\setsmallcaps abcd}
12345 {\setoldstyle 12345}
1/2 {\setfractions 1/2}

abcd {\style[style=smallcaps]} abcd
12345 {\style[style=oldstyle] 12345}
1/2 {\style[style=fractions] 1/2}
\stoplines

\stopTEXpage
</texcode>

You can also define your own feature sets with {{cmd|definefontfeature}}.

See also [[Featuresets]].
67

edits

Navigation menu