When I use the postscript with the ComputerModernItalic family, minus signs are 
not properly displayed, but are changed into capital gammas.   The attached 
test-postscript.pdf file illustrates the problem, which I created starting with 
the following R code:

> postscript("test-postscript.eps", family = "ComputerModernItalic")
> plot(seq(-5,5,1),seq(-5,5,1))
> dev.off()

I then created the attached .pdf file from the .eps file using the Preview 
application on a MacBook Pro (see below for details about my R session).  I 
have also attempted to create the same plot using the pdf function.  For some 
reason, pdf does not like `family = "ComputerModernItalic"', so I needed to do 
the following.

> CMitalic <- Type1Font("ComputerModern2",
+                       c("CM_regular_10.afm", "CM_boldx_10.afm",
+                         "cmti10.afm", "cmbxti10.afm",
+                         "CM_symbol_10.afm"),
+                       encoding = "TeXtext.enc")
> pdf("test-pdf.pdf", family = CMitalic)
> plot(seq(-5,5,1),seq(-5,5,1))
> dev.off()

The attached test-pdf.pdf file shows the minus signs are no longer replaced by 
capital gammas, but are now blanked out.
   For the record, I noticed this problem several years ago and have been 
hoping that it would disappear with each new release of R.  At the time that I 
first noted it, I asked a colleague to run an example on a Windows box, and the 
same problem occurred, leading me to conclude that the problem is not unique to 
Mac OS-X.  Any help or workarounds for the problem would be greatly 
appreciated!  Regards,
- Don Percival

> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_2.15.3 tools_2.15.3  




Attachment: test-postscript.pdf
Description: Adobe PDF document


Attachment: test-pdf.pdf
Description: Adobe PDF document




===========================================
d...@apl.washington.edu
Applied Physics Laboratory
Box 355640
University of Washington
Seattle, WA 98195-5640
Phones: 206-543-1368      Fax: 206-543-6785
       206-543-1300
http://faculty.washington.edu/dbp
===========================================

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to