[Rd] font inclusions in pdf files

From: ivo welch <ivowel_at_gmail.com>
Date: Sun 04 Dec 2005 - 17:34:22 GMT

I am stumbling into external font issues here and there. I presume using external lucida fonts is fairly rare, so I am more likely to stumble onto issues here. (of course, I often think I have stumbled onto bugs/features that are not.) So, I hope I am not imposing by reporting the following.

[1] can R please not include fonts that it is not using?

luafmfiles <- c("/usr/share/texmf/fonts/afm/yandy/lubright/lbr.afm",

# "/usr/share/texmf/fonts/afm/yandy/lumath/lbms.afm",
plot( c(0,0), c(1,1) );

# pdffonts testincfonts.pdf

name                                 type         emb sub uni object ID
------------------------------------ ------------ --- --- --- ---------
ZapfDingbats                         Type 1       no  no  no       5  0
Helvetica                            Type 1       no  no  no      10  0
Helvetica-Bold                       Type 1       no  no  no      11  0
Helvetica-Oblique                    Type 1       no  no  no      12  0
Helvetica-BoldOblique                Type 1       no  no  no      13  0
Symbol                               Type 1       no  no  no      14  0
LucidaBright                         Type 1       no  no  no      15  0
LucidaBright-Demi                    Type 1       no  no  no      16  0
LucidaBright-Italic                  Type 1       no  no  no      17  0
LucidaCalligraphy-Italic             Type 1       no  no  no      18  0
LucidaBright                         Type 1       no  no  no      19  0

    distill from testincfonts.pdf into testincfonts.pdf.pdf to see what is really used:

# pdffonts testincfonts.pdf.pdf

name                                 type         emb sub uni object ID
------------------------------------ ------------ --- --- --- ---------
KWYJNC+LucidaBright                  Type 1C      yes yes no       9  0

(Including unused fonts can trip up programs that check whether pdf documents have embedded all fonts, and which are not smart enough to typeset [incl. all recursively embedded pdf files] to realize when a font is never used.)

[2] I do not believe this is an R bug, but I want to mention it anyway because it comes from interacting the R-created graphics with gs. for some odd reason, when I include these external lucida fonts, and create graphics in R, the R-created pdf can no longer be distilled by gs 8.53, because it stumbles into a safety issue. that is, all the gs scripts named 'ps2pdf*' have the option -dSAFER on by default, which disables the renamefile and deletefile operators, and it somehow prevents finding the fonts. (the bug does not appear if I do not use the external fonts.)




        [[alternative HTML version deleted]]

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon Dec 05 05:07:44 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:34 GMT