[R] Latex fonts in R graphics
KARAVASILIS GEORGE
gkaravas at ee.duth.gr
Sat Sep 11 13:18:55 CEST 2010
Hello, R users.
I am trying to embed Computer modern fonts to an R plot and I get the
following error.
CM <- Type1Font("CM",
+ c(paste("cm-lgc/fonts/afm/public/cm-lgc/",
+ c("fcmr8a.afm", "fcmb8a.afm", "fcmri8a.afm", "fcmbi8a.afm"), sep=""),
+ "./cmsyase.afm"))
> pdf("cm.pdf", width=3, height=3, family="CM")
> plot(1:length(y), y, xlab="ss", ylab=expression(x[2])) ## for any
vector y
> dev.off()
null device
1
> embedFonts("cm.pdf", outfile="cmembed.pdf",
fontpaths=c("cm-lgc/fonts/type1/public/cm-lgc", "."))
Error in embedFonts("cm.pdf", outfile = "cmembed.pdf", fontpaths =
c("cm-lgc/fonts/type1/public/cm-lgc", :
status -1 in running command 'gswin32c.exe -dNOPAUSE -dBATCH -q
-dAutoRotatePages=/None -sDEVICE=pdfwrite
-sOutputFile=C:\DOCUME~1\user\LOCALS~1\Temp\RtmpccEtgV\Rembed28163716
-sFONTPATH=cm-lgc/fonts/type1/public/cm-lgc;. cm.pdf'
In addition: Warning message:
In system(cmd) : gswin32c.exe not found
Operating system: Windows XP, SP2.
cm-lgc has been unzipped in the working directory "C:/Program
Files/R/R-2.10.1" and the AFM, PFB files are also in same directory.
Any help?
More information about the R-help
mailing list