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

Scanning ttf files warnings #7

Closed
CyGei opened this issue Jun 27, 2022 · 1 comment
Closed

Scanning ttf files warnings #7

CyGei opened this issue Jun 27, 2022 · 1 comment

Comments

@CyGei
Copy link

CyGei commented Jun 27, 2022

Is there a way to suppress the warnings everytime we use theme_fira in ggplot?
It looks like these have to do with the fonts but the plot renders fine.

library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.1.3
library(firatheme)
ggplot(mtcars, aes(x = mpg*0.43, y = wt*0.4535924, colour = factor(cyl))) +
  geom_point(size = 2) + geom_smooth(se = FALSE) +
  labs(title = "Car weight vs efficiency",
       x = "Efficiency (km/l)",
       y = "Weight (1000 kg)",
       colour = "Cylinders") +
  theme_fira() 
#> Scanning ttf files in C:/Users/cygei/R/win-library/4.1/firatheme/font ...
#> Extracting .afm files from .ttf files...
#> C:\Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-Bold.ttf
#> Warning in system2(enc2native(ttf2pt1), c(args, shQuote(ttfiles[i]),
#> shQuote(tmpfiles[i])), : running command '"C:/Users/cygei/
#> R/win-library/4.1/Rttf2pt1/exec/ttf2pt1.exe" -a -G fAe "C:
#> \Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-Bold.ttf" "C:
#> \Users\cygei\AppData\Local\Temp\RtmpaUAXf9/fonts/FiraSans-Bold"' had status 5
#>  : No FontName. Skipping.
#> C:\Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-BoldItalic.ttf
#> Warning in system2(enc2native(ttf2pt1), c(args, shQuote(ttfiles[i]),
#> shQuote(tmpfiles[i])), : running command '"C:/Users/cygei/R/win-
#> library/4.1/Rttf2pt1/exec/ttf2pt1.exe" -a -G fAe "C:\Users\cygei\R\win-
#> library\4.1\firatheme\font\FiraSans-BoldItalic.ttf" "C:
#> \Users\cygei\AppData\Local\Temp\RtmpaUAXf9/fonts/FiraSans-BoldItalic"' had
#> status 5
#>  : No FontName. Skipping.
#> C:\Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-Italic.ttf
#> Warning in system2(enc2native(ttf2pt1), c(args, shQuote(ttfiles[i]),
#> shQuote(tmpfiles[i])), : running command '"C:/Users/cygei/
#> R/win-library/4.1/Rttf2pt1/exec/ttf2pt1.exe" -a -G fAe "C:
#> \Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-Italic.ttf" "C:
#> \Users\cygei\AppData\Local\Temp\RtmpaUAXf9/fonts/FiraSans-Italic"' had status 5
#>  : No FontName. Skipping.
#> C:\Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-Medium.ttf
#> Warning in system2(enc2native(ttf2pt1), c(args, shQuote(ttfiles[i]),
#> shQuote(tmpfiles[i])), : running command '"C:/Users/cygei/
#> R/win-library/4.1/Rttf2pt1/exec/ttf2pt1.exe" -a -G fAe "C:
#> \Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-Medium.ttf" "C:
#> \Users\cygei\AppData\Local\Temp\RtmpaUAXf9/fonts/FiraSans-Medium"' had status 5
#>  : No FontName. Skipping.
#> C:\Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-MediumItalic.ttf
#> Warning in system2(enc2native(ttf2pt1), c(args, shQuote(ttfiles[i]),
#> shQuote(tmpfiles[i])), : running command '"C:/Users/cygei/R/win-
#> library/4.1/Rttf2pt1/exec/ttf2pt1.exe" -a -G fAe "C:\Users\cygei\R\win-
#> library\4.1\firatheme\font\FiraSans-MediumItalic.ttf" "C:
#> \Users\cygei\AppData\Local\Temp\RtmpaUAXf9/fonts/FiraSans-MediumItalic"' had
#> status 5
#>  : No FontName. Skipping.
#> C:\Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-Regular.ttf
#> Warning in system2(enc2native(ttf2pt1), c(args, shQuote(ttfiles[i]),
#> shQuote(tmpfiles[i])), : running command '"C:/Users/cygei/
#> R/win-library/4.1/Rttf2pt1/exec/ttf2pt1.exe" -a -G fAe "C:
#> \Users\cygei\R\win-library\4.1\firatheme\font\FiraSans-Regular.ttf" "C:
#> \Users\cygei\AppData\Local\Temp\RtmpaUAXf9/fonts/FiraSans-Regular"' had status 5
#>  : No FontName. Skipping.
#> Found FontName for 0 fonts.
#> Scanning afm files in C:/Users/cygei/R/win-library/4.1/extrafontdb/metrics
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
#> Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
#> found in Windows font database
#> Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
#> found in Windows font database

#> Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
#> found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database
#> Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
#> found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database
#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

Created on 2022-06-27 by the reprex package (v2.0.1)

