postscriptFonts          package:grDevices          R Documentation

_P_o_s_t_S_c_r_i_p_t _F_o_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     These functions handle the translation of a device-independent R
     graphics font family name to a PostScript font description, used
     by both the 'postscript' and 'pdf' graphics devices.

_U_s_a_g_e:

     postscriptFont(family, metrics, encoding = "default")

     postscriptFonts(...)       

_A_r_g_u_m_e_n_t_s:

  family: a character string giving the name of an Adobe Type 1 font
          family.

 metrics: a vector of four or five strings giving paths to the afm
          (font metric) files for the Type 1 font.

encoding: the name of an encoding file.  Defaults to '"default"', which
          maps to "ISOLatin1.enc" Otherwise, a file name in the 'afm'
          directory of the 'grDevices' package, which is used if the
          path does not contain a path separator.  An extension
          '".enc"' can be omitted.

     ...: either character strings naming mappings to display, or new
          (named) mappings to define.

_D_e_t_a_i_l_s:

     A PostScript device is created with a default font (see the
     documentation for 'postscript'), but it is also possible to
     specify a font family when drawing to the device (for example, see
     the documentation for 'gpar' in the grid package). The font
     mechanism is shared with the 'pdf' device.

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

     The 'postscriptFonts' function can be used to list existing
     translations and to define new mappings.  The 'postscriptFont'
     function can be used to create a new mapping.

     The argument 'family' specifies the font family to be used.
     Default mappings are provided for four device-independent family
     names: '"sans"' for a sans-serif font, '"serif"' for a serif font,
     '"mono"' for a monospaced font, and '"symbol"' for a symbol font.

     Mappings for a number of standard Adobe fonts (and URW
     equivalents) are also provided: '"AvantGarde"', '"Bookman"',
     '"Courier"', '"Helvetica"', '"Helvetica-Narrow"',
     '"NewCenturySchoolbook"', '"Palatino"' and '"Times"';
     '"URWGothic"', '"URWBookman"', '"NimbusMon"', '"NimbusSan"'
     (synonym '"URWHelvetica"'), '"NimbusSanCond"', '"CenturySch"',
     '"URWPalladio"' and '"NimbusRom"' (synonym '"URWTimes"').

     There is also a mapping for '"ComputerModern"'.

     The specification of font metrics and encodings is described in
     the help for the 'postscript' function.

     The fonts are not embedded in the resulting PostScript file, so
     software including the PostScript plot file should either embed
     the font outlines (usually from '.pfb' or '.pfa' files) or use DSC
     comments to instruct the print spooler to do so.

_V_a_l_u_e:

     'postscriptFont' returns a PostScript font description.

     'postscriptFonts' returns one or more font mappings.

_A_u_t_h_o_r(_s):

     Support for Computer Modern fonts is based on a contribution by
     Brian D'Urso durso@hussle.harvard.edu.

_S_e_e _A_l_s_o:

     'postscript'

_E_x_a_m_p_l_e_s:

     postscriptFonts()
     CMitalic <- postscriptFont("ComputerModern",
                                c("CM_regular_10.afm", "CM_boldx_10.afm",
                                  "cmti10.afm", "cmbxti10.afm",
                                  "CM_symbol_10.afm"))
     postscriptFonts(CMitalic=CMitalic)

