Printing/Postscript Fonts And Ghostscript

From KDE Community Wiki

Basic Knowhow About PostScript Fonts and Ghostscript

Adobe, when they specified "PostScript Level 1" (in the first edition of their famous "Red Book", no longer available), named "14 base fonts" to be present on each PostScript processing device (see table below).

For "PostScript Level 2" they extended the list to 35 fonts (see table below).

For "PostScript 3", (the "Level" was dropped from the official name) there is no longer a list; but most printer vendors support in their print engines the same set of 136 fonts (35 from level 2, plus 101 additional ones) that Adobe supports in their own PostScript interpreters (not yet part of table below; TODO).

For some more introductionary clues about PostScript, see for example the KDEPrint Manual, Chapter 4 (a static PDF version is here).

Any PostScript interpreter claiming to support a certain level of the PostScript language is expected to handle these font names, even if the fonts themselves are not embedded in the PostScript file. This usually means...

  • ...either the original font is shipped with the interpreter (which means it has to be licensed from [in exchange of paying $$$ to] Adobe)
  • ...or another, similar-enough font is used, and is recognized by an alias name that maps to the original PS font names.

All recent versions of Ghostscript support all level 2 fonts by themselves via a respective alias name for a "similar-enough" font (see table below). If a user privately owns "real" Adobe PS fonts (he may have bought or otherwise licensed them), Ghostscript is able to use these instead).

Using the 35 base font names of PostScript level for your documents, should not create any problem with printing on paper or creating PDFs. Even if Ghostscript replaces the respective original fonts, the similarity should be close enough...

  • ...to make any difference very hard to tell, and
  • ...to certainly avoid any deviations in line or page breaks.

Note 1: In general, KDE and Qt applications (including KOffice) can only generate PostScript Level 1 printfiles (unless they "do their own thing" when it comes to printing, like f.e. Scribus does so well). Other Linux desktop applications (OpenOffice, Acrobat Reader, Mozilla/Firefox do support Level2 or even Level 3 output).

Note 2: To repeat, what has been said multiple times: KDEPrint does not create the printfiles. It only processes them; "processing" means: allowing the user to set specific job options, which are sent to and should be applied by the print subsystem (CUPS in most cases) to the final outcome. KDEPrint can call some external "pre-filters" to be run against the printfiles before they go to CUPS (such as "put-2-pages-on-each-sheet" or "make-a-booklet"). But even in these cases, it is not KDEPrint itself that does create the outcome from the pre-filters.



PostScript Level 2+1 fonts and their Ghostscript substitutes
 
PostScript
Level 2
font names
Ghostscript substitutes
(alias names)
PostScript
Level 1
font names
AvantGarde-Book URWGothicL-Book n.a.
AvantGarde-BookOblique URWGothicL-BookObli n.a.
AvantGarde-Demi URWGothicL-Demi n.a.
AvantGarde-DemiOblique URWGothicL-DemiObli n.a.
Bookman-Demi URWBookmanL-DemiBold n.a.
Bookman-DemiItalic URWBookmanL-DemiBoldItal n.a.
Bookman-Light URWBookmanL-Ligh n.a.
Bookman-LightItalic URWBookmanL-LighItal n.a.
Courier NimbusMonL-Regu present
Courier-Bold NimbusMonL-Bold present
Courier-BoldOblique NimbusMonL-BoldObli present
Courier-Oblique NimbusMonL-ReguObli present
Helvetica NimbusSanL-Regu present
Helvetica-Bold NimbusSanL-Bold present
Helvetica-BoldOblique NimbusSanL-BoldItal present
Helvetica-Narrow NimbusSanL-ReguCond n.a.
Helvetica-Narrow-Bold NimbusSanL-BoldCond n.a.
Helvetica-Narrow-BoldOblique NimbusSanL-BoldCondItal n.a.
Helvetica-Narrow-Oblique NimbusSanL-ReguCondItal n.a.
Helvetica-Oblique NimbusSanL-ReguItal present
NewCenturySchlbk-Bold CenturySchL-Bold n.a.
NewCenturySchlbk-BoldItalic CenturySchL-BoldItal n.a.
NewCenturySchlbk-Italic CenturySchL-Ital n.a.
NewCenturySchlbk-Roman CenturySchL-Roma n.a.
Palatino-Bold URWPalladioL-Bold n.a.
Palatino-BoldItalic URWPalladioL-BoldItal n.a.
Palatino-Italic URWPalladioL-Ital n.a.
Palatino-Roman URWPalladioL-Roma n.a.
Symbol StandardSymL present
Times-Bold NimbusRomNo9L-Medi present
Times-BoldItalic NimbusRomNo9L-MediItal present
Times-Italic NimbusRomNo9L-ReguItal present
Times-Roman NimbusRomNo9L-Regu present
ZapfChancery-MediumItalic URWChanceryL-MediItal n.a.
ZapfDingbats Dingbats present


