Graphics Reference
In-Depth Information
Figure 14-3. Left: 6×6 inch image at 75 ppi; right: 3×3 inch image at 150 ppi
Using Fonts in PDF Files
Problem
You want to use fonts other than the basic ones provided by R in a PDF file.
Solution
The extrafont package can be used to create PDF files with different fonts.
There are a number of steps involved, beginning with some one-time setup. Download and install
Ghostscript , then run the following in R:
install.packages( "extrafont" )
library(extrafont)
# Find and save information about fonts installed on your system
font_import()
# List the fonts
fonts()
After the one-time setup is done, there are tasks you need to do in each R session:
library(extrafont)
# Register the fonts with R
loadfonts()
Search WWH ::




Custom Search