Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argument is of length zero error in afm_scan_files #78

Open
deeenes opened this issue Aug 31, 2020 · 0 comments
Open

argument is of length zero error in afm_scan_files #78

deeenes opened this issue Aug 31, 2020 · 0 comments

Comments

@deeenes
Copy link

deeenes commented Aug 31, 2020

Hi,

If I run font_import, after scanning all the directories, it fails with the following error:

Found FontName for 5044 fonts.
Scanning afm files in /usr/lib/R/library/extrafontdb/metrics
Error in if (grepl("Bold", weight)) { : argument is of length zero
In addition: There were 50 or more warnings (use warnings() to see the first 50)

The traceback:

5: FUN(X[[i]], ...)
4: lapply(afmfiles, afm_get_info)
3: afm_scan_files()
2: ttf_import(paths, recursive, pattern)
1: font_import()

In the /usr/lib/R/library/extrafontdb/metrics directory there are 4862 afm.gz files.
Also I can run font_import only as root, is it normal?

My session info:

─ Session info ──
 setting  value                       
 version  R version 4.0.2 (2020-06-22)
 os       Arch Linux                  
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_GB.UTF-8                 
 ctype    en_GB.UTF-8                 
 tz       Europe/Berlin           
 date     2020-08-31                  

─ Packages ──
 package     * version date       lib source        
 assertthat    0.2.1   2019-03-21 [1] CRAN (R 4.0.0)
 backports     1.1.7   2020-05-13 [1] CRAN (R 4.0.0)
 callr         3.4.3   2020-03-28 [1] CRAN (R 4.0.0)
 cli           2.0.2   2020-02-28 [1] CRAN (R 4.0.0)
 colorout    * 1.2-2   2020-05-19 [1] local         
 crayon        1.3.4   2017-09-16 [1] CRAN (R 4.0.0)
 curl          4.3     2019-12-02 [1] CRAN (R 4.0.0)
 desc          1.2.0   2018-05-01 [1] CRAN (R 4.0.0)
 devtools    * 2.3.0   2020-04-10 [1] CRAN (R 4.0.0)
 digest        0.6.25  2020-02-23 [1] CRAN (R 4.0.0)
 ellipsis      0.3.1   2020-05-15 [1] CRAN (R 4.0.0)
 extrafont   * 0.17    2014-12-08 [1] CRAN (R 4.0.0)
 extrafontdb   1.0     2012-06-11 [1] CRAN (R 4.0.0)
 fansi         0.4.1   2020-01-08 [1] CRAN (R 4.0.0)
 fs            1.4.1   2020-04-04 [1] CRAN (R 4.0.0)
 glue          1.4.1   2020-05-13 [1] CRAN (R 4.0.0)
 magrittr      1.5     2014-11-22 [1] CRAN (R 4.0.0)
 memoise       1.1.0   2017-04-21 [1] CRAN (R 4.0.0)
 pkgbuild      1.0.8   2020-05-07 [1] CRAN (R 4.0.0)
 pkgload       1.1.0   2020-05-29 [1] CRAN (R 4.0.0)
 prettyunits   1.1.1   2020-01-24 [1] CRAN (R 4.0.0)
 processx      3.4.2   2020-02-09 [1] CRAN (R 4.0.0)
 ps            1.3.3   2020-05-08 [1] CRAN (R 4.0.0)
 R6            2.4.1   2019-11-12 [1] CRAN (R 4.0.0)
 remotes       2.1.1   2020-02-15 [1] CRAN (R 4.0.0)
 rlang         0.4.6   2020-05-02 [1] CRAN (R 4.0.0)
 rprojroot     1.3-2   2018-01-03 [1] CRAN (R 4.0.0)
 Rttf2pt1      1.3.8   2020-01-10 [1] CRAN (R 4.0.0)
 sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 4.0.0)
 testthat      2.3.2   2020-03-02 [1] CRAN (R 4.0.0)
 usethis     * 1.6.1   2020-04-29 [1] CRAN (R 4.0.0)
 withr         2.2.0   2020-04-20 [1] CRAN (R 4.0.0)

[1] /usr/lib/R/library

I appreciate any help with this.

Best wishes,

Denes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant