[R] times family unavailable in postscript device (Ubuntu Linux)

Paul Johnson pauljohn32 at gmail.com
Tue May 12 03:27:57 CEST 2009


I'm running Ubuntu 9.04.  I could use some advice about fonts in
postscript devices.

> sessionInfo()
R version 2.9.0 (2009-04-17)
i486-pc-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
>

I can use family="Times" with pdf output, but postscript refuses. It says:


> plot(rnorm(10),rnorm(10), family="Times")
Error in axis(side = side, at = at, labels = labels, ...) :
  family 'Times' not included in PostScript device

This happens even though Times *appears* to be listed as a valid family :

> names(postscriptFonts())
 [1] "serif"                "sans"                 "mono"
 [4] "AvantGarde"           "Bookman"              "Courier"
 [7] "Helvetica"            "Helvetica-Narrow"     "NewCenturySchoolbook"
[10] "Palatino"             "Times"                "URWGothic"
[13] "URWBookman"           "NimbusMon"            "NimbusSan"
[16] "URWHelvetica"         "NimbusSanCond"        "CenturySch"
[19] "URWPalladio"          "NimbusRom"            "URWTimes"
[22] "ComputerModern"       "ComputerModernItalic" "Japan1"
[25] "Japan1HeiMin"         "Japan1GothicBBB"      "Japan1Ryumin"
[28] "Korea1"               "Korea1deb"            "CNS1"
[31] "GB1"

> example(postscriptFonts)

pstscF> postscriptFonts()
$serif
$family
[1] "Times"

$metrics
[1] "Times-Roman.afm"      "Times-Bold.afm"       "Times-Italic.afm"
[4] "Times-BoldItalic.afm" "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$sans
$family
[1] "Helvetica"

$metrics
[1] "Helvetica.afm"             "Helvetica-Bold.afm"
[3] "Helvetica-Oblique.afm"     "Helvetica-BoldOblique.afm"
[5] "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$mono
$family
[1] "Courier"

$metrics
[1] "Courier.afm"             "Courier-Bold.afm"
[3] "Courier-Oblique.afm"     "Courier-BoldOblique.afm"
[5] "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$AvantGarde
$family
[1] "AvantGarde"

$metrics
[1] "agw_____.afm" "agd_____.afm" "agwo____.afm" "agdo____.afm" "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$Bookman
$family
[1] "Bookman"

$metrics
[1] "bkl_____.afm" "bkd_____.afm" "bkli____.afm" "bkdi____.afm" "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$Courier
$family
[1] "Courier"

$metrics
[1] "Courier.afm"             "Courier-Bold.afm"
[3] "Courier-Oblique.afm"     "Courier-BoldOblique.afm"
[5] "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$Helvetica
$family
[1] "Helvetica"

$metrics
[1] "Helvetica.afm"             "Helvetica-Bold.afm"
[3] "Helvetica-Oblique.afm"     "Helvetica-BoldOblique.afm"
[5] "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$`Helvetica-Narrow`
$family
[1] "Helvetica-Narrow"

$metrics
[1] "hvn_____.afm" "hvnb____.afm" "hvno____.afm" "hvnbo___.afm" "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$NewCenturySchoolbook
$family
[1] "NewCenturySchoolbook"

$metrics
[1] "ncr_____.afm" "ncb_____.afm" "nci_____.afm" "ncbi____.afm" "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$Palatino
$family
[1] "Palatino"

$metrics
[1] "por_____.afm" "pob_____.afm" "poi_____.afm" "pobi____.afm" "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$Times
$family
[1] "Times"

$metrics
[1] "Times-Roman.afm"      "Times-Bold.afm"       "Times-Italic.afm"
[4] "Times-BoldItalic.afm" "Symbol.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$URWGothic
$family
[1] "URWGothic"

$metrics
[1] "a010013l.afm" "a010015l.afm" "a010033l.afm" "a010035l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$URWBookman
$family
[1] "URWBookman"

$metrics
[1] "b018012l.afm" "b018015l.afm" "b018032l.afm" "b018035l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$NimbusMon
$family
[1] "NimbusMon"

$metrics
[1] "n022003l.afm" "n022004l.afm" "n022023l.afm" "n022024l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$NimbusSan
$family
[1] "NimbusSan"

$metrics
[1] "n019003l.afm" "n019004l.afm" "n019023l.afm" "n019024l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$URWHelvetica
$family
[1] "URWHelvetica"

$metrics
[1] "n019003l.afm" "n019004l.afm" "n019023l.afm" "n019024l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$NimbusSanCond
$family
[1] "NimbusSanCond"

$metrics
[1] "n019043l.afm" "n019044l.afm" "n019063l.afm" "n019064l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$CenturySch
$family
[1] "CenturySch"

$metrics
[1] "c059013l.afm" "c059016l.afm" "c059033l.afm" "c059036l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$URWPalladio
$family
[1] "URWPalladio"

$metrics
[1] "p052003l.afm" "p052004l.afm" "p052023l.afm" "p052024l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$NimbusRom
$family
[1] "NimbusRom"

$metrics
[1] "n021003l.afm" "n021004l.afm" "n021023l.afm" "n021024l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$URWTimes
$family
[1] "URWTimes"

$metrics
[1] "n021003l.afm" "n021004l.afm" "n021023l.afm" "n021024l.afm" "s050000l.afm"

$encoding
[1] "default"

attr(,"class")
[1] "Type1Font"

$ComputerModern
$family
[1] "ComputerModern"

