Variable: ps-font-info-database
ps-font-info-database is a customizable variable defined in
ps-print.el.gz.
Value
Large value
((Courier
(fonts (normal . "Courier") (bold . "Courier-Bold")
(italic . "Courier-Oblique")
(bold-italic . "Courier-BoldOblique"))
(size . 10.0) (line-height . 10.55) (space-width . 6.0)
(avg-char-width . 6.0))
(Helvetica
(fonts (normal . "Helvetica") (bold . "Helvetica-Bold")
(italic . "Helvetica-Oblique")
(bold-italic . "Helvetica-BoldOblique"))
(size . 10.0) (line-height . 11.56) (space-width . 2.78)
(avg-char-width . 5.09243))
(Times
(fonts (normal . "Times-Roman") (bold . "Times-Bold")
(italic . "Times-Italic") (bold-italic . "Times-BoldItalic"))
(size . 10.0) (line-height . 11.0) (space-width . 2.5)
(avg-char-width . 4.71432))
(Palatino
(fonts (normal . "Palatino-Roman") (bold . "Palatino-Bold")
(italic . "Palatino-Italic")
(bold-italic . "Palatino-BoldItalic"))
(size . 10.0) (line-height . 12.1) (space-width . 2.5)
(avg-char-width . 5.08676))
(Helvetica-Narrow
(fonts (normal . "Helvetica-Narrow")
(bold . "Helvetica-Narrow-Bold")
(italic . "Helvetica-Narrow-Oblique")
(bold-italic . "Helvetica-Narrow-BoldOblique"))
(size . 10.0) (line-height . 11.56) (space-width . 2.2796)
(avg-char-width . 4.17579))
(NewCenturySchlbk
(fonts (normal . "NewCenturySchlbk-Roman")
(bold . "NewCenturySchlbk-Bold")
(italic . "NewCenturySchlbk-Italic")
(bold-italic . "NewCenturySchlbk-BoldItalic"))
(size . 10.0) (line-height . 12.15) (space-width . 2.78)
(avg-char-width . 5.31162))
(AvantGarde-Book
(fonts (normal . "AvantGarde-Book")
(italic . "AvantGarde-BookOblique"))
(size . 10.0) (line-height . 11.77) (space-width . 2.77)
(avg-char-width . 5.45189))
(AvantGarde-Demi
(fonts (normal . "AvantGarde-Demi")
(italic . "AvantGarde-DemiOblique"))
(size . 10.0) (line-height . 12.72) (space-width . 2.8)
(avg-char-width . 5.51351))
(Bookman-Demi
(fonts (normal . "Bookman-Demi") (italic . "Bookman-DemiItalic"))
(size . 10.0) (line-height . 11.77) (space-width . 3.4)
(avg-char-width . 6.05946))
(Bookman-Light
(fonts (normal . "Bookman-Light") (italic . "Bookman-LightItalic"))
(size . 10.0) (line-height . 11.79) (space-width . 3.2)
(avg-char-width . 5.67027))
(Symbol (fonts (normal . "Symbol")) (size . 10.0)
(line-height . 13.03) (space-width . 2.5)
(avg-char-width . 3.24324))
(Zapf-Dingbats (fonts (normal . "Zapf-Dingbats")) (size . 10.0)
(line-height . 9.63) (space-width . 2.78)
(avg-char-width . 2.78))
(ZapfChancery-MediumItalic
(fonts (normal . "ZapfChancery-MediumItalic")) (size . 10.0)
(line-height . 11.45) (space-width . 2.2) (avg-char-width . 4.10811))
(Zapf-Chancery-MediumItalic
(fonts (normal . "ZapfChancery-MediumItalic")) (size . 10.0)
(line-height . 11.45) (space-width . 2.2) (avg-char-width . 4.10811)))
Documentation
Font info database.
Each element comprises: font family (the key), name, bold, italic, bold-italic,
reference size, line height, space width, average character width.
To get the info for another specific font (say Helvetica), do the following:
- create a new buffer
- generate the PostScript image to a file (C-u (universal-argument) M-x ps-print-buffer (ps-print-buffer))
- open this file and delete the leading % (which is the PostScript comment
character) from the line
% 3 cm 20 cm moveto 10/Courier ReportFontInfo showpage
to get the line
3 cm 20 cm moveto 10/Helvetica ReportFontInfo showpage
- add the values to ps-font-info-database.
You can get all the fonts of YOUR printer using ReportAllFontInfo.
Note also that ps-print DOESN'T download any font to your printer, instead it uses the fonts resident in your printer.
This variable was added, or its default value changed, in Emacs 20.
Source Code
;; Defined in /usr/src/emacs/lisp/ps-print.el.gz
;;; Fonts
(defcustom ps-font-info-database
'((Courier ; the family key
(fonts (normal . "Courier")
(bold . "Courier-Bold")
(italic . "Courier-Oblique")
(bold-italic . "Courier-BoldOblique"))
(size . 10.0)
(line-height . 10.55)
(space-width . 6.0)
(avg-char-width . 6.0))
(Helvetica ; the family key
(fonts (normal . "Helvetica")
(bold . "Helvetica-Bold")
(italic . "Helvetica-Oblique")
(bold-italic . "Helvetica-BoldOblique"))
(size . 10.0)
(line-height . 11.56)
(space-width . 2.78)
(avg-char-width . 5.09243))
(Times
(fonts (normal . "Times-Roman")
(bold . "Times-Bold")
(italic . "Times-Italic")
(bold-italic . "Times-BoldItalic"))
(size . 10.0)
(line-height . 11.0)
(space-width . 2.5)
(avg-char-width . 4.71432))
(Palatino
(fonts (normal . "Palatino-Roman")
(bold . "Palatino-Bold")
(italic . "Palatino-Italic")
(bold-italic . "Palatino-BoldItalic"))
(size . 10.0)
(line-height . 12.1)
(space-width . 2.5)
(avg-char-width . 5.08676))
(Helvetica-Narrow
(fonts (normal . "Helvetica-Narrow")
(bold . "Helvetica-Narrow-Bold")
(italic . "Helvetica-Narrow-Oblique")
(bold-italic . "Helvetica-Narrow-BoldOblique"))
(size . 10.0)
(line-height . 11.56)
(space-width . 2.2796)
(avg-char-width . 4.17579))
(NewCenturySchlbk
(fonts (normal . "NewCenturySchlbk-Roman")
(bold . "NewCenturySchlbk-Bold")
(italic . "NewCenturySchlbk-Italic")
(bold-italic . "NewCenturySchlbk-BoldItalic"))
(size . 10.0)
(line-height . 12.15)
(space-width . 2.78)
(avg-char-width . 5.31162))
;; got no bold for the next ones
(AvantGarde-Book
(fonts (normal . "AvantGarde-Book")
(italic . "AvantGarde-BookOblique"))
(size . 10.0)
(line-height . 11.77)
(space-width . 2.77)
(avg-char-width . 5.45189))
(AvantGarde-Demi
(fonts (normal . "AvantGarde-Demi")
(italic . "AvantGarde-DemiOblique"))
(size . 10.0)
(line-height . 12.72)
(space-width . 2.8)
(avg-char-width . 5.51351))
(Bookman-Demi
(fonts (normal . "Bookman-Demi")
(italic . "Bookman-DemiItalic"))
(size . 10.0)
(line-height . 11.77)
(space-width . 3.4)
(avg-char-width . 6.05946))
(Bookman-Light
(fonts (normal . "Bookman-Light")
(italic . "Bookman-LightItalic"))
(size . 10.0)
(line-height . 11.79)
(space-width . 3.2)
(avg-char-width . 5.67027))
;; got no bold and no italic for the next ones
(Symbol
(fonts (normal . "Symbol"))
(size . 10.0)
(line-height . 13.03)
(space-width . 2.5)
(avg-char-width . 3.24324))
(Zapf-Dingbats
(fonts (normal . "Zapf-Dingbats"))
(size . 10.0)
(line-height . 9.63)
(space-width . 2.78)
(avg-char-width . 2.78))
(ZapfChancery-MediumItalic
(fonts (normal . "ZapfChancery-MediumItalic"))
(size . 10.0)
(line-height . 11.45)
(space-width . 2.2)
(avg-char-width . 4.10811))
;; We keep this wrong entry name (but with correct font name) for
;; backward compatibility.
(Zapf-Chancery-MediumItalic
(fonts (normal . "ZapfChancery-MediumItalic"))
(size . 10.0)
(line-height . 11.45)
(space-width . 2.2)
(avg-char-width . 4.10811))
)
"Font info database.
Each element comprises: font family (the key), name, bold, italic, bold-italic,
reference size, line height, space width, average character width.
To get the info for another specific font (say Helvetica), do the following:
- create a new buffer
- generate the PostScript image to a file (\\[universal-argument] \\[ps-print-buffer])
- open this file and delete the leading `%' (which is the PostScript comment
character) from the line
`% 3 cm 20 cm moveto 10/Courier ReportFontInfo showpage'
to get the line
`3 cm 20 cm moveto 10/Helvetica ReportFontInfo showpage'
- add the values to `ps-font-info-database'.
You can get all the fonts of YOUR printer using `ReportAllFontInfo'.
Note also that ps-print DOESN'T download any font to your printer, instead it
uses the fonts resident in your printer."
:type '(repeat
(list :tag "Font Definition"
(symbol :tag "Font Family")
(cons :format "%v"
(const :format "" fonts)
(repeat :tag "Faces"
(cons (choice :menu-tag "Font Weight/Slant"
:tag "Font Weight/Slant"
(const normal)
(const bold)
(const italic)
(const bold-italic)
(symbol :tag "Face"))
(string :tag "Font Name"))))
(cons :format "%v"
(const :format "" size)
(number :tag "Reference Size"))
(cons :format "%v"
(const :format "" line-height)
(number :tag "Line Height"))
(cons :format "%v"
(const :format "" space-width)
(number :tag "Space Width"))
(cons :format "%v"
(const :format "" avg-char-width)
(number :tag "Average Character Width"))))
:version "20"
:group 'ps-print-font)