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

Uwe Ligges ||gge@ @end|ng |rom @t@t|@t|k@tu-dortmund@de
Thu Dec 16 15:57:30 CET 2021



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