wch / extrafont

Tools for using fonts in R graphics
315 stars 48 forks source link

font_import() failed to 'CreateProcess' on Win7 32bit SP1 #51

Open madlogos opened 7 years ago

madlogos commented 7 years ago

Hi: Could you please look into a problem regarding tt2pt1.exe?

When I run font_import(), it fails with a warning message: Scanning ttf files in C:\WINDOWS\Fonts ... Extracting .afm files from .ttf files... C:\Windows\Fonts\Arial.TTFError in system2(ttf2pt1, c(args, shQuote(ttfiles[i]), shQuote(tmpfiles[i])), : 'CreateProcess' failed to run 'C:\Docs\R\R-33~1.2\library\Rttf2pt1\exec\ttf2pt1.exe -a -G fAe "C:\Windows\Fonts\Arial.TTF" "C:\Users\xx\AppData\Local\Temp\RtmpILTO8i/fonts/Arial"'

And when I double click tt2pt1.exe in \Rttf2pt1\exec, it pops up a warning "The version of this file is not compatible with the version of Windows you're running." So I doubt if tt2pt1.exe is of a wrong version.

My sessionInfo

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252                        LC_CTYPE=Chinese (Simplified)_People's Republic of China.936
[3] LC_MONETARY=English_United States.1252                       LC_NUMERIC=C                                                
[5] LC_TIME=English_United States.1252                          

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] extrafont_0.17  devtools_1.12.0

Thanks!

lemna commented 7 years ago

Hi @madlogos and @wch,

I encountered the same problem on windows-32 bit. It seems that the compiled CRAN version of Rttf2pt1 does not contain a 32-bit binary. A quick workaround is to install it from source:

devtools::install_github("wch/Rttf2pt1")

This requires Rtools to be installed on your system.

With kind regards, Peter.

madlogos commented 7 years ago

Hi @lemna, thank you for your workaround. Hope the CRAN version will be fixed as well.

gbonomib commented 6 years ago

Thank you @lemna , you made my day! Also, I point out that Rttf2pt1 is not compatible with R3.5.0, yet, apparently.

wch commented 6 years ago

@gbonomib Hopefully I'll have Rttf2pt1 updated for R 3.5.0 within the next week.

nicolapasquino commented 5 years ago

Hi @wch . I seem to have the same problem on Win10 64 bit with RTools latest version and R 3.6.0 installed. I followed @lemna's advice but installation from github returns an "installation of package ‘[....]Rttf2pt1_1.3.6.9000.tar.gz’ had non-zero exit status". I found a 1.3.7 version of Rttf2pt1 on CRAN, but I still get the same error. Could you please guide me through the resolution of the issue? Does it have to do with Rttf2pt1 not being compatible with newest versions of R yet? Many thanks