$metrics
[1] "CM_regular_10.afm"      "CM_boldx_10.afm"        "CM_italic_10.afm"
[4] "CM_boldx_italic_10.afm" "CM_symbol_10.afm"

$encoding
[1] "TeXtext.enc"

attr(,"class")
[1] "Type1Font"

$ComputerModernItalic
$family
[1] "ComputerModernItalic"

$metrics
[1] "CM_regular_10.afm" "CM_boldx_10.afm"   "cmti10.afm"
[4] "cmbxti10.afm"      "CM_symbol_10.afm"

$encoding
[1] "TeXtext.enc"

attr(,"class")
[1] "Type1Font"

$Japan1
$family
[1] "HeiseiKakuGo-W5"

$metrics
[1] ""           ""           ""           ""           "Symbol.afm"

$cmap
[1] "EUC-H"

$cmapEncoding
[1] "EUC-JP"

$pdfresource
[1] ""

attr(,"class")
[1] "CIDFont"

$Japan1HeiMin
$family
[1] "HeiseiMin-W3"

$metrics
[1] ""           ""           ""           ""           "Symbol.afm"

$cmap
[1] "EUC-H"

$cmapEncoding
[1] "EUC-JP"

$pdfresource
[1] ""

attr(,"class")
[1] "CIDFont"

$Japan1GothicBBB
$family
[1] "GothicBBB-Medium"

$metrics
[1] ""           ""           ""           ""           "Symbol.afm"

$cmap
[1] "EUC-H"

$cmapEncoding
[1] "EUC-JP"

$pdfresource
[1] ""

attr(,"class")
[1] "CIDFont"

$Japan1Ryumin
$family
[1] "Ryumin-Light"

$metrics
[1] ""           ""           ""           ""           "Symbol.afm"

$cmap
[1] "EUC-H"

$cmapEncoding
[1] "EUC-JP"

$pdfresource
[1] ""

attr(,"class")
[1] "CIDFont"

$Korea1
$family
[1] "Baekmuk-Batang"

$metrics
[1] ""           ""           ""           ""           "Symbol.afm"

$cmap
[1] "KSCms-UHC-H"

$cmapEncoding
[1] "CP949"

$pdfresource
[1] ""

attr(,"class")
[1] "CIDFont"

$Korea1deb
$family
[1] "Batang-Regular"

$metrics
[1] ""           ""           ""           ""           "Symbol.afm"

$cmap
[1] "KSCms-UHC-H"

$cmapEncoding
[1] "CP949"

$pdfresource
[1] ""

attr(,"class")
[1] "CIDFont"

$CNS1
$family
[1] "MOESung-Regular"

$metrics
[1] ""           ""           ""           ""           "Symbol.afm"

$cmap
[1] "B5pc-H"

$cmapEncoding
[1] "CP950"

$pdfresource
[1] ""

attr(,"class")
[1] "CIDFont"

$GB1
$family
[1] "BousungEG-Light-GB"

$metrics
[1] ""           ""           ""           ""           "Symbol.afm"

$cmap
[1] "GBK-EUC-H"

$cmapEncoding
[1] "GBK"

$pdfresource
[1] ""

attr(,"class")
[1] "CIDFont"

$CMitalic
$family
[1] "ComputerModern2"

$metrics
[1] "CM_regular_10.afm" "CM_boldx_10.afm"   "cmti10.afm"
[4] "cmbxti10.afm"      "CM_symbol_10.afm"

$encoding
[1] "TeXtext.enc"

attr(,"class")
[1] "Type1Font"


pstscF> ## This duplicates "ComputerModernItalic".
pstscF> CMitalic <- Type1Font("ComputerModern2",
pstscF+                       c("CM_regular_10.afm", "CM_boldx_10.afm",
pstscF+                         "cmti10.afm", "cmbxti10.afm",
pstscF+                          "CM_symbol_10.afm"),
pstscF+                       encoding = "TeXtext.enc")

pstscF> postscriptFonts(CMitalic = CMitalic)

pstscF> ## A CID font for Japanese using a different CMap and
pstscF> ## corresponding cmapEncoding.
pstscF> `Jp_UCS-2` <- CIDFont("TestUCS2",
pstscF+                   c("Adobe-Japan1-UniJIS-UCS2-H.afm",
pstscF+                     "Adobe-Japan1-UniJIS-UCS2-H.afm",
pstscF+                     "Adobe-Japan1-UniJIS-UCS2-H.afm",
pstscF+                     "Adobe-Japan1-UniJIS-UCS2-H.afm"),
pstscF+                   "UniJIS-UCS2-H", "UCS-2")

pstscF> pdfFonts(`Jp_UCS-2` = `Jp_UCS-2`)

pstscF> names(pdfFonts())
 [1] "serif"                "sans"                 "mono"
 [4] "AvantGarde"           "Bookman"              "Courier"
 [7] "Helvetica"            "Helvetica-Narrow"     "NewCenturySchoolbook"
[10] "Palatino"             "Times"                "URWGothic"
[13] "URWBookman"           "NimbusMon"            "NimbusSan"
[16] "URWHelvetica"         "NimbusSanCond"        "CenturySch"
[19] "URWPalladio"          "NimbusRom"            "URWTimes"
[22] "Japan1"               "Japan1HeiMin"         "Japan1GothicBBB"
[25] "Japan1Ryumin"         "Korea1"               "Korea1deb"
[28] "CNS1"                 "GB1"                  "Jp_UCS-2"
>
-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas




More information about the R-help mailing list