<br><br><div><span class="gmail_quote">2007/2/15, Thomas Friedrichsmeier <<a href="mailto:thomas.friedrichsmeier@ruhr-uni-bochum.de">thomas.friedrichsmeier@ruhr-uni-bochum.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thursday 15 February 2007 17:24, I. Soumpasis wrote:<br>> For postscript/pdffonts, there is no option like getOption(), and I got to<br>> the last resort declaring in Helvetica with the kerkis fonts (greek fonts)
<br>> (it is done just for the session). Much better now, having working pdf,<br>> postscript, dev.print. But for now I face problems with dev.copy, and<br>> dev2bitmap, and bitmap. I think the bitmap has a different way to work with
<br>> ghostscript, but I will check.<br><br>Oh dear. I guess the reason is this (but have not investigated): dev2bitmap()<br>(and bitmap()) first creates a postscript device in the usual way. The<br>postscript is then sent to ghostscript in a separate process. Probably that
<br>process simply does not know about the fonts used in R at all, and hence<br>we're back to square one. Currently, I have no idea, on how this could<br>reasonably be approached at all.</blockquote><div><br>That is what I believe. I wil look to it.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> It could be done in the future, but I do not know what problems we may<br>
> face. if we give a family option to par, and try to print the graph on a<br>> device we can get to some problems. Example:<br>><br>> par(family="sans")<br>> z<-1:10<br>> barplot(z, main="Title", sub="subtitle")
<br>> dev.print(device=pdf, file="~/Desktop/print.pdf")<br>><br>> The last works well, but trying Device>Print does not work giving the<br>> message:<br>><br>> Error in dev.copy(device = function (file = ifelse(onefile, "
<a href="http://Rplots.ps">Rplots.ps</a>",  :<br>>     family 'sans' not included in PostScript device<br><br>This example works, here. "sans" (and "mono", "serif" should be defined for
<br>all devices). Are you sure, this wasn't caused by some of your experiments<br>with the device fonts?<br><br>But of course the underlying problem is in fact: Each font needs to be defined<br>for all devices. That's to a large part, what really makes it so hard to deal
<br>with.<br><br></blockquote></div>This seems to me really weird, because I did not remove any fonts, and everything doing to R it is only for one session. Starting a new clean session I still have the problem, which seems to have a logic. The postscript fonts does not have a sans family, but Helvetica. From postscriptFonts we get: 
<br><br>$sans<br>$family<br>[1] "Helvetica"<br><br>$metrics<br>[1] "Helvetica.afm"             "Helvetica-Bold.afm"       <br>[3] "Helvetica-Oblique.afm"     "Helvetica-BoldOblique.afm
"<br>[5] "Symbol.afm"               <br><br>$encoding<br>[1] "default"<br><br>attr(,"class")<br>[1] "Type1Font"<br><br>So the family is Helvetica, not sans. If we do not use the par(family="sans") the plot uses Helvetica. I also tried it to a second pc with the same specifications (
ubuntu6.10, rkward.svn, R-2.4.1) with the same result.<br><br>Regards,<br>Ilias<br>