[R] [Follow-up] Re: PLoS, Arial, R linux

2009-11-19 Thread Ted Harding
See Addendum at end.

On 19-Nov-09 12:17:54, Ted Harding wrote:
 On 19-Nov-09 11:52:57, Deepayan Sarkar wrote:
 On Thu, Nov 19, 2009 at 4:30 PM, Ted Harding
 ted.hard...@manchester.ac.uk wrote:
 Greetings All.
 According to the PLoS (Public Library of Science) Guidelines
 for Figure preparation, if a figure is submitted as EPS rather
 than TIFF then Figure text must be in Arial font -- see:

 [1]
 http://www.plosntds.org/static/figureGuidelines.action#text

 and also other sections in that web-page

 [2]
 http://www.plosntds.org/static/figureGuidelines.action

 Now, Arial font is not (as a rule) available in Linux, and
 EPS diagrams prepared using R graphics will call for Helvetica
 (by default). Of course the Helvetica family is very similar to
 Arial, but the in-file font references will call for Helvetica
 so a production system which is expecting calls for Arial may
 be thrown off the rails by an EPS file which calls for Helvetica.

 While there is a section (Enable the use of Arial in R) in the
 
 The fact that there is such a section suggests that they accept the
 resulting files, doesn't it?
 
 Guidelines (URL [2]), the instructions assume the presence of
 Arial .ttf files, not usually the case with Linux.
 
 But easy enough to fix (completely legally, thanks to a licensing
 oversight by Microsoft):
 
 http://corefonts.sourceforge.net/
 
 In Debian (and I assume Ubuntu):
 
 $ sudo apt-get install msttcorefonts
 
 -Deepayan
 
 Many thanks, Deepayan! I wasn't aware of that route.
 Using synaptic on Debian (Etch), with Search: msttcorefonts
 the font files were installed quite painlessly. I now have:
 
 /usr/share/fonts/truetype/msttcorefonts/arialbd.ttf
 /usr/share/fonts/truetype/msttcorefonts/arialbi.ttf
 /usr/share/fonts/truetype/msttcorefonts/ariali.ttf
 /usr/share/fonts/truetype/msttcorefonts/arial.ttf
 
 so should be able to make progress as described in the Guidelines.
 Ted.

Addendum:

Well, the fonts were installed as above, indeed. However, according
to the PLoS Guidelines one must generate .afm files before using
them in R, along the lines of:

  First, convert the Arial .ttf files to afm:

  ttf2afm /usr/share/fonts/msttcorefonts/arial.ttf  ~/arial.afm
  ttf2afm /usr/share/fonts/msttcorefonts/ariali.ttf  ~/ariali.afm
  ttf2afm /usr/share/fonts/msttcorefonts/arialbd.ttf  ~/arialbd.afm
  ttf2afm /usr/share/fonts/msttcorefonts/arialbi.ttf  ~/arialbi.afm

and then one can use them in R's postscript() with the family
argument on the lines of

  postscript(file=try.ps, horizontal=F, onefile=F, width=4, height=4,
family=c(/home/stephen/arial.afm, /home/stephen/arialbd.afm,
/home/stephen/ariali.afm, /home/stephen/arialbi.afm),
pointsize=12)

However,
(a) I do not have the 'ttf2afm' program;
(b) Synaptic cannot find it in the repositories.

So, I'm off on another hunt!
Ted.


E-Mail: (Ted Harding) ted.hard...@manchester.ac.uk
Fax-to-email: +44 (0)870 094 0861
Date: 19-Nov-09   Time: 12:58:32
-- XFMail --

__
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.


[R] [Follow-up] Re: PLoS, Arial, R linux

2009-11-19 Thread Dirk Eddelbuettel

On 19 November 2009 at 13:00, (Ted Harding) wrote:
| However,
| (a) I do not have the 'ttf2afm' program;
| (b) Synaptic cannot find it in the repositories.
| 
| So, I'm off on another hunt!

i)   You should try to get over the 'Synaptic is the only interface to
 package' syndrome. It limits your ability to use your system to the 
 fullest.

ii)  E.g. consider http://packages.debian.org/ which has the handy shortcut
 http://packages.debian.org/file:path for the search for paths ending in 
 the keyword.

iii) This was another question for r-sig-debian, not r-help

iv)  You want the texlive-font-utils package as per ii) and
 
http://packages.debian.org/search?searchon=contentskeywords=ttf2afmmode=filenamesuite=unstablearch=any

Dirk

-- 
Three out of two people have difficulties with fractions.

__
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.


Re: [R] [Follow-up] Re: PLoS, Arial, R linux

2009-11-19 Thread Liviu Andronic
On 11/19/09, Ted Harding ted.hard...@manchester.ac.uk wrote:
  However,
  (a) I do not have the 'ttf2afm' program;
  (b) Synaptic cannot find it in the repositories.

http://packages.debian.org/search?searchon=contentskeywords=ttf2afmmode=exactfilenamesuite=testingarch=any

Liviu

__
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.


Re: [R] [Follow-up] Re: PLoS, Arial, R linux

2009-11-19 Thread Frank E Harrell Jr

Also see of the journal will let you use NimbusSan:

pdf('my.pdf', onefile=FALSE, pointsize=18,
family=NimbusSan,height=6,width=8,paper=special)
...
dev.off()
embedFonts('my.pdf')

Frank

Dirk Eddelbuettel wrote:

On 19 November 2009 at 13:00, (Ted Harding) wrote:
| However,
| (a) I do not have the 'ttf2afm' program;
| (b) Synaptic cannot find it in the repositories.
| 
| So, I'm off on another hunt!


i)   You should try to get over the 'Synaptic is the only interface to
 package' syndrome. It limits your ability to use your system to the 
 fullest.


ii)  E.g. consider http://packages.debian.org/ which has the handy shortcut
 http://packages.debian.org/file:path for the search for paths ending in 
 the keyword.


iii) This was another question for r-sig-debian, not r-help

iv)  You want the texlive-font-utils package as per ii) and
 
http://packages.debian.org/search?searchon=contentskeywords=ttf2afmmode=filenamesuite=unstablearch=any

Dirk




--
Frank E Harrell Jr   Professor and Chair   School of Medicine
 Department of Biostatistics   Vanderbilt University

__
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.