code

Useful Utilities

Embed Fonts in PDF Figures generated using ggsave are not guaranteed to embed into the file. Although R comes with utility function (in the grDevices) embedFonts() and the extraFonts has a function embed_fonts() for the same purpose. However, sometimes both still fail to embed the font into the document. This blog plot provides a much more robust solution based on ghostscript, which is only accessible via the command line interface.