[R] Character from Symbol Font on rgl Plot

Duncan Murdoch murdoch at stats.uwo.ca
Tue Aug 4 03:56:43 CEST 2009

On 02/08/2009 4:49 PM, Tom La Bone wrote:
> I want to print characters from the symbol font (or perhaps even Wingdings)
> in an rgl 3d plot, but I am having no luck. So, what do I have to do in
> order to get this snippet to print out a character from the symbol font?
> library(rgl)
> open3d()
> text3d(1,1,1,"a",adj=c(0.5,0.5),cex=10,family="symbol",font=1)
> I am on Windows XP with R 2.9.1.

The handling of the symbol font has changed in recent versions of R, and 
rgl hasn't kept up.  To get this to work, you need to define it yourself:

windowsFonts(symbol = windowsFont("TT Symbol"))

Then your code will work.  Wingdings would be similar.

Duncan Murdoch

More information about the R-help mailing list