% !TEX TS-program = pdflatex
\documentclass[11pt]{amsart}
\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\usepackage{url}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\title{About the 9.07 Distribution}
\author{Richard Koch}
\date{\today}                                           % Activate to display a given date or no date

\begin{document}
\maketitle
\section{Introduction}

The Ghostscript 9.07 install package should work on Leopard and higher systems, for both Intel and PPC. 

Early MacTeX distributions of TeX for OS X installed three packages which came directly from Gerben Wierda's i-Installer packages: Ghostscript, ImageMagick, and Font Utilities (primarily FontForge and the Fondu Mac Font cli Tools). Starting with MacTeX-2008, Gerben's packages were replaced with packages compiled from scratch. Ghostscript and ImageMagick were compiled directly and the second package was pared down to the single utility ``convert.'' The Font Utilities package was omitted entirely.

The most important package is Ghostscript. I have constructed an install package for the most recent release, Ghostscript 9.07. The source code comes from \url{http://www.ghostscript.com}, released on February 14, 2013. (Ghostscript fonts came from \url{http://sourceforge.net/projects/gs-fonts/}, released on December 24, 2003. However, recent versions of Ghostscript contains compressed copies of the fonts inside the binary, so the font folder is no longer needed.)

I'd like users to test this release, particularly since several different installations need to be tested: PPC on system 10.5 and Intel on systems 10.5, 10.6, 10.7, and 10.8; each installation has a version compiled with X11 support and a version compiled without X11 support.  

Gerben installed two versions of the ghostscript binary: gs-X11 with X11 support and gs-noX11 without X11 support. At install time, he set the  symbolic link ``gs'' to point to the appropriate binary, depending on whether the user has installed X11 or not. This package does the same.

\section{What Is Installed}

Ghostscript binaries are installed in \url{/usr/local/bin}. Ghostscript support files are installed in  \url{/usr/local/share/ghostscript/9.07} and man pages are placed in \url{/usr/local/share/man}. (Ghostscript fonts were installed in \url{/usr/local/share/ghostscript/fonts}, but aren't any longer.)

\section{The Binaries}

The install package contains four binaries, gs-X11, gs-noX11, gs-X11-64Bit, and gs-noX11-64Bit. The first two are universal binaries with 32 bit code for Intel and 32 bit code for PPC. The second two are universal binaries with Intel 32 bit and 64 bit code. When the package is installed on Leopard machines, the gs-X11-64Bit and gs-noX11-64Bit binaries are removed. Then a symbolic link named gs is created pointing to either gs-X11 or gs-noX11 depending on whether X11 is installed or not. 

On Snow Leopard or higher, gs-X11 and gs-noX11 are removed and gs-X11-64Bit and gs-noX11-64Bit are renamed gs-X11 and gs-noX11. Then the
gs symbolic link is created as before. The result is that machines running Snow Leopard or higher run 64 bit code, except for a few early Intel machines
which only contained 32 bit processors. Note that on Snow Leopard and Lion, X11 is automatically intstalled, so the gs-X11 binary runs. But X11 is
not automatically installed in Mountain Lion, so gs-noX11 may well be activated there.

At the end of installation, all machines will contain gs-X11 and gs-noX11 and a symbolic link gs to the appropriate binary. Notice that a user who does not have X11 but later installs it can reset the gs link and get a ghostscript with X11 support.

\section{Providing Access to TeX Font Files}

In 2012, David Arnold reported that MetaPost can create illustrations containing computer modern fonts. If the output is later processed
in TeX + DVI mode, these fonts need to be accessed by Ghostscript. Previous versions of Ghostscript in MacTeX substituted default postscript fonts for these
missing computer modern fonts.

Bruno Voisin studied this problem extensively and provided a natural and elegant solution to the problem. The solution involves adding
two files named ``Fontmap'' and ``Fontmap.cmr'' to /usr/local/share/ghostscript/9.07/Resource/Init and adding symbolic links to the pfb files in TeX
to /usr/local/share/ghostscript/9.07/Resource/Font. For example, a typical symbolic link is
\begin{verbatim}
 blex.pfb->/Library/TeX/Root/texmf-dist/fonts/type1/public/belleek/blex.pfb
\end{verbatim}
Note that this link passes through the /Library/TeX/Root link provided by the TeX Dist data structure, and thus causes Ghostscript to use fonts
in the currently active TeX distribution. This method isn't entirely foolproof if TeX Live should change the location of important pfb files. But the
Ghostscript package in MacTeX will be adjusted for the latest release of TeX Live, so the links should satisfy most users.







\end{document}  