Comments (29)
I installed Rttf2pt1
using remotes::install_version("Rttf2pt1", version = "1.3.8")
on my home machine, and now extrafont::font_import()
is working correctly (on Windows 10 64-bit build 19042).
from extrafont.
Confirmed! Downgrading to 1.3.8 fixed my problem on Ubuntu as well. Thanks @wz-billings !
from extrafont.
remove.packages("Rttf2pt1")
remotes::install_version("Rttf2pt1", version = "1.3.8")
I used R 4.11 on Windows 10-64.
It works!
Thanks!
from extrafont.
Please don’t spam here, and explain what you do when posting code. Thanks.
from extrafont.
then I try to install 1.3.7,the same warning accured:
Package Rttf2pt1 has compiled code, but no suitable compiler(s) were found. Installation will likely fail.
Install Rtools (https://cran.r-project.org/bin/windows/Rtools/).Then use the pkgbuild package, or make sure that Rtools in the PATH.
Did you add Rtools to the PATH? You can follow the instructions here
from extrafont.
Just confirming the same problem (and work-around) for macOS 12.1 (Monterey with Apple Silicon) and R 4.1.1
> R.Version()$version.string
[1] "R version 4.1.1 (2021-08-10)"
> R.Version()$platform
[1] "aarch64-apple-darwin20"
Using the work-around mentioned in previous comments
remotes::install_version("Rttf2pt1", version = "1.3.8")
to downgrade Rttf2pt1
to version 1.3.8 worked for me. That install mechanism will probably not work for those who do not have all of the required development tools installed on their system.
from extrafont.
Can this please be fixed? StackOverflow also has multiple mentions now. Rttf2pt1
v1.3.9 introduced a nasty bug which prevents knitting to PDF to print plot labels of system font. Downgrading to v1.3.8 does not sound like a reasonable solution to me 🙂
Reference:
- https://stackoverflow.com/questions/63583444/ggplot2-not-printing-font-when-knit-but-shows-up-in-chunks
- https://stackoverflow.com/questions/61204259/how-can-i-resolve-the-no-font-name-issue-when-importing-fonts-into-r-using-ext?noredirect=1#comment108274897_61204259
from extrafont.
See #32 .
I have the same problem on Ubuntu 20.04. In #32 the problem is traced to Rttf2pt1
, but I had this working on this same machine before upgrading Ubuntu and R to 4.1.
@wch this renders extrafont
useless -- what can we do about this? I tried some of the proposed solutions but they didn't work. I don't think this is a permissions issue.
from extrafont.
Interestingly, it works fine on my office machine which is also running Windows 10 and R 4.1.0. SessionInfo for this machine:
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[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
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0 extrafontdb_1.0 Rttf2pt1_1.3.8
The two differences I notice are that my office machine is running Windows 10 x64 build 19043 (as opposed to 19042) and Rttf2pt1_1.3.8
rather than Rttf2pt1_1.3.9
. I'll try downgrading Rttf2pt1
/updating Windows when I get a chance. I guess the issue could also be something more esoteric that is not returned by SessionInfo, and I'm happy to provide any more information that could be useful.
from extrafont.
I installed
Rttf2pt1
usingremotes::install_version("Rttf2pt1", version = "1.3.8")
on my home machine, and nowextrafont::font_import()
is working correctly (on Windows 10 64-bit build 19042).
I had the same issue: everything was working fine until I installed R 4.1.0, and font_import()
returned this message. @wz-billings 's solution fixed it for me too, on Windows 10 64-bit build 19043. Thank you!!
from extrafont.
Had the same issue on my office machine, @wz-billings´ solution fixed the problem. Thank you very much, dude!
from extrafont.
how to downgrade to 1.3.8 ? @wz-billings´
I installed
Rttf2pt1
usingremotes::install_version("Rttf2pt1", version = "1.3.8")
on my home machine, and nowextrafont::font_import()
is working correctly (on Windows 10 64-bit build 19042).
from extrafont.
when I run remotes::install_version("Rttf2pt1", version = "1.3.8")
it show @wz-billings´
Warning messages:
1: In missing_devel_warning(pkgdir) :
Package Rttf2pt1 has compiled code, but no suitable compiler(s) were found. Installation will likely fail.
Install Rtools (https://cran.r-project.org/bin/windows/Rtools/).Then use the pkgbuild package, or make sure that Rtools in the PATH.
2: In i.p(...) :
installation of package ‘C:/Users/amd/AppData/Local/Temp/RtmpIHZ0vY/remotes5dc40c76e85/Rttf2pt1’ had non-zero exit status
from extrafont.
then i installed Rtools and run remotes::install_version("Rttf2pt1", version = "1.3.8") ,but another problem occured :@wz-billings´, can you help me?
Error in download_version_url(package, version, repos, type) :
version '1.3.8' is invalid for package 'Rttf2pt1'
from extrafont.
then I try to install 1.3.7,the same warning accured:
Warning messages:
1: In missing_devel_warning(pkgdir) :
Package Rttf2pt1 has compiled code, but no suitable compiler(s) were found. Installation will likely fail.
Install Rtools (https://cran.r-project.org/bin/windows/Rtools/).Then use the pkgbuild package, or make sure that Rtools in the PATH.
2: In i.p(...) :
installation of package ‘C:/Users/amd/AppData/Local/Temp/RtmpIHZ0vY/remotes5dc76d04bfe/Rttf2pt1’ had non-zero exit status
from extrafont.
then I try to install 1.3.7,the same warning accured:
Package Rttf2pt1 has compiled code, but no suitable compiler(s) were found. Installation will likely fail.
Install Rtools (https://cran.r-project.org/bin/windows/Rtools/).Then use the pkgbuild package, or make sure that Rtools in the PATH.Did you add Rtools to the PATH? You can follow the instructions here
it worked,wow,thanks very much,so kind of you!!!
from extrafont.
Excuse me, I tried to downgrade the version of Rttf2pt 1, but then another issues coming which says
Error in ttf_extract(ttfiles) : lazy-load database 'C:/Users/Asus/Documents/R/win-library/4.1/Rttf2pt1/R/Rttf2pt1.rdb' is corrupt In addition: Warning messages: 1: In ttf_extract(ttfiles) : restarting interrupted promise evaluation 2: In ttf_extract(ttfiles) : internal error -3 in R_decompress1
I used R 4.10 on Windows 10-64 build 19043.
Thank you!
from extrafont.
Excuse me, I tried to downgrade the version of Rttf2pt 1, but then another issues coming which says
Error in ttf_extract(ttfiles) : lazy-load database 'C:/Users/Asus/Documents/R/win-library/4.1/Rttf2pt1/R/Rttf2pt1.rdb' is corrupt In addition: Warning messages: 1: In ttf_extract(ttfiles) : restarting interrupted promise evaluation 2: In ttf_extract(ttfiles) : internal error -3 in R_decompress1
I used R 4.10 on Windows 10-64 build 19043.
Thank you!
Solved. I tried to reinstall extrafont package first, and then installed the downgraded version of Rttf2pt1.
Sorry for the inconvenience
from extrafont.
@wzbillings
Hi, I am using R 4.0.5 and RStudio 1.4.1106 based on Windows NT 10.0 x64. I also encountered the "No FontName" Issue when dealing with 'extrafont' package, and based on your kind solutions proposed above, I now know that I should downgrade my Rttf2pt1 1.3.9 to 1.3.8.
HOWEVER, I CANNONT successfully do the downgrade! I tried automatic download via RStudio, manually install the tar.gz file (downloaded from CRAN), and by using the the 'remotes' package. BUT ALL OF THESE APPROACHES yielded the same error message below:
Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/Rttf2pt1/Rttf2pt1_1.3.8.tar.gz
Installing package into ‘C:/Users/ThinkPad/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
- installing source package 'Rttf2pt1' ...
** successfully unpacked 'Rttf2pt1' package
** using staged installation
** libs
running 'src/Makefile.win' ...
Warning in system(paste("make --no-print-directory", paste("-f", shQuote(makefiles), :
'make' not found
ERROR: compilation failed for package 'Rttf2pt1' - removing 'C:/Users/ThinkPad/Documents/R/win-library/4.0/Rttf2pt1'
Warning messages:
1: In missing_devel_warning(pkgdir) :
Package Rttf2pt1 has compiled code, but no suitable compiler(s) were found. Installation will likely fail.
Install Rtools (https://cran.r-project.org/bin/windows/Rtools/).Then use the pkgbuild package, or make sure that Rtools in the PATH.
2: In i.p(...) :
installation of package ‘C:/Users/ThinkPad/AppData/Local/Temp/RtmpcJdeR8/remotes45d8509e5582/Rttf2pt1’ had non-zero exit status
Could you kindly offer me any suggestions? In great need of extra fonts!
from extrafont.
from extrafont.
Quoting from the README at https://github.com/wch/Rttf2pt1
Note 2021-07-19: ttf2pt1 has not been maintained since 2003, and it is getting increasingly difficult to make it compile without significant warnings on modern compilers, which in turn is making it difficult to maintain this package on CRAN. It is possible that in the future, I will not have time to keep this package on CRAN.
That repo has an issue filed about this specific problem. wch/Rttf2pt1#10
from extrafont.
For a little context around Rttf2pt1, which is a wrapper around ttf2pt1: ttf2pt1 itself has not had any development activity in 19 years, and compiling ttf2pt1 results many compiler warnings. Most of them are innocuous. Every so often, the CRAN maintainers change their standards about which warnings count as "significant warnings". If a package has significant warnings, they will remove that package from CRAN. I occasionally get messages from them saying they will remove Rttf2pt1 from CRAN unless various significant warnings are fixed. I fix them to the best of my ability, but it is possible that some of the fixes have introduced bugs. If someone wants to step up and take over maintenance of Rttf2pt1, I would welcome that change.
from extrafont.
In that case, it might be worth something to rely on the {showtext} pkg as part of phasing out? It seems to provide this exact function as well.
from extrafont.
In that case, it might be worth something to rely on the {showtext} pkg as part of phasing out? It seems to provide this exact function as well.
Are you sure that showtext
can be a drop-in replacement of extrafont
?
I briefly looked over the issues and it seems that ggplot2
would greatly benefit from this being solved: yixuan/showtext#1
However, I cannot assess whether this also holds true for extrafont
or not.
from extrafont.
@msberends showtext works well if you don't care about editing the text afterwards (with Inkscape, for example) as it converts text to vector graphics. extrafont keeps it as text in a PDF export which allows further editing.
from extrafont.
version 1.3.8 of Rttf2pt1 still does exactly what it needs to, so unless someone is willing to take over maintenance of that package or of ttf2pt1, I don't see the utility of this discussion.
from extrafont.
将Rttf2pt1降级到1.3.8后,导入字体就没有问题啦
remove.packages("Rttf2pt1")
remotes::install_version("Rttf2pt1", version = "1.3.8")
extrafont::font_import()
我在win10上用的R 4.2.0
最后成功了
Found FontName for 220 fonts.
Scanning afm files in C:/Users/86182/AppData/Local/R/win-library/4.2/extrafontdb/metrics
Writing font table in C:/Users/86182/AppData/Local/R/win-library/4.2/extrafontdb/fontmap/fonttable.csv
Writing Fontmap to C:/Users/86182/AppData/Local/R/win-library/4.2/extrafontdb/fontmap/Fontmap...
sessionInfo()
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] pillar_1.7.0 compiler_4.2.0 BiocManager_1.30.18 prettyunits_1.1.1 remotes_2.4.2
[6] tools_4.2.0 extrafont_0.18 pkgbuild_1.3.1 lifecycle_1.0.1 tibble_3.1.7
[11] gtable_0.3.0 pkgconfig_2.0.3 rlang_1.0.2 DBI_1.1.2 cli_3.3.0
[16] Rttf2pt1_1.3.8 withr_2.5.0 dplyr_1.0.9 stringr_1.4.0 generics_0.1.2
[21] vctrs_0.4.1 grid_4.2.0 tidyselect_1.1.2 glue_1.6.2 R6_2.5.1
[26] processx_3.5.3 fansi_1.0.3 ggplot2_3.3.6 purrr_0.3.4 callr_3.7.0
[31] extrafontdb_1.0 magrittr_2.0.3 scales_1.2.0 ps_1.7.0 ggthemes_4.2.4
[36] ellipsis_0.3.2 assertthat_0.2.1 colorspace_2.0-3 utf8_1.2.2 stringi_1.7.6
[41] munsell_0.5.0 crayon_1.5.1
from extrafont.
from extrafont.
@wch is it possible to lock this thread? the solution still works and I don't see any reason to continue discussion if no one is volunteering to maintain the package.
from extrafont.
Related Issues (20)
- Easy speed-up possible? HOT 1
- No Fontname. Skipping, for all of my fonts in Windows? HOT 1
- package ‘extrafonts’ is not available (for R version 4.0.2) HOT 1
- `argument is of length zero` error in `afm_scan_files`
- wish: sort `fonts()` alphabetically HOT 1
- new font is ignored
- Using extrafont within knitr to pdf HOT 1
- windowFonts() not recognized in .Rprofile HOT 3
- how to install the font of "Young" in Mac?
- "GhostScript was not found" on M1 Big Sur Mac HOT 2
- font_import segfaults. HOT 3
- a problem when I ues font_import
- Installing a font from .otf/.ttf files
- Seek replacement for `ttf2pt1` for extracting font metrics HOT 2
- "Found FontName for 0 fonts." on 64-bit Windows OS
- Type1 importing not working
- Can´t load dinpro light
- Font embedding not working due to GhostScript `-I` switch
- Font is embeded, but i can not document properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extrafont.