Iam trying to import windows fonts into R/R.Stuido (both latest versions used with Windows 10). Some time ago I was successful on another Windows 10 device using this code:
install.packages("pkgbuild")
library(extrafont)
library(remotes)
remotes::install_version("Rttf2pt1", version = "1.3.8")
extrafont::font_import()
When I tried to re-run that one on the actual device I am running into troubles with the installation of the respective Rttf2pt1 version. It seems to run into installation problems as the the error message is as follows:
Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/Rttf2pt1/Rttf2pt1_1.3.8.tar.gz
Installing package into ‘C:/Users/.../R/win-library/4.1’
(as ‘lib’ is unspecified)
* installing *source* package 'Rttf2pt1' ...
** package 'Rttf2pt1' successfully unpacked and MD5 sums checked
** using staged installation
** libs
running 'src/Makefile.win' ...
echo "make ttf2pt1 in ttf2pt1/ ..."
make ttf2pt1 in ttf2pt1/ ...
(cd ttf2pt1; /c/PROGRA~1/rtools40/usr/bin/make -f "C:/PROGRA~1/R/R-41~1.1/etc/x64/Makeconf" -f Makefile CC="`"C:/PROGRA~1/R/R-41~1.1/bin/R" CMD config CC`" CFLAGS="`"C:/PROGRA~1/R/R-41~1.1/bin/R" CMD config CFLAGS` -DWINDOWS -Wno-comment -Wno-format -Wno-logical-op-parentheses -Wno-pointer-sign -Wno-unused-function -Wno-unused-variable -Wno-parentheses -Wno-unused-label -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-unused-value" ttf2pt1)
C:/Program Files/rtools40/mingw64/bin/gcc -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -DWINDOWS -Wno-comment -Wno-format -Wno-logical-op-parentheses -Wno-pointer-sign -Wno-unused-function -Wno-unused-variable -Wno-parentheses -Wno-unused-label -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-unused-value -c ttf2pt1.c
make[1]: C:/Program: Command not found
make[1]: *** [Makefile:185: ttf2pt1.o] Error 127
make: *** [Makefile.win:16: all] Error 2
ERROR: compilation failed for package 'Rttf2pt1'
* removing 'C:/Users/.../R/win-library/4.1/Rttf2pt1'
* restoring previous 'C:/Users/.../R/win-library/4.1/Rttf2pt1'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/.../Rttf2pt1’ had non-zero exit status
Any ideas how to solve the problem? Thank you for your help