Re: [R-pkg-devel] New CRAN checks on r-devel-windows-x86_64-new-UL and the installed fonts

2021-12-16 Thread Hiroaki Yutani
Yes, it's my fault that I didn't consider the case when no fonts are
available. I'll improve the code until the next submission to CRAN.
Thanks for your advice!

Best,
Hiroaki Yutani

2021年12月17日(金) 1:40 Tomas Kalibera :
>
>
> On 12/16/21 5:16 PM, Hiroaki Yutani wrote:
> > Thanks for the details and the suggestions. My package uses
> > systemfonts package for illustration purposes only in the examples, so
> > I'm not that desperate to find the root cause this time. I'll try
> > using winbuilder in case I need to.
>
> I see. Maybe best then making the example more robust when no fonts are
> found, on different platforms.
>
> Best
> Tomas
>
> >
> > Best,
> > Hiroaki Yutani
> >
> > 2021年12月17日(金) 0:52 Tomas Kalibera :
> >
> >>
> >> On 12/16/21 4:17 PM, Hiroaki Yutani wrote:
>  This would be an empty character vector on my Alpine Linux server as
>  well.
> >>> I see, thanks for the information. Sorry for my lack of consideration on 
> >>> this.
> >>>
>  So there are 127 *.ttf files installed, but systemfonts::system_fonts()
>  does not find any of these.
> >>> Thanks for investigating quickly! Then, it seems I should wait for the
> >>> problem to be solved on systemfonts' side. I'm curious what's the
> >>> difference between r-devel-windows-x86_64-new-TK, on which the check
> >>> doesn't fail, by the way.
> >> It is also Windows Server 2022 with GUI, a quite fresh installation. The
> >> checks run in a docker container (also WS2022,
> >> mcr.microsoft.com/windows/server:ltsc2022, without any manually
> >> installed fonts).
> >>
> >> Actually there is no manually installed software there, all that is
> >> installed is (in this order):
> >>
> >> https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt/r/setup_miktex_standalone.ps1
> >> https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt3/r/setup.ps1
> >> https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt3/r_packages/setup_checks.ps1
> >>
> >> plus R and R packages.
> >>
> >> I assume you can reproduce on Winbuilder, and so perhaps you could
> >> create a version of your package with a lot of instrumentation/print
> >> messages and submit there to find the cause? Possibly also an
> >> instrumented variant of systemfonts.
> >>
> >> Best
> >> Tomas
> >>
> >>> Best,
> >>> Hiroaki Yutani
> >>>
> >>> 2021年12月16日(木) 23:57 Uwe Ligges :
> 
>  On 16.12.2021 15:34, Sebastian Meyer wrote:
> > Am 16.12.21 um 15:06 schrieb Hiroaki Yutani:
> >> Hi,
> >>
> >> My package is failing on CRAN check on r-devel-windows-x86_64-new-UL.
> >>
> >> https://cran.r-project.org/web/checks/check_results_string2path.html
> >>
> >> It seems the problem is that there is no available font that meets the
> >> condition in the following code. Is it irrational to assume at least
> >> one TrueType or OpenType font is installed in the system?
> >>
> >>available_fonts <- systemfonts::system_fonts()$path
> >>
> >># string2path supports only TrueType or OpenType formats
> >>ttf_or_otf <- available_fonts[grepl("\\.(ttf|otf)$",
> >> available_fonts)]
> >>
>  The machine that is running " r-devel-windows-x86_64-new-UL" is a
>  freshly installed Windows Server 2022 with GUI. The standard fonts are
>  available, but no extra fonts isntalled.
> 
>  To confirm:
> 
> > table(gsub(".*\\.(.{3})$", "\\1", dir("c:/WIndows/fonts")))
> 
>  dat fon ini ttc ttf xml
>   1 192   1  16 127   1
> 
> 
>  So there are 127 *.ttf files installed, but systemfonts::system_fonts()
>  does not find any of these.
> 
>  Best,
>  Uwe Ligges
> 
> 
> 
> 
> 
> > This would be an empty character vector on my Alpine Linux server as
> > well. The system_fonts() there only contain ".pcf.gz" files from
> > "/usr/share/fonts/misc/".
> >
> > Note that the "systemfonts" package on which you rely currently also
> > fails on that CRAN check flavour for a similar reason
> > (https://cran.r-project.org/web/checks/check_results_systemfonts.html).
> > On my Alpine Linux system, from example("register_font",
> > package="systemfonts"):
> >
> > fonts <- system_fonts()
> > plain <- sample(which(!fonts$italic & fonts$weight <= 'normal'), 1)
> > bold <- sample(which(!fonts$italic & fonts$weight > 'normal'), 1)
> > italic <- sample(which(fonts$italic & fonts$weight <= 'normal'), 1)
> > ## Error in sample.int(length(x), size, replace, prob) :
> > ##   invalid first argument
> >
> > (as there are no italic fonts).
> >
> > HTH,
> >
> >Sebastian Meyer
> >
> >> I'm wondering if I need to release a new version to avoid this test
> >> failure. Note that, the other Windows r-devel machine
> >> (r-devel-windows-x86_64-new-TK) doesn't fail. So, it might be just
> >> that something is wrong with 

Re: [R-pkg-devel] New CRAN checks on r-devel-windows-x86_64-new-UL and the installed fonts

2021-12-16 Thread Hiroaki Yutani
Thanks for the details and the suggestions. My package uses
systemfonts package for illustration purposes only in the examples, so
I'm not that desperate to find the root cause this time. I'll try
using winbuilder in case I need to.

Best,
Hiroaki Yutani

2021年12月17日(金) 0:52 Tomas Kalibera :

>
>
> On 12/16/21 4:17 PM, Hiroaki Yutani wrote:
> >> This would be an empty character vector on my Alpine Linux server as
> >> well.
> > I see, thanks for the information. Sorry for my lack of consideration on 
> > this.
> >
> >> So there are 127 *.ttf files installed, but systemfonts::system_fonts()
> >> does not find any of these.
> > Thanks for investigating quickly! Then, it seems I should wait for the
> > problem to be solved on systemfonts' side. I'm curious what's the
> > difference between r-devel-windows-x86_64-new-TK, on which the check
> > doesn't fail, by the way.
>
> It is also Windows Server 2022 with GUI, a quite fresh installation. The
> checks run in a docker container (also WS2022,
> mcr.microsoft.com/windows/server:ltsc2022, without any manually
> installed fonts).
>
> Actually there is no manually installed software there, all that is
> installed is (in this order):
>
> https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt/r/setup_miktex_standalone.ps1
> https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt3/r/setup.ps1
> https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt3/r_packages/setup_checks.ps1
>
> plus R and R packages.
>
> I assume you can reproduce on Winbuilder, and so perhaps you could
> create a version of your package with a lot of instrumentation/print
> messages and submit there to find the cause? Possibly also an
> instrumented variant of systemfonts.
>
> Best
> Tomas
>
> >
> > Best,
> > Hiroaki Yutani
> >
> > 2021年12月16日(木) 23:57 Uwe Ligges :
> >>
> >>
> >> On 16.12.2021 15:34, Sebastian Meyer wrote:
> >>> Am 16.12.21 um 15:06 schrieb Hiroaki Yutani:
>  Hi,
> 
>  My package is failing on CRAN check on r-devel-windows-x86_64-new-UL.
> 
>  https://cran.r-project.org/web/checks/check_results_string2path.html
> 
>  It seems the problem is that there is no available font that meets the
>  condition in the following code. Is it irrational to assume at least
>  one TrueType or OpenType font is installed in the system?
> 
>    available_fonts <- systemfonts::system_fonts()$path
> 
>    # string2path supports only TrueType or OpenType formats
>    ttf_or_otf <- available_fonts[grepl("\\.(ttf|otf)$",
>  available_fonts)]
> 
> >> The machine that is running " r-devel-windows-x86_64-new-UL" is a
> >> freshly installed Windows Server 2022 with GUI. The standard fonts are
> >> available, but no extra fonts isntalled.
> >>
> >> To confirm:
> >>
> >>   > table(gsub(".*\\.(.{3})$", "\\1", dir("c:/WIndows/fonts")))
> >>
> >> dat fon ini ttc ttf xml
> >> 1 192   1  16 127   1
> >>
> >>
> >> So there are 127 *.ttf files installed, but systemfonts::system_fonts()
> >> does not find any of these.
> >>
> >> Best,
> >> Uwe Ligges
> >>
> >>
> >>
> >>
> >>
> >>> This would be an empty character vector on my Alpine Linux server as
> >>> well. The system_fonts() there only contain ".pcf.gz" files from
> >>> "/usr/share/fonts/misc/".
> >>>
> >>> Note that the "systemfonts" package on which you rely currently also
> >>> fails on that CRAN check flavour for a similar reason
> >>> (https://cran.r-project.org/web/checks/check_results_systemfonts.html).
> >>> On my Alpine Linux system, from example("register_font",
> >>> package="systemfonts"):
> >>>
> >>> fonts <- system_fonts()
> >>> plain <- sample(which(!fonts$italic & fonts$weight <= 'normal'), 1)
> >>> bold <- sample(which(!fonts$italic & fonts$weight > 'normal'), 1)
> >>> italic <- sample(which(fonts$italic & fonts$weight <= 'normal'), 1)
> >>> ## Error in sample.int(length(x), size, replace, prob) :
> >>> ##   invalid first argument
> >>>
> >>> (as there are no italic fonts).
> >>>
> >>> HTH,
> >>>
> >>>   Sebastian Meyer
> >>>
>  I'm wondering if I need to release a new version to avoid this test
>  failure. Note that, the other Windows r-devel machine
>  (r-devel-windows-x86_64-new-TK) doesn't fail. So, it might be just
>  that something is wrong with r-devel-windows-x86_64-new-UL.
> 
>  Any suggestions?
> 
>  Best,
>  Hiroaki Yutani
> 
>  __
>  R-package-devel@r-project.org mailing list
>  https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 
> >>> __
> >>> R-package-devel@r-project.org mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel

__

Re: [R-pkg-devel] New CRAN checks on r-devel-windows-x86_64-new-UL and the installed fonts

2021-12-16 Thread Tomas Kalibera



On 12/16/21 4:17 PM, Hiroaki Yutani wrote:

This would be an empty character vector on my Alpine Linux server as
well.

I see, thanks for the information. Sorry for my lack of consideration on this.


So there are 127 *.ttf files installed, but systemfonts::system_fonts()
does not find any of these.

Thanks for investigating quickly! Then, it seems I should wait for the
problem to be solved on systemfonts' side. I'm curious what's the
difference between r-devel-windows-x86_64-new-TK, on which the check
doesn't fail, by the way.


It is also Windows Server 2022 with GUI, a quite fresh installation. The 
checks run in a docker container (also WS2022, 
mcr.microsoft.com/windows/server:ltsc2022, without any manually 
installed fonts).


Actually there is no manually installed software there, all that is 
installed is (in this order):


https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt/r/setup_miktex_standalone.ps1
https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt3/r/setup.ps1
https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt3/r_packages/setup_checks.ps1

plus R and R packages.

I assume you can reproduce on Winbuilder, and so perhaps you could 
create a version of your package with a lot of instrumentation/print 
messages and submit there to find the cause? Possibly also an 
instrumented variant of systemfonts.


Best
Tomas



Best,
Hiroaki Yutani

2021年12月16日(木) 23:57 Uwe Ligges :



On 16.12.2021 15:34, Sebastian Meyer wrote:

Am 16.12.21 um 15:06 schrieb Hiroaki Yutani:

Hi,

My package is failing on CRAN check on r-devel-windows-x86_64-new-UL.

https://cran.r-project.org/web/checks/check_results_string2path.html

It seems the problem is that there is no available font that meets the
condition in the following code. Is it irrational to assume at least
one TrueType or OpenType font is installed in the system?

  available_fonts <- systemfonts::system_fonts()$path

  # string2path supports only TrueType or OpenType formats
  ttf_or_otf <- available_fonts[grepl("\\.(ttf|otf)$",
available_fonts)]


The machine that is running " r-devel-windows-x86_64-new-UL" is a
freshly installed Windows Server 2022 with GUI. The standard fonts are
available, but no extra fonts isntalled.

To confirm:

  > table(gsub(".*\\.(.{3})$", "\\1", dir("c:/WIndows/fonts")))

dat fon ini ttc ttf xml
1 192   1  16 127   1


So there are 127 *.ttf files installed, but systemfonts::system_fonts()
does not find any of these.

Best,
Uwe Ligges






This would be an empty character vector on my Alpine Linux server as
well. The system_fonts() there only contain ".pcf.gz" files from
"/usr/share/fonts/misc/".

Note that the "systemfonts" package on which you rely currently also
fails on that CRAN check flavour for a similar reason
(https://cran.r-project.org/web/checks/check_results_systemfonts.html).
On my Alpine Linux system, from example("register_font",
package="systemfonts"):

fonts <- system_fonts()
plain <- sample(which(!fonts$italic & fonts$weight <= 'normal'), 1)
bold <- sample(which(!fonts$italic & fonts$weight > 'normal'), 1)
italic <- sample(which(fonts$italic & fonts$weight <= 'normal'), 1)
## Error in sample.int(length(x), size, replace, prob) :
##   invalid first argument

(as there are no italic fonts).

HTH,

  Sebastian Meyer


I'm wondering if I need to release a new version to avoid this test
failure. Note that, the other Windows r-devel machine
(r-devel-windows-x86_64-new-TK) doesn't fail. So, it might be just
that something is wrong with r-devel-windows-x86_64-new-UL.

Any suggestions?

Best,
Hiroaki Yutani

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] New CRAN checks on r-devel-windows-x86_64-new-UL and the installed fonts

2021-12-16 Thread Hiroaki Yutani
> This would be an empty character vector on my Alpine Linux server as
> well.

I see, thanks for the information. Sorry for my lack of consideration on this.

> So there are 127 *.ttf files installed, but systemfonts::system_fonts()
> does not find any of these.

Thanks for investigating quickly! Then, it seems I should wait for the
problem to be solved on systemfonts' side. I'm curious what's the
difference between r-devel-windows-x86_64-new-TK, on which the check
doesn't fail, by the way.

Best,
Hiroaki Yutani

2021年12月16日(木) 23:57 Uwe Ligges :
>
>
>
> On 16.12.2021 15:34, Sebastian Meyer wrote:
> > Am 16.12.21 um 15:06 schrieb Hiroaki Yutani:
> >> Hi,
> >>
> >> My package is failing on CRAN check on r-devel-windows-x86_64-new-UL.
> >>
> >> https://cran.r-project.org/web/checks/check_results_string2path.html
> >>
> >> It seems the problem is that there is no available font that meets the
> >> condition in the following code. Is it irrational to assume at least
> >> one TrueType or OpenType font is installed in the system?
> >>
> >>  available_fonts <- systemfonts::system_fonts()$path
> >>
> >>  # string2path supports only TrueType or OpenType formats
> >>  ttf_or_otf <- available_fonts[grepl("\\.(ttf|otf)$",
> >> available_fonts)]
> >>
>
> The machine that is running " r-devel-windows-x86_64-new-UL" is a
> freshly installed Windows Server 2022 with GUI. The standard fonts are
> available, but no extra fonts isntalled.
>
> To confirm:
>
>  > table(gsub(".*\\.(.{3})$", "\\1", dir("c:/WIndows/fonts")))
>
> dat fon ini ttc ttf xml
>1 192   1  16 127   1
>
>
> So there are 127 *.ttf files installed, but systemfonts::system_fonts()
> does not find any of these.
>
> Best,
> Uwe Ligges
>
>
>
>
>
> > This would be an empty character vector on my Alpine Linux server as
> > well. The system_fonts() there only contain ".pcf.gz" files from
> > "/usr/share/fonts/misc/".
> >
> > Note that the "systemfonts" package on which you rely currently also
> > fails on that CRAN check flavour for a similar reason
> > (https://cran.r-project.org/web/checks/check_results_systemfonts.html).
> > On my Alpine Linux system, from example("register_font",
> > package="systemfonts"):
> >
> > fonts <- system_fonts()
> > plain <- sample(which(!fonts$italic & fonts$weight <= 'normal'), 1)
> > bold <- sample(which(!fonts$italic & fonts$weight > 'normal'), 1)
> > italic <- sample(which(fonts$italic & fonts$weight <= 'normal'), 1)
> > ## Error in sample.int(length(x), size, replace, prob) :
> > ##   invalid first argument
> >
> > (as there are no italic fonts).
> >
> > HTH,
> >
> >  Sebastian Meyer
> >
> >> I'm wondering if I need to release a new version to avoid this test
> >> failure. Note that, the other Windows r-devel machine
> >> (r-devel-windows-x86_64-new-TK) doesn't fail. So, it might be just
> >> that something is wrong with r-devel-windows-x86_64-new-UL.
> >>
> >> Any suggestions?
> >>
> >> Best,
> >> Hiroaki Yutani
> >>
> >> __
> >> R-package-devel@r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >>
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] New CRAN checks on r-devel-windows-x86_64-new-UL and the installed fonts

2021-12-16 Thread Uwe Ligges




On 16.12.2021 15:34, Sebastian Meyer wrote:

Am 16.12.21 um 15:06 schrieb Hiroaki Yutani:

Hi,

My package is failing on CRAN check on r-devel-windows-x86_64-new-UL.

https://cran.r-project.org/web/checks/check_results_string2path.html

It seems the problem is that there is no available font that meets the
condition in the following code. Is it irrational to assume at least
one TrueType or OpenType font is installed in the system?

 available_fonts <- systemfonts::system_fonts()$path

 # string2path supports only TrueType or OpenType formats
 ttf_or_otf <- available_fonts[grepl("\\.(ttf|otf)$", 
available_fonts)]




The machine that is running " r-devel-windows-x86_64-new-UL" is a 
freshly installed Windows Server 2022 with GUI. The standard fonts are 
available, but no extra fonts isntalled.


To confirm:

> table(gsub(".*\\.(.{3})$", "\\1", dir("c:/WIndows/fonts")))

dat fon ini ttc ttf xml
  1 192   1  16 127   1


So there are 127 *.ttf files installed, but systemfonts::system_fonts() 
does not find any of these.


Best,
Uwe Ligges





This would be an empty character vector on my Alpine Linux server as 
well. The system_fonts() there only contain ".pcf.gz" files from 
"/usr/share/fonts/misc/".


Note that the "systemfonts" package on which you rely currently also 
fails on that CRAN check flavour for a similar reason 
(https://cran.r-project.org/web/checks/check_results_systemfonts.html).
On my Alpine Linux system, from example("register_font", 
package="systemfonts"):


fonts <- system_fonts()
plain <- sample(which(!fonts$italic & fonts$weight <= 'normal'), 1)
bold <- sample(which(!fonts$italic & fonts$weight > 'normal'), 1)
italic <- sample(which(fonts$italic & fonts$weight <= 'normal'), 1)
## Error in sample.int(length(x), size, replace, prob) :
##   invalid first argument

(as there are no italic fonts).

HTH,

 Sebastian Meyer


I'm wondering if I need to release a new version to avoid this test
failure. Note that, the other Windows r-devel machine
(r-devel-windows-x86_64-new-TK) doesn't fail. So, it might be just
that something is wrong with r-devel-windows-x86_64-new-UL.

Any suggestions?

Best,
Hiroaki Yutani

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] New CRAN checks on r-devel-windows-x86_64-new-UL and the installed fonts

2021-12-16 Thread Sebastian Meyer

Am 16.12.21 um 15:06 schrieb Hiroaki Yutani:

Hi,

My package is failing on CRAN check on r-devel-windows-x86_64-new-UL.

https://cran.r-project.org/web/checks/check_results_string2path.html

It seems the problem is that there is no available font that meets the
condition in the following code. Is it irrational to assume at least
one TrueType or OpenType font is installed in the system?

 available_fonts <- systemfonts::system_fonts()$path

 # string2path supports only TrueType or OpenType formats
 ttf_or_otf <- available_fonts[grepl("\\.(ttf|otf)$", available_fonts)]



This would be an empty character vector on my Alpine Linux server as 
well. The system_fonts() there only contain ".pcf.gz" files from 
"/usr/share/fonts/misc/".


Note that the "systemfonts" package on which you rely currently also 
fails on that CRAN check flavour for a similar reason 
(https://cran.r-project.org/web/checks/check_results_systemfonts.html).
On my Alpine Linux system, from example("register_font", 
package="systemfonts"):


fonts <- system_fonts()
plain <- sample(which(!fonts$italic & fonts$weight <= 'normal'), 1)
bold <- sample(which(!fonts$italic & fonts$weight > 'normal'), 1)
italic <- sample(which(fonts$italic & fonts$weight <= 'normal'), 1)
## Error in sample.int(length(x), size, replace, prob) :
##   invalid first argument

(as there are no italic fonts).

HTH,

Sebastian Meyer


I'm wondering if I need to release a new version to avoid this test
failure. Note that, the other Windows r-devel machine
(r-devel-windows-x86_64-new-TK) doesn't fail. So, it might be just
that something is wrong with r-devel-windows-x86_64-new-UL.

Any suggestions?

Best,
Hiroaki Yutani

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] New CRAN checks on r-devel-windows-x86_64-new-UL and the installed fonts

2021-12-16 Thread Hiroaki Yutani
Hi,

My package is failing on CRAN check on r-devel-windows-x86_64-new-UL.

https://cran.r-project.org/web/checks/check_results_string2path.html

It seems the problem is that there is no available font that meets the
condition in the following code. Is it irrational to assume at least
one TrueType or OpenType font is installed in the system?

available_fonts <- systemfonts::system_fonts()$path

# string2path supports only TrueType or OpenType formats
ttf_or_otf <- available_fonts[grepl("\\.(ttf|otf)$", available_fonts)]

I'm wondering if I need to release a new version to avoid this test
failure. Note that, the other Windows r-devel machine
(r-devel-windows-x86_64-new-TK) doesn't fail. So, it might be just
that something is wrong with r-devel-windows-x86_64-new-UL.

Any suggestions?

Best,
Hiroaki Yutani

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel