davidgohel / rvg

https://davidgohel.github.io/rvg/
132 stars 15 forks source link

Misaligned text in PowerPoint / RStudio Server #45

Closed pteridin closed 2 years ago

pteridin commented 2 years ago

ggplot2 text fields exported into PowerPoint in RStudio server are misaligned. image This does not happen in a local RStudio installation.

Text is fixed when manually applying "right click" > "format shape..." > "text options" > "whatever that option may be called" image

Would suggest making that format option the default for every text exported into PowerPoint documents via RVG. This would also makes it much easier to edit text after export into pptx files.

davidgohel commented 2 years ago

Could you provide a reproducible example? (use reprex if possible with session info details)

I suspect you did not pay attention to the font you are using on the Server and if the font is available on the computer. This because a linux server often comes with only one single font.

See first paragraphs here: https://davidgohel.github.io/rvg/articles/offcran/customizing.html

pteridin commented 2 years ago

Ah, okay. Spacing and position is calculated based on font - when the font is not available on Windows or on the Server (Linux) the alignment is off? Then I would suggest that you are ideed right. Will test it probably next week.

Thank you so much for these great packages and the support!

pteridin commented 2 years ago

Fixed Installing the fonts fixed the problem. See the description of @davidgohel