14 PostScript Level 1 "base fonts"

  • Courier
  • Courier-Bold
  • Courier-BoldOblique
  • Courier-Oblique
  • Helvetica
  • Helvetica-Bold
  • Helvetica-BoldOblique
  • Helvetica-Oblique
  • Symbol
  • Times-Bold
  • Times-BoldItalic
  • Times-Roman
  • Times-Italic
  • ZapfDingbats


35 PostScript Level 2 "base fonts"

  • Bookman-Demi
  • Bookman-DemiItalic
  • Bookman-Light
  • Bookman-LightItalic
  • Courier
  • Courier-Oblique
  • Courier-Bold
  • Courier-BoldOblique
  • AvantGarde-Book
  • AvantGarde-BookOblique
  • AvantGarde-Demi
  • AvantGarde-DemiOblique
  • Helvetica
  • Helvetica-Oblique
  • Helvetica-Bold
  • Helvetica-BoldOblique
  • Helvetica-Narrow
  • Helvetica-Narrow-Oblique
  • Helvetica-Narrow-Bold
  • Helvetica-Narrow-BoldOblique
  • Palatino-Roman
  • Palatino-Italic
  • Palatino-Bold
  • Palatino-BoldItalic
  • NewCenturySchlbk-Roman
  • NewCenturySchlbk-Italic
  • NewCenturySchlbk-Bold
  • NewCenturySchlbk-BoldItalic
  • Times-Roman
  • Times-Italic
  • Times-Bold
  • Times-BoldItalic
  • Symbol
  • ZapfChancery-MediumItalic
  • ZapfDingbats


136 PostScript 3 fonts

[TODO]


Where the Ghostscript font mappings are described

Ghostscript ships with a file called Fontmap.GS which describes the font mappings. Fontmap.GS is...

  • ...in package ghostscript-library on SUSE-10.0
  • ...in packages gs-afpl and/or gs-gpl and/or gs-esp on Debian-Sid

Run this command to get the path to Fontmap.GS:

  • on Debian:
dpkg -L gs-{esp,afpl,gpl} | grep Fontmap.GS
  • on SUSE-10.0:
rpm -ql ghostscript-library | grep Fontmap.GS

Run this command to obtain a textfile gs-aliases-for-ps2-fonts.txt to verify above table for SUSE-10.0 (you can copy and paste these lines if you include each one of the trailing '\' ["backslashes"]):

sed -n '/\/Bookman-Demi/,/\/ZapfDingbats/p' \
    /usr/share/ghostscript/8.15/lib/Fontmap.GS \
    | tee gs-aliases-for-ps2-fonts.txt

This should give you this output:

/Bookman-Demi                   /URWBookmanL-DemiBold   ;
/Bookman-DemiItalic             /URWBookmanL-DemiBoldItal       ;
/Bookman-Light                  /URWBookmanL-Ligh       ;
/Bookman-LightItalic            /URWBookmanL-LighItal   ;

/Courier                        /NimbusMonL-Regu        ;
/Courier-Oblique                /NimbusMonL-ReguObli    ;
/Courier-Bold                   /NimbusMonL-Bold        ;
/Courier-BoldOblique            /NimbusMonL-BoldObli    ;

/AvantGarde-Book                /URWGothicL-Book        ;
/AvantGarde-BookOblique         /URWGothicL-BookObli    ;
/AvantGarde-Demi                /URWGothicL-Demi        ;
/AvantGarde-DemiOblique         /URWGothicL-DemiObli    ;

/Helvetica                      /NimbusSanL-Regu        ;
/Helvetica-Oblique              /NimbusSanL-ReguItal    ;
/Helvetica-Bold                 /NimbusSanL-Bold        ;
/Helvetica-BoldOblique          /NimbusSanL-BoldItal    ;

/Helvetica-Narrow               /NimbusSanL-ReguCond    ;
/Helvetica-Narrow-Oblique       /NimbusSanL-ReguCondItal        ;
/Helvetica-Narrow-Bold          /NimbusSanL-BoldCond    ;
/Helvetica-Narrow-BoldOblique   /NimbusSanL-BoldCondItal        ;

/Palatino-Roman                 /URWPalladioL-Roma      ;
/Palatino-Italic                /URWPalladioL-Ital      ;
/Palatino-Bold                  /URWPalladioL-Bold      ;
/Palatino-BoldItalic            /URWPalladioL-BoldItal  ;

/NewCenturySchlbk-Roman         /CenturySchL-Roma       ;
/NewCenturySchlbk-Italic        /CenturySchL-Ital       ;
/NewCenturySchlbk-Bold          /CenturySchL-Bold       ;
/NewCenturySchlbk-BoldItalic    /CenturySchL-BoldItal   ;

/Times-Roman                    /NimbusRomNo9L-Regu     ;
/Times-Italic                   /NimbusRomNo9L-ReguItal ;
/Times-Bold                     /NimbusRomNo9L-Medi     ;
/Times-BoldItalic               /NimbusRomNo9L-MediItal ;

/Symbol                         /StandardSymL   ;

The Fontmap.GS will probably contain more font aliases, for other font families. To see all of those, open Fontmap.GS with an editor.