[RkWard-devel] RKWard and other encondings
I. Soumpasis
nono.231 at gmail.com
Fri Feb 16 06:43:44 UTC 2007
2007/2/15, Thomas Friedrichsmeier <thomas.friedrichsmeier at ruhr-uni-bochum.de
>:
>
> On Thursday 15 February 2007 17:24, I. Soumpasis wrote:
> > For postscript/pdffonts, there is no option like getOption(), and I got
> to
> > the last resort declaring in Helvetica with the kerkis fonts (greek
> fonts)
> > (it is done just for the session). Much better now, having working pdf,
> > postscript, dev.print. But for now I face problems with dev.copy, and
> > dev2bitmap, and bitmap. I think the bitmap has a different way to work
> with
> > ghostscript, but I will check.
>
> Oh dear. I guess the reason is this (but have not investigated):
> dev2bitmap()
> (and bitmap()) first creates a postscript device in the usual way. The
> postscript is then sent to ghostscript in a separate process. Probably
> that
> process simply does not know about the fonts used in R at all, and hence
> we're back to square one. Currently, I have no idea, on how this could
> reasonably be approached at all.
That is what I believe. I wil look to it.
> It could be done in the future, but I do not know what problems we may
> > face. if we give a family option to par, and try to print the graph on a
> > device we can get to some problems. Example:
> >
> > par(family="sans")
> > z<-1:10
> > barplot(z, main="Title", sub="subtitle")
> > dev.print(device=pdf, file="~/Desktop/print.pdf")
> >
> > The last works well, but trying Device>Print does not work giving the
> > message:
> >
> > Error in dev.copy(device = function (file = ifelse(onefile, "Rplots.ps
> ", :
> > family 'sans' not included in PostScript device
>
> This example works, here. "sans" (and "mono", "serif" should be defined
> for
> all devices). Are you sure, this wasn't caused by some of your experiments
> with the device fonts?
>
> But of course the underlying problem is in fact: Each font needs to be
> defined
> for all devices. That's to a large part, what really makes it so hard to
> deal
> with.
>
> 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:
$sans
$family
[1] "Helvetica"
$metrics
[1] "Helvetica.afm" "Helvetica-Bold.afm"
[3] "Helvetica-Oblique.afm" "Helvetica-BoldOblique.afm"
[5] "Symbol.afm"
$encoding
[1] "default"
attr(,"class")
[1] "Type1Font"
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.
Regards,
Ilias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20070216/6a0f5441/attachment.html>
More information about the Rkward-devel
mailing list