Re: [Rd] proposal: 'dev.capabilities()' can also query Unicode capabilities of current graphics device

2023-09-26 Thread Ivan Krylov
On Tue, 26 Sep 2023 12:39:57 +1300 Paul Murrell wrote: > Yes, you can set up your own font and TeX installations are a good > source of Type 1 fonts. Here is an example (paths obviously specific > to my [Ubuntu 20.04] OS and TeX installation) ... Many thanks for the explanation! Your example w

[Rd] Crashes and other problems uncovered by static analysis

2023-09-26 Thread Ivan Krylov
Hello R-devel, I've been trying to see if static analysers could have caught PR18602. Surprisingly, the analysers I've tried don't seem to notice it, but they do uncover other problems. While most of these either stem from slightly too defensive programming ("condition is always true/false" warni

Re: [Rd] Tight bounding box around text in graphics?

2023-09-26 Thread Duncan Murdoch
I think this is a `ragg` device bug, so I've posted an issue there: https://github.com/r-lib/ragg/issues/143 . That issue contains slightly more detail than I included in the earlier message here. Duncan Murdoch __ R-devel@r-project.org mailing list

Re: [Rd] Tight bounding box around text in graphics?

2023-09-26 Thread Duncan Murdoch
I've done some exploring, and things aren't working out as I would have expected. Here's an example: library(grid) library(ragg) agg_png("test.png") pushViewport(viewport(gp = gpar(cex = 5))) y <- c(0.2, 0.4, 0.6) texts <- c("東京", "Tokyo", "Tokyo 東京") convertHeight(stringDesce

Re: [Rd] Tight bounding box around text in graphics?

2023-09-26 Thread Duncan Murdoch
Thanks! I said "base graphics" in my question, but I really have no objection to using grid graphics, so I'll explore those grid functions. Duncan Murdoch On 25/09/2023 3:53 p.m., Paul Murrell wrote: Hi strheight(), which is based GEStrHeight(), is pretty crude, not only ignoring descenders,