Session info
sessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#>  setting  value
#>  version  R version 4.1.0 (2021-05-18)
#>  os       Windows 10 x64 (build 22000)
#>  system   x86_64, mingw32
#>  ui       RTerm
#>  language (EN)
#>  collate  English_United Kingdom.1252
#>  ctype    English_United Kingdom.1252
#>  tz       Europe/London
#>  date     2022-06-27
#>  pandoc   2.17.1.1 @ C:/Program Files/RStudio/bin/quarto/bin/ (via rmarkdown)
#> 
#> - Packages -------------------------------------------------------------------
#>  package     * version date (UTC) lib source
#>  assertthat    0.2.1   2019-03-21 [1] CRAN (R 4.1.1)
#>  cli           3.3.0   2022-04-25 [1] CRAN (R 4.1.3)
#>  colorspace    2.0-3   2022-02-21 [1] CRAN (R 4.1.3)
#>  crayon        1.5.1   2022-03-26 [1] CRAN (R 4.1.3)
#>  curl          4.3.2   2021-06-23 [1] CRAN (R 4.1.1)
#>  DBI           1.1.2   2021-12-20 [1] CRAN (R 4.1.3)
#>  digest        0.6.29  2021-12-01 [1] CRAN (R 4.1.3)
#>  dplyr         1.0.8   2022-02-08 [1] CRAN (R 4.1.3)
#>  ellipsis      0.3.2   2021-04-29 [1] CRAN (R 4.1.1)
#>  evaluate      0.15    2022-02-18 [1] CRAN (R 4.1.3)
#>  extrafont     0.18    2022-04-12 [1] CRAN (R 4.1.3)
#>  extrafontdb   1.0     2012-06-11 [1] CRAN (R 4.1.1)
#>  fansi         1.0.3   2022-03-24 [1] CRAN (R 4.1.3)
#>  farver        2.1.0   2021-02-28 [1] CRAN (R 4.1.1)
#>  fastmap       1.1.0   2021-01-25 [1] CRAN (R 4.1.1)
#>  firatheme   * 0.2.4   2022-06-27 [1] Github (vankesteren/firatheme@006d4d0)
#>  fs            1.5.2   2021-12-08 [1] CRAN (R 4.1.3)
#>  generics      0.1.2   2022-01-31 [1] CRAN (R 4.1.3)
#>  ggplot2     * 3.3.6   2022-05-03 [1] CRAN (R 4.1.3)
#>  glue          1.6.2   2022-02-24 [1] CRAN (R 4.1.3)
#>  gtable        0.3.0   2019-03-25 [1] CRAN (R 4.1.1)
#>  highr         0.9     2021-04-16 [1] CRAN (R 4.1.1)
#>  htmltools     0.5.2   2021-08-25 [1] CRAN (R 4.1.1)
#>  httr          1.4.2   2020-07-20 [1] CRAN (R 4.1.1)
#>  knitr         1.38    2022-03-25 [1] CRAN (R 4.1.3)
#>  labeling      0.4.2   2020-10-20 [1] CRAN (R 4.1.1)
#>  lattice       0.20-44 2021-05-02 [2] CRAN (R 4.1.0)
#>  lifecycle     1.0.1   2021-09-24 [1] CRAN (R 4.1.1)
#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.1.3)
#>  Matrix        1.3-3   2021-05-04 [2] CRAN (R 4.1.0)
#>  mgcv          1.8-35  2021-04-18 [2] CRAN (R 4.1.0)
#>  mime          0.12    2021-09-28 [1] CRAN (R 4.1.1)
#>  munsell       0.5.0   2018-06-12 [1] CRAN (R 4.1.1)
#>  nlme          3.1-152 2021-02-04 [2] CRAN (R 4.1.0)
#>  pillar        1.7.0   2022-02-01 [1] CRAN (R 4.1.3)
#>  pkgconfig     2.0.3   2019-09-22 [1] CRAN (R 4.1.1)
#>  purrr         0.3.4   2020-04-17 [1] CRAN (R 4.1.1)
#>  R.cache       0.15.0  2021-04-30 [1] CRAN (R 4.1.2)
#>  R.methodsS3   1.8.1   2020-08-26 [1] CRAN (R 4.1.1)
#>  R.oo          1.24.0  2020-08-26 [1] CRAN (R 4.1.1)
#>  R.utils       2.11.0  2021-09-26 [1] CRAN (R 4.1.2)
#>  R6            2.5.1   2021-08-19 [1] CRAN (R 4.1.1)
#>  reprex        2.0.1   2021-08-05 [1] CRAN (R 4.1.1)
#>  rlang         1.0.2   2022-03-04 [1] CRAN (R 4.1.3)
#>  rmarkdown     2.13    2022-03-10 [1] CRAN (R 4.1.3)
#>  rstudioapi    0.13    2020-11-12 [1] CRAN (R 4.1.1)
#>  Rttf2pt1      1.3.10  2022-02-07 [1] CRAN (R 4.1.2)
#>  scales        1.2.0   2022-04-13 [1] CRAN (R 4.1.3)
#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.1.3)
#>  stringi       1.7.6   2021-11-29 [1] CRAN (R 4.1.2)
#>  stringr       1.4.0   2019-02-10 [1] CRAN (R 4.1.1)
#>  styler        1.7.0   2022-03-13 [1] CRAN (R 4.1.3)
#>  tibble        3.1.7   2022-05-03 [1] CRAN (R 4.1.3)
#>  tidyselect    1.1.2   2022-02-21 [1] CRAN (R 4.1.3)
#>  utf8          1.2.2   2021-07-24 [1] CRAN (R 4.1.1)
#>  vctrs         0.4.1   2022-04-13 [1] CRAN (R 4.1.3)
#>  withr         2.5.0   2022-03-03 [1] CRAN (R 4.1.3)
#>  xfun          0.30    2022-03-02 [1] CRAN (R 4.1.3)
#>  xml2          1.3.3   2021-11-30 [1] CRAN (R 4.1.3)
#>  yaml          2.3.5   2022-02-21 [1] CRAN (R 4.1.2)
#> 
#>  [1] C:/Users/cygei/R/win-library/4.1
#>  [2] C:/Program Files/R/R-4.1.0/library
#> 
#> ------------------------------------------------------------------------------
@vankesteren
Copy link
Owner

Hi @CyGei, sorry for the super late response! There is a fix for this issue in #6!

@CyGei CyGei closed this as completed Jan 10, 2023
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

2 participants