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

Font is embeded, but i can not document properly #99

Open
msgoussi opened this issue May 13, 2023 · 0 comments
Open

Font is embeded, but i can not document properly #99

msgoussi opened this issue May 13, 2023 · 0 comments

Comments

@msgoussi
Copy link

msgoussi commented May 13, 2023

Hi.. When I run the below the code, and open pdf file, the font is not embeded. Please advise

Sys.setenv(R_GSCMD = "C:/GhostScript/gs10.01.1/bin/gswin64c.exe")

library(extrafont)

extrafont::font_import()

Register the fonts with R

loadfonts(device = "all")

library(ggplot2)

ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point() +
ggtitle("Title text goes here") +
theme(text = element_text(size = 16, family = "Impact"))

ggsave("myplot.pdf", width = 4, height = 4)

embed_fonts("myplot.pdf")

image

image

however when i used
ggsave("myplot.pdf", width = 4, height = 4, device = cairo_pdf)

it works perfectly

@msgoussi msgoussi changed the title Embed_fonts is not working properly Font is embeded, but i can not document properly May 13, 2023
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

No branches or pull requests

1 participant