Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Cairo::CairoPNG on Windows #35

Closed
cpsievert opened this issue May 21, 2020 · 3 comments
Closed

Support for Cairo::CairoPNG on Windows #35

cpsievert opened this issue May 21, 2020 · 3 comments

Comments

@cpsievert
Copy link
Contributor

@cpsievert cpsievert commented May 21, 2020

I see the following on Windows:

library(showtext)
font_add_google("Lobster", "lobster")

showtext_auto()

Cairo::CairoPNG("test.png")
plot(1, pch = 16, cex = 3)
#> Error in .Call("showtext_cairo_device_bitmap", PACKAGE = "showtext") : 
#>  "showtext_cairo_device_bitmap" not available for .Call() for package "showtext"
text(1, 1.1, "A fancy dot", family = "lobster", col = "steelblue", cex = 3)
dev.off()
file.show("test.png")

image

> devtools::session_info()
- Session info ------------------------------------------------------
 setting  value                       
 version  R version 3.6.2 (2019-12-12)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/Chicago             
 date     2020-05-21                  

- Packages ----------------------------------------------------------
 package     * version date       lib source                          
 assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.6.2)                  
 backports     1.1.7   2020-05-13 [1] CRAN (R 3.6.3)                  
 Cairo         1.5-12  2020-04-11 [1] CRAN (R 3.6.3)                  
 callr         3.4.3   2020-03-28 [1] CRAN (R 3.6.3)                  
 cli           2.0.2   2020-02-28 [1] CRAN (R 3.6.3)                  
 crayon        1.3.4   2017-09-16 [1] CRAN (R 3.6.2)                  
 curl          4.3     2019-12-02 [1] CRAN (R 3.6.2)                  
 desc          1.2.0   2018-05-01 [1] CRAN (R 3.6.2)                  
 devtools      2.3.0   2020-04-10 [1] CRAN (R 3.6.3)                  
 digest        0.6.25  2020-02-23 [1] CRAN (R 3.6.3)                  
 ellipsis      0.3.1   2020-05-15 [1] CRAN (R 3.6.2)                  
 fansi         0.4.1   2020-01-08 [1] CRAN (R 3.6.2)                  
 fs            1.4.1   2020-04-04 [1] CRAN (R 3.6.3)                  
 glue          1.4.1   2020-05-13 [1] CRAN (R 3.6.2)                  
 jsonlite      1.6.1   2020-02-02 [1] CRAN (R 3.6.2)                  
 magrittr      1.5     2014-11-22 [1] CRAN (R 3.6.2)                  
 memoise       1.1.0   2017-04-21 [1] CRAN (R 3.6.2)                  
 packrat       0.5.0   2018-11-14 [1] CRAN (R 3.6.3)                  
 pkgbuild      1.0.8   2020-05-07 [1] CRAN (R 3.6.3)                  
 pkgload       1.0.2   2018-10-29 [1] CRAN (R 3.6.2)                  
 prettyunits   1.1.1   2020-01-24 [1] CRAN (R 3.6.2)                  
 processx      3.4.2   2020-02-09 [1] CRAN (R 3.6.2)                  
 ps            1.3.3   2020-05-08 [1] CRAN (R 3.6.3)                  
 R6            2.4.1   2019-11-12 [1] CRAN (R 3.6.2)                  
 remotes       2.1.1   2020-02-15 [1] CRAN (R 3.6.2)                  
 rlang         0.4.6   2020-05-02 [1] CRAN (R 3.6.3)                  
 rprojroot     1.3-2   2018-01-03 [1] CRAN (R 3.6.2)                  
 rstudioapi    0.11    2020-02-07 [1] CRAN (R 3.6.2)                  
 sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 3.6.2)                  
 showtext    * 0.8     2020-05-21 [1] Github (yixuan/showtext@5af3fed)
 showtextdb  * 2.0     2017-09-11 [1] CRAN (R 3.6.3)                  
 sysfonts    * 0.8.1   2020-05-08 [1] CRAN (R 3.6.3)                  
 testthat      2.3.2   2020-03-02 [1] CRAN (R 3.6.3)                  
 usethis       1.6.1   2020-04-29 [1] CRAN (R 3.6.3)                  
 withr         2.2.0   2020-04-20 [1] CRAN (R 3.6.3)                  

[1] C:/Users/Carson Sievert/Documents/R/win-library/3.6
[2] C:/Program Files/R/R-3.6.2/library
@yixuan
Copy link
Owner

@yixuan yixuan commented May 21, 2020

Oops, it is a bug on Windows. It has been fixed in 05cf3b9, but I may not be able to submit it to CRAN until next month.

@cpsievert
Copy link
Contributor Author

@cpsievert cpsievert commented May 21, 2020

Thanks! Can confirm that fixes the issue.

BTW, in case it's CRAN policy making you wait on another release, I've found that, recently, they've been much more willing to accept patch releases within 1-3 weeks of a previous release

@cpsievert cpsievert closed this May 21, 2020
@yixuan
Copy link
Owner

@yixuan yixuan commented May 22, 2020

I see. I'll try later. Thanks for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.