[Rd] png() defaults to `type = "X11"` on R compiled with support for cairo (but no pango)

Trevor Davis trevor@|@d@v|@ @end|ng |rom gm@||@com
Fri Apr 1 23:55:46 CEST 2022


Dear R Team,

* I'm observing `png()` defaulting to `type = "X11"` in R compiled
   with support for "cairo" (but not compiled with pango) run
   in "vanilla" mode
* According to `help("png", package="grDevices")` :

  > The default is set by
  > ‘getOption("bitmapType")’ - the ‘out of the box’ default is
  > ‘"quartz"’ or ‘"cairo"’ where available, otherwise ‘"Xlib"’.

* "cairo" is indeed available so according to the documentation
   it should be the "out-of-the-box" default but instead
  "Xlib" is the "out-of-the-box" default.
* `X11()` also defaults to "Xlib" but `?X11` says the default is "cairo"
  only when R was built using "pangocairo" so this seems to match
  the documentation since `./configure` says there was no pango.
* Perhaps R should instead default to
 `type = "cairo"` for `X11()` and the bitmap devices
  when "cairo" is supported even if there is no "pango"?
  With `type="cairo"` I observe support for the new
  R 4.1 and R 4.2 `{grid}` graphic features
  and I avoid certain font ERRORs that hit me
  when I use `type = "X11"`.  Seems like "cairo"
  would be the better default than "X11"?

Thanks!

Trevor

p.s. Possibly relevant information:

```
> grSoftVersion()
                   cairo                  cairoFT                    pango
                "1.16.0"          "2.10.1/2.13.1"                       ""
                  libpng                     jpeg                  libtiff
                "1.6.37"                    "8.0" "LIBTIFF, Version 4.1.0"
```

Snippets from `./configure`:

```
checking whether pkg-config knows about cairo and pango... no
checking whether pkg-config knows about cairo... yes
checking whether cairo is >= 1.2 and works... yes
```
```
  Interfaces supported:        X11
  External libraries:          pcre2, readline, curl
  Additional capabilities:     PNG, JPEG, TIFF, NLS, cairo, ICU
  Options enabled:             shared BLAS, R profiling

  Capabilities skipped:
  Options not enabled:         memory profiling

  Recommended packages:        yes
```

	[[alternative HTML version deleted]]



More information about the R-devel mailing list