Closed guokai8 closed 5 years ago
I have the same issue. For me , I think it's related to the use of custom fonts?
This occurs when I knit an rmarkdown file with one of my code chunks set to use "CairoPDF" as the device for my ggplot object which is using a custom theme with a custom font (i.e. ggpubr::theme_pubclean(base_family = "Roboto Condensed Light")
. Re-knitting with the ggplot set as theme_minimal()
gives no errors. I already tried re-installing the font and re-installing the extrafont
package, as well as re-installing Cairo via homebrew.
Not sure if this helps narrow down the problem, but just wanted to flag.
Same issue here when rendering an .Rmd, in my case it's related to the Fira Sans
font in ggplot themes (via https://github.com/hrbrmstr/firasans) – I reran extrafont::font_import()
and reinstalled magick
as well, no change.
I hope the issue can be identified soon, because this current outcome is making me very sad.
sessioninfo::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#> setting value
#> version R version 3.6.0 (2019-04-26)
#> os macOS Mojave 10.14.5
#> system x86_64, darwin15.6.0
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Berlin
#> date 2019-07-04
#>
#> ─ Packages ──────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0)
#> cli 1.1.0 2019-03-19 [1] CRAN (R 3.6.0)
#> crayon 1.3.4 2017-09-16 [1] CRAN (R 3.6.0)
#> digest 0.6.19 2019-05-20 [1] CRAN (R 3.6.0)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 3.6.0)
#> highr 0.8 2019-03-20 [1] CRAN (R 3.6.0)
#> htmltools 0.3.6 2017-04-28 [1] CRAN (R 3.6.0)
#> knitr 1.23 2019-05-18 [1] CRAN (R 3.6.0)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 3.6.0)
#> Rcpp 1.0.1 2019-03-17 [1] CRAN (R 3.6.0)
#> rmarkdown 1.13 2019-05-22 [1] CRAN (R 3.6.0)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.6.0)
#> stringi 1.4.3 2019-03-12 [1] CRAN (R 3.6.0)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 3.6.0)
#> withr 2.1.2 2018-03-15 [1] CRAN (R 3.6.0)
#> xfun 0.8 2019-06-25 [1] CRAN (R 3.6.0)
#> yaml 2.2.0 2018-07-25 [1] CRAN (R 3.6.0)
#>
#> [1] /Users/Lukas/Library/R/3.6
#> [2] /Library/Frameworks/R.framework/Versions/3.6/Resources/library
Created on 2019-07-04 by the reprex package (v0.3.0)
Hi All, I fix the issue by moving the fonts as fonts.bk.
cd /Library/Frameworks/R.framework/Versions/3.6/Resources/library/magick/etc/
mv fonts fonts.bk
Then all the errors are gone. Kai
This makes the error messages disappear but doesn't fix the plot output, which I'd wager is the actual issue (at least in my case).
@jemus42 did you install the cairo?
> library(magick)
Linking to ImageMagick 6.9.9.39
Enabled features: cairo, fontconfig, freetype, lcms, pango, rsvg, webp
Disabled features: fftw, ghostscript, x11
After I mv the fonts to fonts.bk. Everything goes well in my case
Welp, works now, thanks!
Could anyone give me a script to reproduce this problem?
Hi, I met the issue with "Fontconfig error: Cannot load default config file". I reinstall magick but it seems the issue is still there. Here are the errors:
Here are the sessionInfo
Thanks! Kai