Problems with extraphones in R-afm errors

I am trying to use extrafonts package. When I import fonts, I get numerous warnings. When I try to use fonts in the pdf () command, I get numerous warnings about unknown AFM entities. I have seen several posts suggesting that you remove the copyright line from an AFM file, but this will require hundreds of files to be installed. I have edited several files, but problems continue. The only fonts I can get are the main fonts available on Windows, such as Arial and Courier. When I tried Linot Palatino, I get a lot of warnings (font width is unknown ...), and the output pdf (plot) has no glyphs. This font works in other programs such as Word. In other cases (for example, in the Franklin Vulture Book) I get some kind of default font,but at least glyphs appear.

My pdf command looks like this:

pdf("plot_out2.pdf", family= "Franklin Gothic Book", width=8.5, height=11)

This leads to the following warnings:

Warning messages:
1: In pdf("plot_out2.pdf", family = "Franklin Gothic Book", width = 8.5,  :
  unknown AFM entity encountered
2: In pdf("plot_out2.pdf", family = "Franklin Gothic Book", width = 8.5,  :
  unknown AFM entity encountered
3: In pdf("plot_out2.pdf", family = "Franklin Gothic Book", width = 8.5,  :
  unknown AFM entity encountered
4: In pdf("plot_out2.pdf", family = "Franklin Gothic Book", width = 8.5,  :
  unknown AFM entity encountered

Do I need to reinstall the fonts? If so, do I need to delete something first? Is there a utility to recover all afm.gz files? Do I need to insert fonts even when I read them on the same computer on which pdf was created?

Environment:
Windows 7, 64 bit. RStudio, R 2.15. Some of my fonts were installed by CorelDraw, others by ArcMap. Perhaps other sources.

+3
source share
1 answer

, , , pdf-, . extrafont . , , names(pdfFonts). , , pdf- ( ).

, .

> library(extrafont)
Registering fonts with R
> "Tahoma" %in% names(pdfFonts())
[1] TRUE
> pdf("testfile.pdf",family="Tahoma")
Warning messages:
1: In pdf("testfile.pdf", family = "Tahoma") :
  unknown AFM entity encountered
2: In pdf("testfile.pdf", family = "Tahoma") :
  unknown AFM entity encountered
3: In pdf("testfile.pdf", family = "Tahoma") :
  unknown AFM entity encountered
4: In pdf("testfile.pdf", family = "Tahoma") :
  unknown AFM entity encountered
> plot(rnorm(100),rnorm(100))
> dev.off()
> embed_fonts("testfile.pdf")

, , PDF .

. .

: , Rttf2pt1 AFM, R postscript . , , . , ( ), .

+1

All Articles