[Windows] grDevices::cairo_pdf fails to map certain font families (vs Cairo::CairoPDF)
Dear Ivan, I apologize for skipping the Bugzilla "inspection" and R-devel testing phase (I had only limited access to a Windows machine). However, my colleague just installed R-devel, and cairo_pdf() works like a charm again! Many thanks for resolving this ? I know it was driving people mad for several months! Best, Jan ?t 15. 1. 2026 v 21:39 odes?latel Ivan Krylov <ikrylov at disroot.org> napsal:
Dear Jan Net?k, Thank you for providing an easily reproduced example! ? Thu, 15 Jan 2026 15:15:56 +0100 Jan Net?k <netikja at gmail.com> ?????:
On Windows, grDevices::cairo_pdf() fails to render specific installed fonts (falling back to Helvetica/Arial), whereas Cairo::CairoPDF() locates and renders the exact same font correctly.
This seems to be fixed in both R-devel and the Cairo package on CRAN: https://bugs.r-project.org/show_bug.cgi?id=18955 (I've tried your example and it works in R-to-be-4.6.0, but not R-4.5.) -- Best regards, Ivan