dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.76k stars 227 forks source link

Cyrillic text in plots is not show on PDF export. #183

Closed novica closed 2 years ago

novica commented 2 years ago

118984932-3cd91200-b93b-11eb-9614-48446a949072

When download ggplot as pdf the text is shown as dots (above).

On other apps (not using esquisse) this can be usually solved by using cairopdf. I don't know if that is a possibility with esquisse.

Alternatively I am thinking, it could be a nice workaround to have an option to select which download formats are available.

pvictor commented 2 years ago

Yes not so great, currently it does something like this in esquisse:

library(ggplot2)
p <- ggplot() + 
  labs(title = "Увезете податочен сет од околината")
p
ggsave(
  filename = "plot.pdf",
  device = "pdf",
  plot = p,
  dpi = 72,
  width = 800 / 72,
  height = 500 / 72,
  scale = 1
)

How would you do it?

pvictor commented 2 years ago

Ah ok, like this:

ggsave(
  filename = "plot.pdf",
  device = cairo_pdf,
  plot = p,
  dpi = 72,
  width = 800 / 72,
  height = 500 / 72,
  scale = 1
)