Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

14. Output for Presentation > Using Fonts in Windows Bitmap or Screen Output

Using Fonts in Windows Bitmap or Screen Output

Problem

You are using Windows and want to use fonts other than the basic ones provided by R for bitmap or screen output.

Solution

The extrafont package can be used to create bitmap or screen output. The procedure is similar to using extrafont with PDF files (Using Fonts in PDF Files). The one-time setup is almost the same, except that Ghostscript is not required:

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 for Windows
loadfonts("win")

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint