[Rd] Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?
|uc@r @end|ng |rom |edor@project@org
Mon Mar 30 23:12:48 CEST 2020
On Mon, 30 Mar 2020 at 22:41, Paul Murrell <paul using stat.auckland.ac.nz> wrote:
> On 30/03/20 10:43 pm, Iñaki Ucar wrote:
> > On Mon, 30 Mar 2020 at 04:24, Paul Murrell <paul using stat.auckland.ac.nz> wrote:
> >> Hi
> >> I have created an R branch that contains a potential fix ...
> >> https://svn.r-project.org/R/branches/R-symfam/
> >> This allows, for example, ...
> >> cairo_pdf(symbolfamily="OpenSymbol")
> >> ... to specify that the OpenSymbol family should be used as the "symbol"
> >> font (e.g., for "plotmath") in R.
> > Will this be a default on Linux? Or are you planning any mechanism
> > (env variable, option...) to make it the default? Because, otherwise,
> > as pango is updated across distributions, R graphics will be "broken"
> > by default unless the user explicitly calls the graphics device in
> > that way to set that option, which I would say is uncommon.
> Good question. Currently, for x11() (and png() etc) the default is
> taken from X11.options(). So it is possible to set this default for a
> session, or even for an installation via one of the ?Startup mechanisms
> (e.g., an R_HOME/etc/Rprofile.site file).
> For svg(), cairo_pdf(), and cairo_ps(), the default is hard-coded in the
> function arguments, but I *think* they are used less as default graphics
> Another option would be to try to detect Fedora and set the default
> X11.options() differently there. Two problems: I am not sure there is
> a reliable R code chunk for detecting Fedora (sessionInfo()$running?)
> let alone Fedora >= 30; what to set the default to? (just has to be a
> font with a good Unicode coverage that is pretty much guaranteed to be
> in a default Fedora install).
As per Nicolas' comment (I failed to include him in CC in my last
email, and he's not in this list, sorry for that) any font installed
by default would have good symbol coverage, so there's really no need
to set a different font for symbols. According again to Nicolas (he's
one of the font experts in Fedora), the "sans-serif" or "monospace"
fontconfig defaults would work out of the box, and if a symbol is not
available, fontconfig should fallback gracefully to another font.
So maybe instead of a new "symbolfamily" argument, maybe it's better
to just use the "family" for all characters, including symbols, on
Linux, and fontconfig should take care of everything (if I understood
correctly your explanation, Nicolas; please correct me if I'm wrong).
More information about the R-devel