[R] Font family not found in Windows font database
Mark Ebbert
Mark.Ebbert at hci.utah.edu
Wed Dec 1 16:55:00 CET 2010
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.
Mark T. W. Ebbert
More information about the R-help
mailing list