embedFonts(file, format, outfile = file,
fontpaths = character(), options = character())
file
.options="-sFONTPATH=path/to/font"
. You will need ghostscript
: the full path to the executable can
be set by the environment variable R_GSCMD
. If this is
unset, a GhostScript executable will be looked for by name on your
path: on a Unix alike "gs"
is used, and on Windows the setting
of the environment variable GSC
is used, otherwise commands
"gswi64c.exe"
then "gswin32c.exe"
are tried. The format
is by default "ps2write"
, when the original
file has a .ps
or .eps
suffix, or "pdfwrite"
when
the original file has a .pdf
suffix. For versions of
Ghostscript before 9.10, format = "pswrite"
or format =
"epswrite"
can be used: as from 9.14 format = "eps2write"
is
also available. If an invalid device is given, the error message will
list the available devices. Note that Ghostscript may do font substitution, so the font embedded
may differ from that specified in the original file. Some other options which can be useful (see your Ghostscript
documentation) are -dMaxSubsetPct=100,
-dSubsetFonts=true and -dEmbedAllFonts=true.postscriptFonts
,
Devices
. Paul Murrell and Brian Ripley (2006) Non-standard fonts in PostScript
and PDF graphics. R News, 6(2):41--47.
https://www.r-project.org/doc/Rnews/Rnews_2006-2.pdf.