Skip to content
Prev 62509 / 63424 Next

Creating a text-based device/output format

On 25/06/2024 10:42, David McArthur wrote:
This or r-package-devel.
With the R-Internals manual and the grDevices sources and the examples 
there.

Another possibility is to translate one of the several 'text-based' 
graphics formats already supported, including

postscript
ASCII PDF
svg
xfig
pictex

and others in packages (R2SWF devEMF httpgd tikzDevice ...).

The quality of R graphics depends heavily on the precise positioning of 
(possibly non-ASCII) text, and so font-handling is by far the hardest 
part of writing a graphics device (and I have written several). So it 
makes sense to leverage what is already done, by modifying sources or 
translating output.  This would have been easier if graphics standards 
and R-at-the-time supported UTF-8, and the lack of such support is why 
some of these have been deprecated.