Outline and bitmap fonts compared

Last update: Mon Dec 1 09:45:53 2003
Fri Apr 14 07:45:27 2006

Original version: Mon Feb 22 08:02:04 1999]

In principle, given adequate resolution, the screen preview quality of documents set in bitmap fonts, and set in outline fonts, should be comparable, since the outline fonts have to be rasterized dynamically anyway for use on a printer or a display screen.

Sadly, this is not the case with versions of Adobe Acrobat Reader, acroread, and Exchange, acroexch (version 5.x or earlier); they do a poor job of downsampling high-resolution bitmap fonts to low-resolution screen fonts. This is particularly inexcusable, inasmuch as the co-founder, and CEO, of Adobe Systems, is the author of one of the earliest publications on the use of gray levels for font display: [ John E. Warnock, The display of characters using gray level sample arrays, Computer Graphics, 14 (3), 302--307, July, 1980. ]

By contrast, Paul Vojta's excellent xdvi TeX DVI file viewer for the X Window System does a fine job of subsampling laserprinter fonts (typically 300dpi or 600dpi) down to screen resolutions that are integer divisors of the original font resolution, provided that the display is capable of more than two intensity levels (i.e., color or gray-scale).

In mid-2003, Adobe released Acrobat 6 for Microsoft Windows and Apple MacOS (but alas, not for any Unix platform), and that version of Reader now does a much better job with bitmap fonts.

Also, recent research from the University of Nottingham Electronic Publishing Research Group has developed a plugin for Acrobat Reader, and font substitution tools that may make it possible to convert some existing PDF files produced with (La)TeX + dvips + (bitmap fonts) + (a PostScript-to-PDF conversion tool) to PDF files with outline fonts:

@String{j-SPE                   = "Soft\-ware\emdash Prac\-tice and Experience"}

  author =       "S. G. Probets and D. F. Brailsford",
  title =        "Substituting outline fonts for bitmap fonts in
                 archived {PDF} files",
  journal =      j-SPE,
  volume =       "33",
  number =       "9",
  pages =        "885--899",
  day =          "25",
  month =        jul,
  year =         "2003",
  CODEN =        "SPEXBL",
  ISSN =         "0038-0644",
  bibdate =      "Sat Nov 29 17:39:47 MST 2003",
  bibsource =    "http://www3.interscience.wiley.com/journalfinder.html;
  URL =          "http://www.cs.nott.ac.uk/~dfb/Publications/Download/2003/Probets03.pdf;
  acknowledgement = ack-nhfb,
  DOI =          "10.1002/spe.532",
  onlinedate =   "25 Jun 2003",

The rest of this document shows how you can make an experiment to see the differences for yourself on your own screen.

Preparation for the experiment

To view on your screen the samples given below, you need to have a Portable Document Format (PDF) file viewer, often either Acrobat Reader or Acrobat Exchange, installed on your system. The former is free, and available from Adobe Systems for download in versions for popular operating systems. The latter was formerly a standalone product, but is now included in the Adobe Acrobat Pro release.

Recent (from about 1999) releases of Aladdin Ghostscript and GNU Ghostscript support display of PDF files, and conversion between PostScript and PDF files.

There is also the xpdf program available from Foolabs.

Finally, there is another PostScript-to-PDF converter, PStill (pronounced ``p-still'') which runs on Unix and Microsoft Windows systems.

If you don't have a PDF viewer installed, you may still be able to download the sample PostScript files, and view them on your screen with a PostScript previewer. On UNIX systems, these have names like gs, ghostview, gv, showps (SGI), xpsview (SGI), and pageview (Sun).

Besides having a PDF viewer installed, you should have informed your Web browser how to invoke the viewer. First(ly), on UNIX systems, there should be an entry in the browser's mime.types file to relate a .pdf file extension to an application type, like this:

application/pdf                pdf

Second(ly), there must also be an entry in the browser's mailcap file that tells it what program to run to handle the PDF file, like this one for Adobe Acrobat Reader:

application/pdf;	acroread -tempFile %s

If you cannot modify these system-wide browser files, then put those entries in private $HOME/.mime.types and $HOME/.mailcap files, and then once they are working properly, show your system manager why they should be moved to the system-wide files.

Recent versions of acroread can be configured as netscape plugins, as documented in the INSTGUID.TXT file in the Acrobat Reader distribution. This will result in the PDF display appearing in the netscape window, rather than in a separate window. In such a case, you must not include the above line in the mailcap file.

Outline and bitmap fonts: experimental results

The samples below are taken from a larger document, The Impact of Memory and Architecture on Computer Performance , which I wrote in early 1994 to serve as supplemental material for a course that I created and taught on Advanced Scientific Computing. The document is available in both PDF (488KB), PostScript (918KB), and gzipped PostScript (307KB) form.

The outline fonts are Bigelow & Holmes LucidaBright, LucidaBright-Demi, LucidaBright-Italic, LucidaBright-Oblique, LucidaNewMath-AltItalic, LucidaNewMath-Arrows, LucidaNewMath-Symbol, LucidaSans, LucidaSans-Demi, and LucidaSans-Typewriter from Y&Y . The Lucida family is well known through its use for the last several years in Scientific American . It was initially designed expressly for high legibility on low-resolution printing devices, and consequently, its lower-case letters are somewhat larger than in other fonts. This makes it a good choice for screen display as well. It also means that the quality of the bitmap fonts used in this experiment is about as good as possible; results with other fonts may be significantly worse.

The bitmap forms were generated by Paul Vojta's gsftopk utility, which rasterizes Type 1 font outlines to any requested resolution, without making device-specific adjustments like Metafont is capable of.

When you view these files, be sure to make side-by-side comparisons between them by launching multiple browser windows, and experimenting with the PDF viewer magnification option.

