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

mono italic won't print?? #144

Closed
dmurdoch opened this issue Sep 30, 2023 · 3 comments
Closed

mono italic won't print?? #144

dmurdoch opened this issue Sep 30, 2023 · 3 comments

Comments

@dmurdoch
Copy link

Here's a strange bug on my Mac:

doit <- function() {
  text <- c("mono 1", "mono 2", "mono 3", "mono 4")
  plot(1:4, 1:4, type="n")
  text(2, 1:4, text, family="mono", font=1:4)
  dev.off()
}

agg_png("test.png")
doit()

This produces this plot:
test

The same thing happens with other agg_* devices, but not the standard devices, e.g.

png("test.png")
doit()

produces this:
test

Here's my session info:

> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Toronto
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] ragg_1.2.5 rgl_1.2.6 

loaded via a namespace (and not attached):
 [1] digest_0.6.33     R6_2.5.1          base64enc_0.1-3  
 [4] fastmap_1.1.1     xfun_0.40         extrafont_0.19   
 [7] magrittr_2.0.3    knitr_1.44.1      htmltools_0.5.6  
[10] rmarkdown_2.25    cli_3.6.1         textshaping_0.3.6
[13] systemfonts_1.0.4 compiler_4.3.1    rstudioapi_0.15.0
[16] tools_4.3.1       extrafontdb_1.0   evaluate_0.22    
[19] yaml_2.3.7        Rttf2pt1_1.3.12   rlang_1.1.1      
[22] jsonlite_1.8.7    htmlwidgets_1.6.2
@thomasp85
Copy link
Member

This seems related to r-lib/systemfonts#105, however ragg is using textshaping so maybe not...

I can reproduce and will investigate

@thomasp85
Copy link
Member

No, this is definitely related. Freetype is throwing the same 130 error when trying to load the glyph - however, AGG simply ignores the glyph in this case so nothing is plottet

@thomasp85
Copy link
Member

This will get fixed with r-lib/systemfonts#105

I'll close here as this is a systemfonts issue (though it really is a FreeType/Courier issue)

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

No branches or pull requests

2 participants