From 14cbb9f80a90e3bd42ffb0eb104e17e45e4278aa Mon Sep 17 00:00:00 2001 From: Philipp A Date: Fri, 16 Sep 2022 11:43:55 +0200 Subject: [PATCH 1/2] Support PDF titles --- DESCRIPTION | 4 ++-- R/repr_recordedplot.r | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9d1ff1e..0efa384 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -29,7 +29,7 @@ Imports: Suggests: methods, highr, - Cairo, + Cairo (>=1.6.1), stringr, testthat (>= 3.0.0), leaflet @@ -63,4 +63,4 @@ Collate: 'repr_spatial.r' 'repr_ts.r' 'repr_vega.r' -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.1 diff --git a/R/repr_recordedplot.r b/R/repr_recordedplot.r index ea6689e..f684273 100644 --- a/R/repr_recordedplot.r +++ b/R/repr_recordedplot.r @@ -165,7 +165,7 @@ repr_pdf.recordedplot <- function(obj, if (capabilities('aqua')) # no import since R CMD check would complain grDevices::quartz(title, width, height, pointsize, family, antialias, 'pdf', tf, bg) else if (is_cairo_installed()) - Cairo::Cairo(width, height, tf, 'pdf', pointsize, bg, 'transparent', 'in') + Cairo::Cairo(width, height, tf, 'pdf', pointsize, bg, 'transparent', 'in', title=title) else if (capabilities('cairo')) cairo_pdf(tf, width, height, pointsize, FALSE, family, bg, antialias) else From 259ec834bf9f10885fb857468b36659962174eff Mon Sep 17 00:00:00 2001 From: Philipp A Date: Fri, 16 Sep 2022 14:18:50 +0200 Subject: [PATCH 2/2] expression needs a space? --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0efa384..842943f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -29,7 +29,7 @@ Imports: Suggests: methods, highr, - Cairo (>=1.6.1), + Cairo (>= 1.6.1), stringr, testthat (>= 3.0.0), leaflet