Rev 75118 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/grDevices/man/x11Fonts.Rd% Part of the R package, https://www.R-project.org% Copyright 1995-2018 R Core Team% Distributed under GPL 2 or later\name{X11Fonts}\alias{X11Font}\alias{X11Fonts}\concept{fonts}\title{X11 Fonts}\description{These functions handle the translation of a device-independent R graphicsfont family name to an X11 font description on Unix-alike platforms.}\usage{X11Font(font)X11Fonts(...)}\arguments{\item{font}{a character string containing an X11 font description.}\item{\dots}{either character strings naming mappings to display,or new (named) mappings to define.}}\details{These functions apply only to an \code{\link{X11}} device with\code{type = "Xlib"} -- \code{X11(type = "cairo")} uses a differentmechanism to select fonts.Such a device is created with a default font (seethe documentation for \code{\link{X11}}), but it is also possibleto specify a font family when drawing to the device (for example, seethe documentation for \code{"family"} in \code{\link{par}} and for\code{"fontfamily"} in \code{\link{gpar}} in the \pkg{grid} package).The font family sent to the device is a simple string name, which must bemapped to something more specific to X11 fonts. A list ofmappings is maintained and can be modified by the user.The \code{X11Fonts} function can be used to list existingmappings 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 familynames: \code{"sans"} for a sans-serif font, \code{"serif"} for a seriffont and \code{"mono"} for a monospaced font. Further mappings areprovided for \code{"Helvetica"} (the device default), \code{"Times"},\code{"CyrHelvetica"}, \code{"CyrTimes"} (versions of these fonts withCyrillic support, at least on Linux), \code{"Arial"} (on someplatforms including macOS and Solaris) and \code{"Mincho"} (a CJKfont).}\seealso{\code{\link{X11}}}\note{Available only when \code{\link{capabilities}()[["X11"]]} is true.}\examples{## IGNORE_RDIFF_BEGINif(capabilities()[["X11"]]) withAutoprint({X11Fonts()X11Fonts("mono")utopia <- X11Font("-*-utopia-*-*-*-*-*-*-*-*-*-*-*-*")X11Fonts(utopia = utopia)})## IGNORE_RDIFF_END}\keyword{device}