Size Filename Description
181553 sample-p-10-outline+bitmap-fonts.pdf Side-by-side display of outline and 600dpi bitmap font pages. This is a good way to see a comparison, particularly if you use your PDF file viewer's magnification facility.
122181 sample-pp-9-11-300dpi-bitmap-fonts.pdf 3 pages in 300dpi bitmap fonts
129793 sample-pp-9-11-400dpi-bitmap-fonts.pdf 3 pages in 400dpi bitmap fonts
130410 sample-pp-9-11-600dpi-bitmap-fonts.pdf 3 pages in 600dpi bitmap fonts
121862 sample-pp-9-11-1200dpi-bitmap-fonts.pdf 3 pages in 1200dpi bitmap fonts
129433 sample-pp-9-11-outline-fonts.pdf 3 pages in Lucida outline fonts

Here are the same views, this time in PostScript form:

Size Filename Description
439573 sample-p-10-outline+bitmap-fonts.ps Side-by-side display of outline and 600dpi bitmap font pages
83304 sample-pp-9-11-300dpi-bitmap-fonts.ps 3 pages in 300dpi bitmap fonts
107700 sample-pp-9-11-400dpi-bitmap-fonts.ps 3 pages in 400dpi bitmap fonts
174928 sample-pp-9-11-600dpi-bitmap-fonts.ps 3 pages in 600dpi bitmap fonts
532327 sample-pp-9-11-1200dpi-bitmap-fonts.ps 3 pages in 1200dpi bitmap fonts
531833 sample-pp-9-11-outline-fonts.ps 3 pages in Lucida outline fonts

Using outline fonts with TeX

The definitive treatment on using PostScript outline fonts with TeX can be found in Chapters 10 and 11 of this excellent recent book:

@String{pub-AW                  = "Ad{\-d}i{\-s}on-Wes{\-l}ey"}
@String{pub-AW:adr              = "Reading, MA, USA"}

  author =       "Michel Goossens and Sebastian Rahtz and Frank
  title =        "The {\LaTeX} Graphics Companion: Illustrating
                 Documents with {\TeX} and {PostScript}",
  publisher =    pub-AW,
  address =      pub-AW:adr,
  pages =        "xxi + 554",
  year =         "1997",
  ISBN =         "0-201-85469-4",
  LCCN =         "Z253.4.L38G663 1997",
  bibdate =      "Fri Jul 11 07:51:47 1997",
  price =        "US\$39.75",
  series =       "Tools and Techniques for Computer Typesetting",
  acknowledgement = ack-nhfb,
  keywords =     "LaTeX (Computer file); Computerized typesetting.;
                 PostScript (Computer program language); Scientific
                 illustration -- Computer programs.; Mathematics
                 printing -- Computer programs.; Technical publishing --
                 Computer programs.",

Current TeX DVI drivers that provide PostScript output use a mapping file, psfonts.map, to relate TeX font names to physical file names found in the font search path. Typical entries in this file look like this:

cmr10   cmr10                                             <cmr10.pfb
rbcrbie Courier10PitchBT-BoldItalic   "1.2 ExtendFont"    <bcrbi.pfb
rptmb   Times-Bold
rptmbo  Times-Bold                    ".167 SlantFont"
lbr     LucidaBright                                      <lbr.pfa

The first entry on each line is the TeX Font Metric (.tfm) file base name. The second entry is the PostScript font name. The remaining entries may be a quoted string containing driver-specific PostScript code for modifying the font, or a left-angle-bracket-prefixed PostScript font file name, generally ending in .pfa (PostScript Font ASCII) or .pfb (PostScript Font Binary).

The presence of this last item tells the DVI driver that the font must be included in the output PostScript file. Otherwise, the font is assumed to be printer-resident (or else, to be supplied later by the printer driver, although that practice is uncommon on UNIX systems, and also, makes the PostScript file useless elsewhere).

Normally, psfonts.map does not contain entries for the standard Computer Modern family, because (a) not all sites have outline versions installed, (b) unless outline font subsetting is supported by the DVI driver, the output PostScript files may be considerably larger than with bitmap fonts, and (c) outline fonts must be rasterized in the printer. Points (b) and (c) both contribute to increased print times.

Modern TeX installations include a MakeTeXPK script, or its equivalent, that DVI drivers invoke to create a missing font on-the-fly. That script examines the psfonts.map to see if the requested font is specified there. If so, it invokes a font rasterizer, such as gsftopk or ps2pk, to produce a standard TeX PK-format bitmap font. Otherwise, it invokes Metafont to generate a GF-format bitmap font, and then runs gftopk to convert that to a more compact PK-format bitmap font.

Thus, to make your TeX DVI driver use outline fonts instead of bitmap fonts, you need to make sure that psfonts.map lists all of the fonts that you want to use in outline form.

At my site, we normally want to use bitmap fonts for fast compact PostScript output on local printers, but for use in PostScript files for the World Wide Web, or in PDF files, we want outline fonts. The normal DVI drivers default to using bitmap fonts. Outline fonts are provided by scripts dvialw-type1 and dvips-type1. They simply redefine the search path used by the DVI driver to find psfonts.map, so that a directory containing an extended psfonts.map file is placed before the directory that has the normal one, then invoke the DVI driver. In particular, the extended mapping file has entries for all of the members of the Computer Modern font family, which is the one that TeX uses by default.

There are two available sets of Computer Modern outline fonts, the BaKoMa family, and the BlueSky Research/AMS family, both available in the Comprehensive TeX Archive Network (CTAN) under the directory /tex-archive/fonts/cm/ps-type1. Visit the TUG CTAN server for a list of mirror sites to find one near you. Both font sets carry license restrictions that govern their use; make sure to read them!