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

"Tofu" when newline character is at the edge of character string #111

Closed
long39ng opened this issue Apr 13, 2022 · 2 comments · Fixed by #114
Closed

"Tofu" when newline character is at the edge of character string #111

long39ng opened this issue Apr 13, 2022 · 2 comments · Fixed by #114

Comments

@long39ng
Copy link

The ragg png device produces a "tofu" symbol when there is a newline character (\n) at the beginning or the end of a text string.

This does not happen with the Cairo png device.

library(ggplot2)

#+ dev = "ragg_png"
ggplot() +
  geom_text(aes(x = 0, y = 0, label = "\n")) +
  labs(x = "\nat the beginning", y = "at the end\n")

#+ dev = "png", dev.args = list(type = "cairo-png")
ggplot() +
  geom_text(aes(x = 0, y = 0, label = "\n")) +
  labs(x = "\nat the beginning", y = "at the end\n")

Created on 2022-04-13 by the reprex package (v2.0.1)

@thomasp85
Copy link
Member

hmm - I'm not able to reproduce this. Can you share what system you are running on?

@long39ng
Copy link
Author

Sorry for not being specific in the original description.

I have encountered this on Ubuntu 21.10 and Ubuntu 20.04.

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

Successfully merging a pull request may close this issue.

2 participants