Reputation: 639
I have the following fonts listed when I run names(pdfFonts())
> names(pdfFonts())
[1] "serif" "sans" "mono" "AvantGarde" "Bookman"
[6] "Courier" "Helvetica" "Helvetica-Narrow" "NewCenturySchoolbook" "Palatino"
[11] "Times" "URWGothic" "URWBookman" "NimbusMon" "NimbusSan"
[16] "URWHelvetica" "NimbusSanCond" "CenturySch" "URWPalladio" "NimbusRom"
[21] "URWTimes" "ArialMT" "Japan1" "Japan1HeiMin" "Japan1GothicBBB"
[26] "Japan1Ryumin" "Korea1" "Korea1deb" "CNS1" "GB1"
[31] ".Keyboard" "Andale Mono" "AppleMyungjo" "Arial Black" "Arial Narrow"
[36] "Arial Rounded MT Bold" "Arial Unicode MS" "Batang" "Bodoni Ornaments" "Bodoni 72 Smallcaps"
[41] "Bookshelf Symbol 7" "Calibri" "Cambria" "Cambria Math" "Candara"
[46] "Comic Sans MS" "Consolas" "Constantia" "Corbel" "Courier New"
[51] "Franklin Gothic Book" "Franklin Gothic Medium" "Gabriola" "Georgia" "Gill Sans MT"
[56] "Gulim" "Impact" "Khmer Sangam MN" "Lao Sangam MN" "Lucida Console"
[61] "Lucida Sans Unicode" "Luminari" "Marlett" "Meiryo" "Microsoft Yi Baiti"
[66] "Microsoft Himalaya" "Microsoft Sans Serif" "Microsoft Tai Le" "MingLiU_HKSCS-ExtB" "MingLiU_HKSCS"
[71] "MingLiU" "MingLiU-ExtB" "Mongolian Baiti" "MS Gothic" "MS Mincho"
[76] "MS PGothic" "MS PMincho" "MS Reference Sans Serif" "MS Reference Specialty" "Palatino Linotype"
[81] "Perpetua" "PMingLiU" "PMingLiU-ExtB" "SimHei" "SimSun"
[86] "SimSun-ExtB" "Tahoma" "Trattatello" "Trebuchet MS" "Tw Cen MT"
[91] "Webdings"
I would like to use 'Verdana' while writing to pdf files in R.
I am using the following command to specify font for pdfs
pdf("abc.pdf",height = 11, width = 8.5,family = "Helvetica")
The fonts on my computer include Verdana
fonts()
[66] "Trattatello" "Trebuchet MS" "Tw Cen MT" "Verdana" "Webdings"
[71] "Wingdings" "Wingdings 2" "Wingdings 3"
Upvotes: 0
Views: 2159
Reputation: 639
The problem was caused because the installation of R was detecting duplicate fonts for Verdana Bold/Italic and was skipping adding Verdana to the pdffonts when I ran load_fonts()
from the extrafonts package
so I removed all Verdana fonts from my computer and reinstalled them. Then followed the steps on Readme for extrafonts package and that solved the problem
Upvotes: 1