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/lubright/lbd.afm",
                "/usr/share/texmf/fonts/afm/yandy/lubright/lbi.afm",
                "/usr/share/texmf/fonts/afm/yandy/lucida/lbc.afm",
                                #
"/usr/share/texmf/fonts/afm/yandy/lumath/lbms.afm",
                "/usr/share/texmf/fonts/afm/yandy/lubright/lbr.afm")
grDevices::postscriptFonts(lucida=grDevices::postscriptFont("Lucida",
metrics=luafmfiles));
pdf(file="testincfonts.pdf");
par(family="lucida");
plot( c(0,0), c(1,1) );
dev.off();

# 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.)

http://groups.google.com/group/comp.lang.postscript/browse_frm/thread/3613c16aec64a9ed/a7c40582a0b5be1b?lnk=st&q=ivowel&rnum=1&hl=en#a7c40582a0b5be1b

regards,

/iaw

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to