These functions apply only to an X11
device with
type = "Xlib"
-- X11(type = "cairo")
uses a different
mechanism to select fonts.
Such a device is created with a default font (see
the documentation for X11
), but it is also possible
to specify a font family when drawing to the device (for example, see
the documentation for "family"
in par
and for
"fontfamily"
in gpar
in the 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 X11Fonts
function can be used to list existing
mappings and to define new mappings. The X11Font
function can be used to create a new mapping.
Default mappings are provided for three device-independent font family
names: "sans"
for a sans-serif font, "serif"
for a serif
font and "mono"
for a monospaced font. Further mappings are
provided for "Helvetica"
(the device default), "Times"
,
"CyrHelvetica"
, "CyrTimes"
(versions of these fonts with
Cyrillic support, at least on Linux), "Arial"
(on some
platforms including macOS and Solaris) and "Mincho"
(a CJK
font).