genealogy icon indicating copy to clipboard operation
genealogy copied to clipboard

PDF generating has font/library issues

Open h2rashee opened this issue 5 years ago • 3 comments

Looks like there is some R package bootstrapping issues that the script doesn't auto-handle in the pre-amble.

$ Rscript fisher_crawford.r 
Warning messages:
1: In cairo_pdf(height = 8, width = 10.5) :
  unable to load shared object '/usr/local/Cellar/r/3.6.0_3/lib/R/library/grDevices/libs//cairo.so':
  dlopen(/usr/local/Cellar/r/3.6.0_3/lib/R/library/grDevices/libs//cairo.so, 6): image not found
2: In cairo_pdf(height = 8, width = 10.5) : failed to load cairo DLL
Error in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y,  : 
  invalid font type
Calls: <Anonymous> ... drawDetails -> drawDetails.text -> grid.Call.graphics
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Execution halted

h2rashee avatar Jul 05 '19 02:07 h2rashee

It looks like you don't have cairo installed on your system, which I believe is required but cannot be installed through R. At the bottom of this page it basically says you may have to install cairo yourself on Mac: https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/cairo.html

nicolaskruchten avatar Jul 05 '19 13:07 nicolaskruchten

Heh. I did see that page but couldn't find the installation instructions. I had tried installing XQuartz but no dice.

Excuse me for being a noob at R.

h2rashee avatar Jul 05 '19 16:07 h2rashee

Hehe no problem. Unfortunately I don't have a lot of time to help debug this kind of thing at the moment... as I said this isn't particularly related to my code or to R as far as I can tell but to some dependency of a dependency.

nicolaskruchten avatar Jul 05 '19 20:07 nicolaskruchten