\HeaderA{X11Fonts}{X11 Fonts}{X11Fonts}
\aliasA{X11Font}{X11Fonts}{X11Font}
\keyword{device}{X11Fonts}
\begin{Description}\relax
These functions handle the translation of a device-independent R graphics
font family name to an X11 font description.
\end{Description}
\begin{Usage}
\begin{verbatim}
X11Font(font)

X11Fonts(...)      
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{font}] a character string containing an X11 font description.
\item[\code{...}] either character strings naming mappings to display,
or new (named) mappings to define.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These functions apply only to an \code{\LinkA{X11}{X11}} device with
\code{type = "Xlib"} -- \code{X11(type = "Cairo"} uses a different
mechanism to select fonts.

Such a  device is created with a default font (see
the documentation for \code{\LinkA{X11}{X11}}), but it is also possible
to specify a font family when drawing to the device (for example, see
the documentation for \code{"family"} in \code{\LinkA{par}{par}} and for
\code{"fontfamily"} in \code{\LinkA{gpar}{gpar}} in the \pkg{grid} package).

The font family sent to the device is a simple string name, which must be
mapped to something more specific to X11 fonts.  A list of
mappings is maintained and can be modified by the user.

The \code{X11Fonts} function can be used to list existing
mappings and to define new mappings.  The \code{X11Font}
function can be used to create a new mapping.

Default mappings are provided for three device-independent font family
names: \code{"sans"} for a sans-serif font, \code{"serif"} for a serif
font and \code{"mono"} for a monospaced font.
\end{Details}
\begin{SeeAlso}\relax
\code{\LinkA{X11}{X11}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
X11Fonts()
X11Fonts("mono")
utopia <- X11Font("-*-utopia-*-*-*-*-*-*-*-*-*-*-*-*")
X11Fonts(utopia=utopia)
\end{ExampleCode}
\end{Examples}

