[R] TeXtext font encoding?

ivo welch ivo_welch at mailblocks.com
Tue Aug 30 21:24:44 CEST 2005


Dear R wizards:

Has anyone gotten the TeXtext font encoding to work?  If I execute:

if (is.null(postscriptFonts()$lucida)) {
  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/lubright/lbdi.afm",
                  "/usr/share/texmf/fonts/afm/yandy/lumath/lbms.afm")
   postscriptFonts(lucida=postscriptFont("Lucida", metrics=luafmfiles, 
encoding="TeXtext"))
}

pdf(file = "test.pdf", fonts="lucida");
par(family="lucida");
plot( 40:50, 40:50, pch=40:50 );
dev.off();

the R code runs fine under 2.1.1, but the resulting .pdf file has an 
error:

$ pdffonts test.pdf
name                                 type         emb sub uni object ID
------------------------------------ ------------ --- --- --- ---------
Error: Wrong type in font encoding resource differences (array)
Error: Wrong type in font encoding resource differences (array)
Error: Wrong type in font encoding resource differences (array)
Error: Wrong type in font encoding resource differences (array)
ZapfDingbats                         Type 1       no  no  no       5  0
Helvetica                            Type 1       no  no  no      11  0
Helvetica-Bold                       Type 1       no  no  no      12  0
Helvetica-Oblique                    Type 1       no  no  no      13  0
Helvetica-BoldOblique                Type 1       no  no  no      14  0
Symbol                               Type 1       no  no  no      15  0
LucidaBright                         Type 1       no  no  no      16  0
LucidaBright-Demi                    Type 1       no  no  no      17  0
LucidaBright-Italic                  Type 1       no  no  no      18  0
LucidaBright-DemiItalic              Type 1       no  no  no      19  0
LucidaNewMath-Symbol                 Type 1       no  no  no      20  0


ghostscript 7.07 dies when I try to do the next processing step of 
embedding the fonts with ps2pdf13 .  These errors do not occur when I 
do not specify a font encoding.  (I believe I need this encoding for 
the math symbols, like '=', to appear in the right places.)

is this an R (enc file) bug or another mistake of mine?  as always, 
help would be highly appreciated.

sincerely,  /iaw


---
ivo welch




More information about the R-help mailing list