[RkWard-devel] RKWard and other encondings

I. Soumpasis nono.231 at gmail.com
Wed Feb 14 20:05:35 UTC 2007


Hi,

I made some testings and here are the first results.

First we have to start rkward as said above with

LC_ALL=el_GR.ISO-8859-7 rkward

Then we have to declare some fonts eg

kerkis <- X11Font("-aegean-*-*-*-*-*-*-*-*-*-*-*-*-*")
X11Fonts(kerkis=kerkis)

To plot we have to declare using

par(famliy="kerkis")

Plots can be copied to output (meaning in png). I can not "print" the graph
to ps or pdf, because it says that font family does not exists, even if I
have already declared, because it does not have an option family. Declaring
families for ps and pdf is done like this

kerkis <- Type1Font("Kerkis",
c("/usr/share/fonts/X11/Type1/kerkis/Kerkis.afm",
"/usr/share/fonts/X11/Type1/kerkis/Kerkis-Bold.afm",
"/usr/share/fonts/X11/Type1/kerkis/Kerkis-BoldItalic.afm",
"/usr/share/fonts/X11/Type1/kerkis/Kerkis-Italic.afm"))
postscriptFonts(kerkis=kerkis)
pdfFonts(kerkis=kerkis)

according to Paul Murrell and Brian Ripley. Non-standard fonts in PostScript
and PDF graphics. R News, 6(2):41-47, May
2006.<http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf>So
functions postscript and pdf can be used.

Thus generally rkward can be used as an IDE to R.

Problem is with plugins where the par(family="kerkis") must be set.

By default R can plot with three types of fonts, sans (Helvetica), serif
(Times) and mono (Courier), according to Paul Murrell and Brian Ripley.
Non-standard fonts in PostScript and PDF graphics. R News, 6(2):41-47, May
2006. <http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf><http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf>Should
we give the user a plot option for all plots to choose with what fonts to
plot?

Another problem I found is that output window is set to (utf8) enconding and
cannot display the iso88597 results right. If I open rk_out.html with
firefox and set enconding to iso88597 it is displayed properly (see the
attached rk_out.html). Is there a way to give a choice to the user to select
the enconding view? Does the output window uses konqueror to show the
output?

I think that the above will be useful to users with other languages with
weird fonts like cyrrilic.

What is your opinion on  the above?

I attach a sample file with some results.

Regards,
Ilias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20070214/47c1c79a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _rk_out_gr.tar.gz
Type: application/x-gzip
Size: 11633 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20070214/47c1c79a/attachment.gz>


More information about the Rkward-devel mailing list