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

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

2023-09-25 Thread Paul Murrell
Hi 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) ... cmlgc <- Type1Font("cmlgc", rep("/usr/share/texlive/texmf-dist/fonts/afm/public/cm-lgc/fcmr6z.afm",

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

2023-09-23 Thread Ivan Krylov
On Wed, 20 Sep 2023 12:39:50 +0200 Martin Maechler wrote: > The problem is that some pdf *viewers*, > notably `evince` on Fedora Linux, for several years now, > do *not* show *some* of the UTF-8 glyphs because they do not use > the correct fonts One more problem that makes it nontrivial to use

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

2023-09-20 Thread Paul Murrell
Hi The problem is what "supports UNICODE" means. Graphics devices have a 'hasTextUTF8' boolean to indicate that ... /* Some devices can plot UTF-8 text directly without converting to the native encoding, e.g. windows(), quartz() If this flag is true, all text *not in the

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

2023-09-20 Thread Trevor Davis
> However, pdf() *does* support Unicode. When I run a simple Unicode example like: ``` f <- tempfile(fileext = ".pdf") pdf(f) # U+2655 ♥ is found in most (all?) "sans" fonts like Arial, Dejavu Sans, Arimo, etc. # However, it is not in the Latin-1 encoding grid::grid.text("\u2665") dev.off()

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

2023-09-20 Thread Martin Maechler
> Trevor Davis > on Thu, 31 Aug 2023 13:49:03 -0700 writes: > Hi, > It would be nice if `grDevices::dev.capabilities()` could also be used to > query whether the current graphics device supports Unicode. In such a case > I'd expect it to return `FALSE` if `pdf()`

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

2023-08-31 Thread Trevor Davis
Hi, It would be nice if `grDevices::dev.capabilities()` could also be used to query whether the current graphics device supports Unicode. In such a case I'd expect it to return `FALSE` if `pdf()` is the current graphics device and something else for the Cairo or Quartz devices. Thanks, Trevor