# [NTG-context] Small caps?

Rogers, Michael K mroge02 at emory.edu
Wed Jul 25 06:59:55 CEST 2012

On Jul 24, 2012, at 10:33 PM, Shriramana Sharma wrote:

> Hi -- is there absolutely no way for obtaining these "fake small caps"
> in ConTeXT?

Here's a hack, which sort of works, definitely doesn't handle <return> -- there must be a better way.  I hope you don't mind my using your text as text. :-)

\usemodule[simplefonts]
\setmainfont[DejaVuSansCondensed]
\def\smallcaps{\begingroup\obeyspaces\let\myspace=\space\dosmallcaps}
\def\dosmallcaps#1{\dosc#1\end\endgroup}
\def\dosc#1{%
\ifx#1\end \let\next=\relax
\else\if#1\space \myspace\let\myspace=\relax% skip repeated spaces
\else\ifnum\lccode#1=#1{\tfx \uppercase{#1}}% change \tfx to your desired size
\else #1\fi
\let\myspace=\space
\fi
\let\next=\dosc
\fi\next}
\starttext
Not everyone is a
typographer to produce the appropriate fine-typography glyphs for
their favourite font to cater to a particular style. Why should the
system impose
\smallcaps{"super-duper" Typography}
on users when they are willing
to settle for less?
\smallcaps{Watch out  for
returns.}
\stoptext

Alternatively, you could settle for a font that has small caps.

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.