Hi

On 2/12/2010 4:55 a.m., Mark Ebbert wrote:
Dear R Gurus,

I have a fairly simple problem, but I haven't been able to find the
answer on 'the google' or in the r-help archives.

I am generating plots on both Windows and OS X where I need to
guarantee that the font used is Arial. In my plot command I specify
'fontfamily="Arial"'. The problem is that on Windows I'm getting the
following warning: Warning message: In grid.Call.graphics("L_text",
as.graphicsAnnot(x$label), x$x,  : Font family not found in Windows
font database

Here is my plot call. I have not included supporting code, as I don't
believe it's necessary:
graph<-barchart(3.7,xlim=c(0,10),main="",xlab="", aspect=.1,
col=rgb(21,101,112,maxColorValue=255),scales=list(x=list(tick.number=10,tck=c(1,0),fontfamily="Arial",fontsize=10)),


panel=scorePnl,par.settings=theme.novpadding,lowCut=pgrLowCut,highCut=pgrHighCut)

In my research I've found that the default for Windows is Arial
anyway, but I should be able to specify the font without a warning. I
further checked the available fonts in the windows font database by
using 'windowsFonts()' and found an entry for 'TT Arial', however,
specifying 'TT Arial' produces the same error.

Any help is appreciated.

If you want to be sure of getting Arial, you could specify an explicit Windows Font mapping, for example, ...

windowsFonts(Arial=windowsFont("TT Arial"))
barchart(1, scales=list(x=list(fontfamily="Arial")))

Paul

Mark T. W. Ebbert ______________________________________________
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.

--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
p...@stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
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