Closed davidhodge931 closed 5 months ago
Thanks for this. It is somewhat expected and impossible to guard against. Marquee uses textshaping and systemfonts to find and place glyphs which may be different from how the graphics device works for regular text.
Can you tell me which graphics devices are in effect in the above plots?
Thanks for the explanation.
If that is the case, it'd be cool to have a function to convert all element_text elements in a theme to element_marquee, so the font within the plot looked 100% consistent.
The global settings had Cairo png
yes, especially Cairo will look a bit different. Emphasised if you are using the font aliases as these may map to a different font entirely. If you use the ragg devices it should all look pretty similar
There is now a marquefy_theme()
function as well as a bunch of fixes to make justification and margins of element_marquee more in line with element_text
Awesome, thanks!!
Something that just came to mind.. I wonder whether it'll get slightly confusing, if you spell marquefy
with one e
here.
A couple of other ideas are:
as_marquee
marquee_theme
This function will be super useful, thanks!
Wouldn't it more ideal if + theme(text = element_marquee())
would just work?
I'm not sure that is possible... How would you, as user, then have a root level marquee element but set a specific element to element_text()
For sure it isn't currently possible. But I think you could either add an inherit.class
argument or have an element_placeholder()
that just adopts the parent's class.
We can muse about this in the ggplot2 repo - this isn't really up to marquee :-)
Does the font (or font spacing) change when using
element_marquee()
?Maybe it looks ever-so-slightly different in the console and in a Rmd article - but it looks very different when the article is pushed to github.
Console without marquee
Console with marquee
pkdown Rmd article in local with marquee
pkdown Rmd article on github built website with marquee
I noticed this in this blog as well https://nrennie.rbind.io/blog/coloured-text-legend-ggplot-ggtext-marquee/