Rev 37881 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{embedFonts}\alias{embedFonts}\concept{encoding}\title{Embed Fonts in PostScript and PDF}\description{Runs ghostscript to process a PDF or PostScript file andembed all fonts in the file.}\usage{embedFonts(file, format, outfile = file, fontpaths = "", options = "")}\arguments{\item{file}{a character string giving the name of the original file.}\item{format}{either \code{"pswrite"} or \code{"pdfwrite"}.If not specified, it is guessed from the suffix of \code{file}.}\item{outfile}{the name of the new file (with fonts embedded).}\item{fontpaths}{a character vector giving directories thatghostscript will search for fonts.}\item{options}{a character string containing further options toghostscript.}}\details{This function is not necessary if you just use the standarddefault fonts for PostScript and PDF output.If you use a special font, this function is useful forembedding that font in your PostScript or PDF documentso that it can be shared with others without them havingto install your special font.If the special font is not installed for ghostscript,you will need to tell ghostscript where the font is, usingsomething like \code{options="-sFONTPATH=path/to/font"}.This function relies on a suitable ghostscript executable being inyour path, or the environment variable \code{R_GSCMD} (the same as\code{\link{bitmap}}) being set as the full path to the ghostscriptexecutable.#ifdef windowsFor Windows users, this should be the path to \code{gswin32c.exe}.#endif}\value{The shell command used to invoke ghostscript is returnedinvisibly. This may be useful for debugging purposes asyou can run the command by hand in a shell to look for problems.}\seealso{\code{\link{postscriptFonts}},\code{\link{Devices}}.}\keyword{device}