'ragg graphics device not rendering latex symbols

I'm having difficulty getting braces and a few other math symbols to render when I use the ragg graphics device. I'd like to use ragg to save my figures but want the braces rendered correctly. Is this a bug or am I missing an argument that would result in this getting rendered properly?

Minimal example below:

library(ragg)
library(latex2exp)

x <- TeX(r"($\left{\left(\left[\left|BRACES!\right|\right]\right)\right}$)")


agg_png("plot_ragg.png")
plot(x)
dev.off()

ragg rendered plot with boxes for symbols

Using the png device works fine but I'd prefer to use ragg for a variety of reason (in particular ggplot defaults to it, and the quality is generally better.

png("plot_png.png")
plot(x)
dev.off()

png renders braces just fine)

Session info below:

- Session info ------------------------------------------------------------------------------------------------------------------------
 setting  value
 version  R version 4.1.2 (2021-11-01)
 os       Windows 10 x64 (build 19044)
 system   x86_64, mingw32
 ui       RStudio
 language (EN)
 collate  English_United States.1252
 ctype    English_United States.1252
 tz       America/Chicago
 date     2022-03-31
 rstudio  2021.09.0+351 Ghost Orchid (desktop)
 pandoc   NA

- Packages ----------------------------------------------------------------------------------------------------------------------------
 package     * version date (UTC) lib source
 cli           3.2.0   2022-02-14 [1] CRAN (R 4.1.3)
 latex2exp   * 0.5.0   2021-03-18 [1] CRAN (R 4.1.2)
 magrittr      2.0.2   2022-01-26 [1] CRAN (R 4.1.3)
 ragg        * 1.2.1   2021-12-06 [1] CRAN (R 4.1.2)
 sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.1.2)
 stringi       1.7.6   2021-11-29 [1] CRAN (R 4.1.2)
 stringr       1.4.0   2019-02-10 [1] CRAN (R 4.1.2)
 systemfonts   1.0.3   2021-10-13 [1] CRAN (R 4.1.2)
 textshaping   0.3.6   2021-10-13 [1] CRAN (R 4.1.2)
---------------------------------------------------------------------------------------------------------------------------------------


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source