You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attaching the ragg package prevents one from using unicode characters in base plot() and ggplot(), as any string with unicode will be blank. However, printing a plot (with either plot() or ggplot()) before attaching ragg fixes the issue:
Thanks for the quick response! I've attached a csv with the output from systemfonts::system_fonts(). The issue occurs on both my laptop and my work computer. fonts.csv
Hi @StefanoMezzini — are you still experiencing this. If so, can I get you to provide a session info as well as let me know where you are observing the behaviour. The code snippet you provided indicates that you see it in the plot pane in RStudio / the graphics window in the R gui
Hi @thomasp85, I still have the same issue. Here is my session info before attaching ragg:
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.utf8 LC_CTYPE=English_Canada.utf8 LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Canada.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.2 tools_4.2.2
and after attaching ragg:
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.utf8 LC_CTYPE=English_Canada.utf8 LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Canada.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ragg_1.2.4
loaded via a namespace (and not attached):
[1] compiler_4.2.2 tools_4.2.2 rstudioapi_0.14 textshaping_0.3.6 systemfonts_1.0.4
If I run plot(1, xlab = '\U1D53C') first, then the session info becomes:
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.utf8 LC_CTYPE=English_Canada.utf8 LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Canada.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.2 tools_4.2.2 rstudioapi_0.14
and attaching ragg now makes it
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.utf8 LC_CTYPE=English_Canada.utf8 LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Canada.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ragg_1.2.4
loaded via a namespace (and not attached):
[1] fansi_1.0.3 assertthat_0.2.1 dplyr_1.0.10 utf8_1.2.2 grid_4.2.2 R6_2.5.1 DBI_1.1.3 lifecycle_1.0.3
[9] gtable_0.3.1 magrittr_2.0.3 scales_1.2.1 ggplot2_3.4.0 pillar_1.8.1 rlang_1.0.6 cli_3.4.1 rstudioapi_0.14
[17] generics_0.1.3 vctrs_0.5.0 textshaping_0.3.6 tools_4.2.2 glue_1.6.2 munsell_0.5.0 compiler_4.2.2 systemfonts_1.0.4
[25] pkgconfig_2.0.3 colorspace_2.0-3 tidyselect_1.2.0 tibble_3.1.8
I've attached the plots that result from the first two calls of plot() and ggplot() from the code in my first comment. I am viewing the plots in the RStudio plot pane, but I get the same issue if I call png() or pdf() after attaching ragg without running plot(1, xlab = '\U1D53C') first. However, when I try saving the image to pdf, I get the warnings
Warning messages:
1: In title(...) :
conversion failure on '𝔼 doesn't work' in 'mbcsToSbcs': dot substituted for <f0>
2: In title(...) :
conversion failure on '𝔼 doesn't work' in 'mbcsToSbcs': dot substituted for <9d>
3: In title(...) :
conversion failure on '𝔼 doesn't work' in 'mbcsToSbcs': dot substituted for <94>
4: In title(...) :
conversion failure on '𝔼 doesn't work' in 'mbcsToSbcs': dot substituted for <bc>
5: In title(...) :
conversion failure on '𝔼 doesn't work' in 'mbcsToSbcs': dot substituted for <f0>
6: In title(...) :
conversion failure on '𝔼 doesn't work' in 'mbcsToSbcs': dot substituted for <9d>
7: In title(...) :
conversion failure on '𝔼 doesn't work' in 'mbcsToSbcs': dot substituted for <94>
8: In title(...) :
conversion failure on '𝔼 doesn't work' in 'mbcsToSbcs': dot substituted for <bc>
Activity
thomasp85 commentedon Sep 30, 2022
I'm not able to reproduce this issue...
What do you get when you run
systemfonts::system_fonts()StefanoMezzini commentedon Sep 30, 2022
Thanks for the quick response! I've attached a csv with the output from
systemfonts::system_fonts(). The issue occurs on both my laptop and my work computer.fonts.csv
thomasp85 commentedon Jan 11, 2023
Hi @StefanoMezzini — are you still experiencing this. If so, can I get you to provide a session info as well as let me know where you are observing the behaviour. The code snippet you provided indicates that you see it in the plot pane in RStudio / the graphics window in the R gui
StefanoMezzini commentedon Jan 18, 2023
Hi @thomasp85, I still have the same issue. Here is my session info before attaching
ragg:and after attaching
ragg:If I run
plot(1, xlab = '\U1D53C')first, then the session info becomes:and attaching
raggnow makes itI've attached the plots that result from the first two calls of
plot()andggplot()from the code in my first comment. I am viewing the plots in the RStudio plot pane, but I get the same issue if I callpng()orpdf()after attachingraggwithout runningplot(1, xlab = '\U1D53C')first. However, when I try saving the image to pdf, I get the warningsand the pdf I attached.
thomasp85 commentedon Mar 7, 2023
So, you are experiencing issues, not with the ragg devices but with the default devices, and those issues seem to appear after you attach ragg?
StefanoMezzini commentedon Mar 9, 2023
I believe so? I am only using the default figure pane with the code in the first message, and I have updated
raggto 1.2.5.9000.thomasp85 commentedon Mar 9, 2023
And if you go into "global options">"general">"graphics", what does it say as the backend?
StefanoMezzini commentedon Mar 10, 2023
I have it set to
(Default).Windowsalso fails, andCairoandCairo PNGproduce boxes but no special characters, whileAGGsucceeds.thomasp85 commentedon Oct 6, 2023
@pmur002 this issue along with #35 is completely baffling to me
Somehow, loading textshaping interferes with the text rendering in various ways. Do you have any insight into what might cause this?
jeroen commentedon Oct 6, 2023
Can you try installing the latest dev versions and test if the problem still exists?
pmur002 commentedon Oct 9, 2023
Off the top of my head, the only thing this reminds me of is FontConfig caching producing the wrong glyphs (in a very complicated set up).
thomasp85 commentedon Oct 10, 2023
Thanks - this is unfortunately happening on windows so FontConfig doesn't play in
thomasp85 commentedon Sep 30, 2025
Fixed in latest systemfonts version