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

Sebastian Meyer @eb@meyer @end|ng |rom |@u@de
Thu Dec 16 15:34:04 CET 2021


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 using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



More information about the R-package-devel mailing list