Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : Polygon edge not found
ggplot2, r
Solution
this happened to me and i discovered that the arial font file had been disabled. first check to see if `Arial.ttf` has been moved to the disabled fonts directory. from the terminal:
ls /Library/Fonts\ Disabled
if so, move it back to the active fonts directory.
sudo mv /Library/Fonts\ Disabled/Arial.ttf /Library/Fonts
log out, log in, then open the 'Font Book' application. in my case, arial was present before hand, but it was the Microsoft version stored in `/Library/fonts/Microsoft/`. Font Book may now show a yellow triangle next to the font name, indicating that multiple copies of the font exist. highlight the font name and chose the `Resolve Duplicates` command from the `Edit` menu. this should disable the Microsoft copy, which you can confirm by selecting one of the arial type faces (click the expand triangle next to the font name), right-click on the one labelled `Off`, and choose `Reveal in Finder`, which should open a window to Microsoft fonts directory.
Problem
I just installed RStudio on Mac OS X, version 10.7.3. After executing the following commands ``` library(ggplot2) qplot(mpg, wt, data=mtcars) ``` I get the following error: ``` Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : Polygon edge not found In addition: Warning messages: 1: In grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : no font could be found for family "Arial" 2: In grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : no font could be found for family "Arial" ``` How do I fix this?