embedFonts             package:grDevices             R Documentation

_E_m_b_e_d _F_o_n_t_s _i_n _P_o_s_t_S_c_r_i_p_t _a_n_d _P_D_F

_D_e_s_c_r_i_p_t_i_o_n:

     Runs Ghostscript to process a PDF or PostScript file and embed all
     fonts in the file.

_U_s_a_g_e:

     embedFonts(file, format, outfile = file, fontpaths = "",
                options = "")

_A_r_g_u_m_e_n_t_s:

    file: a character string giving the name of the original file.

  format: either '"pswrite"' or '"pdfwrite"'. If not specified, it is
          guessed from the suffix of 'file'.

 outfile: the name of the new file (with fonts embedded).

fontpaths: a character vector giving directories that Ghostscript will
          search for fonts.

 options: a character string containing further options to Ghostscript.

_D_e_t_a_i_l_s:

     This function is not necessary if you just use the standard
     default fonts for PostScript and PDF output.

     If you use a special font, this function is useful for embedding
     that font in your PostScript or PDF document so that it can be
     shared with others without them having to install your special
     font (provided the font licence allows this).

     If the special font is not installed for Ghostscript, you will
     need to tell Ghostscript where the font is, using something like
     'options="-sFONTPATH=path/to/font"'.

     This function relies on a suitable Ghostscript executable being in
     your path, or the environment variable 'R_GSCMD' (the same as
     'bitmap') being set as the full path to the Ghostscript
     executable. This defaults to '"gs"'.

     Note that Ghostscript may do font substitution, so the font
     embedded may differ from that specified in the original file.

_V_a_l_u_e:

     The shell command used to invoke Ghostscript is returned
     invisibly. This may be useful for debugging purposes as you can
     run the command by hand in a shell to look for problems.

_S_e_e _A_l_s_o:

     'postscriptFonts', 'Devices'.

     Paul Murrell and Brian Ripley (2006) Non-standard fonts in
     PostScript and PDF graphics. _R News_, 6(2):41-47. <URL:
     http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf>.

