[Rd] Undocumented 4.2.0 changes in grid text handling?

Jan Netík net|kj@ @end|ng |rom gm@||@com
Fri Apr 22 11:10:34 CEST 2022


Thanks for the clarification and assurance! The issue is now solved, it was
indeed caused by fontface par removal in the new R version.

I agree that this change is somewhat internal and I would have not reported
that in my package changelog necessarily, but maybe in the base R packages
even this change is welcomed in the news. Many packages are build around
grid (and on the rest of base R, obviously) and while this change would
certainly not bother any "endpoint" user, it has an impact, as we have
seen. Moreover, in ?grid::gpar, it seems that fontface par is preferable
and font is somewhat legacy, which you could potentially understand like
the fontface is in use and font is translated into fontface par.

Anyway, many thanks for your work on R graphics not only for the 4.2.0!

Best,
Jan

Dne pá 22. 4. 2022 3:44 uživatel Paul Murrell <paul using stat.auckland.ac.nz>
napsal:

> Hi
>
>  From the github issue discussion, it looks like you have detected the
> problem, which appears to be that 'gridtext' was paying attention to
> gp$fontface, whereas 'grid' internally focuses on gp$font.
>
> I created the problem for 'gridtext' by "tidying up" and removing
> gp$fontface internally.  Apologies for that.
>
> I think I can partially hide behind the fact that these are internal
> details to 'grid', which is why the change was not documented in the
> places that you point out.
>
> Please let me know if you still think that there is an error in 'grid'
> that needs fixing.
>
> Paul
>
> On 22/04/2022 3:38 am, Jan Netík wrote:
> > Hello everyone,
> >
> > I've been testing R 4.2.0 release candidates for some time and have
> spotted
> > a few changes that are not documented in
> >
> https://svn.r-project.org/R/branches/R-4-2-branch/src/library/grid/inst/doc/changes.txt
> > <
> https://svn.r-project.org/R/branches/R-4-2-branch/src/library/grid/inst/doc/changes.txt
> >,
> > general R NEWS, nor in this blogpost
> >
> https://developer.r-project.org/Blog/public/2021/12/14/updating-graphics-devices-for-r-4.2.0/index.html
> > <
> https://developer.r-project.org/Blog/public/2021/12/14/updating-graphics-devices-for-r-4.2.0/index.html
> >
> > .
> >
> > In R 4.1.3, grid::gpar(fontface= "bold") results in a gpar "list" with
> > $fontface and (legacy?) $font entries, but in R 4.2.0, there is only
> $font.
> > In the manual, font is described only for backward compatibility.
> >
> > I think there are more possibly subtle changes around text rendering
> > because bold fontface and inter-word spacing in the package {gridtext}
> > happened to stop working, see the issue at
> > https://github.com/wilkelab/gridtext/issues/24
> > <https://github.com/wilkelab/gridtext/issues/24>.
> > Turns out it is pretty hard
> > to debug and to solve. Do you have some hints about other changes in grid
> > that could explain so different behaviour?
> >
> > Many thanks and kind regards!
> > Jan
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> > <https://stat.ethz.ch/mailman/listinfo/r-devel>
>
> --
> Dr Paul Murrell
> Department of Statistics
> The University of Auckland
> Private Bag 92019
> Auckland
> New Zealand
> 64 9 3737599 x85392
> paul using stat.auckland.ac.nz
> http://www.stat.auckland.ac.nz/~paul/
>
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list