Rev 30655 | Rev 35855 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{postscriptFonts}\alias{postscriptFont}\alias{postscriptFonts}\concept{fonts}\concept{encoding}\title{PostScript Fonts}\description{These functions handle the translation of a device-independent R graphicsfont family name to a PostScript font description.}\usage{postscriptFont(family, metrics, encoding = "default")postscriptFonts(...)}\arguments{\item{family}{a character string giving the name of an Adobe Type 1font family.}\item{metrics}{a vector of four or five strings giving pathsto the afm (font metric) files for the Type 1 font.}\item{encoding}{the name of an encoding file. Defaults to#ifdef unix"ISOLatin1.enc"#endif#ifdef windows"WinAnsi.enc"#endifin the \file{R\_HOME/afm} directory, which is usedif the path does not contain a path separator. An extension\code{".enc"} can be omitted.}\item{\dots}{either character strings naming mappings to display,or new (named) mappings to define.}}\details{A PostScript device is created with a default font (seethe documentation for \code{postscript}), but it is also possibleto specify a font family when drawing to the device(for example, see the documentation for \code{gpar} in thegrid package).The font family sent to the device is a simple string name, which must bemapped to something more specific to PostScript fonts. A list ofmappings is maintained and can be modified by the user.The \code{postscriptFonts} function can be used to list existingtranslations and to define new mappings. The \code{postscriptFont}function can be used to create a new mapping.The argument \code{family} specifies the font family to be used.Default mappings are provided for fourdevice-independent family names: \code{"sans"} for asans-serif font,\code{"serif"} for a serif font, \code{"mono"} for a monospaced font,and \code{"symbol"} for a symbol font.Mappings for a number of standard Adobe fonts(and URW equivalents) are also provided:\code{"AvantGarde"},\code{"Bookman"}, \code{"Courier"}, \code{"Helvetica"},\code{"Helvetica-Narrow"}, \code{"NewCenturySchoolbook"},\code{"Palatino"} and \code{"Times"};\code{"URWGothic"}, \code{"URWBookman"}, \code{"NimbusMon"},\code{"NimbusSan"}, \code{"NimbusSanCond"}, \code{"CenturySch"},\code{"URWPalladio"} and \code{"NimbusRom"}.There is also a mapping for \code{"ComputerModern"}.The specification of font metrics and encodings is described in the helpfor the \code{postscript} function.}\value{\code{postscriptFont} returns a PostScriptfont description.\code{postscriptFonts} returns one or more font mappings.}\seealso{\code{\link{postscript}}}\author{Support for Computer Modern fonts is based on a contribution byBrian D'Urso \email{durso@hussle.harvard.edu}.}\examples{postscriptFonts()CMitalic <- postscriptFont("ComputerModern",c("CM_regular_10.afm", "CM_boldx_10.afm","cmti10.afm", "cmbxti10.afm","CM_symbol_10.afm"))postscriptFonts(CMitalic=CMitalic)}\keyword{device}