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
When a style uses a font family created using systemfonts::register_font(), that font is not picked up in text elements in ggplot2 created using element_marquee() - see first plot in reprex below. When the same font file is used directly by referring to the family found in the system font list, it is used correctly in the text element - see second plot. At the same time, plain ggplot2 does pick up the family name created via register_font() - see third plot.
Reprex below was created on MacOS but the same occurs on Ubuntu.
The workaround is to install the fonts on the system, but that is much less convenient and not always feasible.
Reprex
library(ggplot2)
library(marquee)
library(systemfonts)
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, union
library(ragg)
When a style uses a font family created using
systemfonts::register_font()
, that font is not picked up in text elements in ggplot2 created usingelement_marquee()
- see first plot in reprex below. When the same font file is used directly by referring to the family found in the system font list, it is used correctly in the text element - see second plot. At the same time, plain ggplot2 does pick up the family name created viaregister_font()
- see third plot.Reprex below was created on MacOS but the same occurs on Ubuntu.
The workaround is to install the fonts on the system, but that is much less convenient and not always feasible.
Reprex
Created on 2024-09-19 with reprex v2.1.1
Session info
The text was updated successfully, but these errors were encountered: