Re: [Rd] font inclusions in pdf files

From: Paul Murrell <p.murrell_at_auckland.ac.nz>
Date: Mon 05 Dec 2005 - 20:12:14 GMT

Hi

ivo welch wrote:
> 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.)

Helvetica is being included because it is the default font for the device. Changes for R 2.3.0 will mean that it is possible to specify something non-standard like Lucida as the default font for the device. However, it's going to require more work to get rid of Zapf Dingbats because R always includes it for drawing small circles.

Paul

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul@stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue Dec 06 07:31:51 2005

This archive was generated by hypermail 2.1.8 : Tue 06 Dec 2005 - 02:21:16 GMT