![[weng1 mai4 ke3]](/meng/inc/wmk.gif)
click to see · about · academic · photography · hacking · random · people · visitors' book
If you are here looking for a copy of the Sabon font, you won't find it here; this font is copyrighted and not freely distributable. You can obtain it from the Adobe Type Library (for a price). If you need the font to follow these instructions, buy the Windows version.
Many thanks to David Tulloh for pointing out that the fonts/psfonts/adobe directory has disappeared from CTAN. I have archived this directory here as psfonts-adobe.tar.gz (3168k), and combined the CTAN files required into sabon-tetex.tar.gz (72k).
This document documents my attempts to get the Adobe Sabon Type 1 font installed on a host running TeTeX-1.0.2 under Debian Woody (3.0-STABLE). It is intended to show the process step-by-step without baffling TeX jargon.
It will almost certainly work with TeTeX on other hosts, although you will probably have to change the pathnames. I would imagine that using other TeX/LaTeX distributions will probably not work without significant fiddling first.
In addition, I might add that it probably violates many Debian and TeTeX packaging guidelines, as it is a big hack. Your mileage may vary.
You can download all files generated (except the fonts, but including the VF and TFM mappings) in sabon-tetex.tar.gz. It should be unpacked in /usr/share/texmf.
You will obviously need the font itself. Here we demonstrate how to pull it out of ATM off a PC. Alternatively, you can download it from the Adobe site above.
First of all, find out what the filename is.
$ grep Sabon /usr/share/texmf/fontname/adobe.map psbb8a Sabon-Bold A 088 sab_____ psbbi8a Sabon-BoldItalic A 088 sabi____ psbri8a Sabon-Italic A 088 sai_____ psbr8a Sabon-Roman A 088 sar_____ psbbij8a Sabon-BoldItalicOsF A 197 sabio___ psbbj8a Sabon-BoldOsF A 197 sabof___ psbrij8a Sabon-ItalicOsF A 197 saiof___ psbrc8a Sabon-RomanSC A 197 sarsc___
The first column denotes the TeX name, and the last denotes the Adobe filename.
We are only going to take font 088, as that is the only one that I have. On the PC, Adobe Type Manager traditionally installs in c:\psfonts.
C:\psfonts>dir sa*.pfb
Volume in drive C is Système
Volume Serial Number is 0CF7-F795
Directory of C:\psfonts
18/09/1998 12:47p 51,482 sabi____.PFB
18/09/1998 12:47p 50,864 sab_____.PFB
18/09/1998 12:47p 52,219 sai_____.PFB
18/09/1998 12:47p 48,954 sar_____.PFB
4 File(s) 203,519 bytes
0 Dir(s) 9,456,738,304 bytes free
This part is all fairly self explanatory. We need to transfer the files from the PC, and rename them to TeX names as described above.
# cd /usr/share/texmf/fonts/type1/adobe # mkdir sabon # cd sabon
You copy your files into this directory.
# ls -l total 216 -rwx------ 1 root root 50864 Sep 22 22:06 sab_____.PFB -rwx------ 1 root root 51482 Sep 22 22:06 sabi____.PFB -rwx------ 1 root root 52219 Sep 22 22:06 sai_____.PFB -rwx------ 1 root root 48954 Sep 22 22:06 sar_____.PFB
Now we rename them and set the permissions.
# mv sab_____.PFB psbb8a.pfb # mv sabi____.PFB psbbi8a.pfb # mv sai_____.PFB psbri8a.pfb # mv sar_____.PFB psbr8a.pfb # chmod 755 . # chmod 644 *
Always remember to rehash the paths after you add or remove a file from the texmf tree.
# cd /usr/share/texmf # mktexlsr mktexlsr: Updating /usr/local/lib/texmf/ls-R... mktexlsr: Updating /var/lib/texmf/ls-R... mktexlsr: Updating /var/spool/texmf/ls-R... mktexlsr: Done.
We need to tell dvips about the new font, so that it can include it into the PostScript output stream at the appropriate place.
If you are lucky, there will already be a ready-rolled definition for you in this directory.
# cd /usr/share/texmf/dvips/config # grep Sabon *.map #
But not this time, so instead, we are going to wholeheartedly rip off Adobe Utopia, as it is similar to the one we want to put in.
# grep Utopia *.map utopia.map:putb8r Utopia-Bold "TeXBase1Encoding ReEncodeFont" <8r.enc <putb8a.pfb utopia.map:putbi8r Utopia-BoldItalic "TeXBase1Encoding ReEncodeFont" <8r.enc <putbi8a.pfb utopia.map:putbo8r Utopia-Bold ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc <putb8a.pfb utopia.map:putr8r Utopia-Regular "TeXBase1Encoding ReEncodeFont" <8r.enc <putr8a.pfb utopia.map:putri8r Utopia-Italic "TeXBase1Encoding ReEncodeFont" <8r.enc <putri8a.pfb utopia.map:putro8r Utopia-Regular ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc <putr8a.pfb #
Note the difference between psbb8r in the first column and psbb8a in the last column.
The final two lines are for the slant font you get with \textsl{}. Of course, this isn't provided in a separate font, it's generated from the upright font. The TeX base name for Sabon here is psb, just as above it's put for Utopia.
# cat > sabon.map psbb8r Sabon-Bold "TeXBase1Encoding ReEncodeFont" <8r.enc <psbb8a.pfb psbbi8r Sabon-BoldItalic "TeXBase1Encoding ReEncodeFont" <8r.enc <psbbi8a.pfb psbri8r Sabon-Italic "TeXBase1Encoding ReEncodeFont" <8r.enc <psbri8a.pfb psbr8r Sabon-Roman "TeXBase1Encoding ReEncodeFont" <8r.enc <psbr8a.pfb psbbo8r Sabon-Bold ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc <psbb8a.pfb psbro8r Sabon-Roman ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc <psbr8a.pfb #
We need to change updmap to include our new map file and generate it into psfonts.map, which is the file that dvips actually reads. We take our cue from Utopia again and insert it afterwards in common_modules.
# vi ./updmap common_modules=" antp.map antt.map charter.map context.map lucidabr.map marvosym.map mathpi.map mathpple-ext.map mt-plus.map mt-yy.map omega.map qpl.map qtm.map utopia.map sabon.map xypic.map pazo.map cmcyr.map $extra_modules " wrote updmap, 125 lines, 4879 chars
You need to run the script to generate psfonts.map. For sanity's sake, we check that it made it into the file.
# ./updmap # grep Sabon psfonts.map psbb8r Sabon-Bold "TeXBase1Encoding ReEncodeFont" <8r.enc <psbb8a.pfb psbbi8r Sabon-BoldItalic "TeXBase1Encoding ReEncodeFont" <8r.enc <psbbi8a.pfb psbr8r Sabon-Roman "TeXBase1Encoding ReEncodeFont" <8r.enc <psbr8a.pfb psbri8r Sabon-Italic "TeXBase1Encoding ReEncodeFont" <8r.enc <psbri8a.pfb psbbo8r Sabon-Bold ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc <psbb8a.pfb psbro8r Sabon-Roman ".167 SlantFont TeXBase1Encoding ReEncodeFont" <8r.enc <psbr8a.pfb
We now have dvips correctly set up, so if someone were to send you a dvi file with psb font requests in it, you would be able to preview and print it. However, we also need to set up LaTeX so that it can put the font requests in in the first place.
PostScript font handling in LaTeX is handled by a package called PSNFSS. We need to write the basic font definititions: to select which of the above six font shapes that we wrote into sabon.map are chosen by your LaTeX document, when you write \textbf{}, \textit{}, et al. (these are actually PSNFSS commands).
# cd /usr/share/texmf/tex/latex/psnfss/
I am not going to provide the detail of how this works, because I am not entirely sure how it works. I have lifted the data from Utopia again, and changed all instances of put to psb, both in the file contents and in the filenames.
# cat > 8rpsb.fd
\ProvidesFile{8rpsb.fd}
[font definitions for 8r/psb.]
\DeclareFontFamily{8r}{psb}{}
\DeclareFontShape{8r}{psb}{m}{n}{
<-> psbr8r
}{}
\DeclareFontShape{8r}{psb}{m}{sl}{
<-> psbro8r
}{}
\DeclareFontShape{8r}{psb}{m}{it}{
<-> psbri8r
}{}
\DeclareFontShape{8r}{psb}{b}{n}{
<-> psbb8r
}{}
\DeclareFontShape{8r}{psb}{b}{sl}{
<-> psbbo8r
}{}
\DeclareFontShape{8r}{psb}{b}{it}{
<-> psbbi8r
}{}
\DeclareFontShape{8r}{psb}{bx}{n}{<->ssub * psb/b/n}{}
\DeclareFontShape{8r}{psb}{bx}{sl}{<->ssub * psb/b/sl}{}
\DeclareFontShape{8r}{psb}{bx}{it}{<->ssub * psb/b/it}{}
\endinput
# cat > omlpsb.fd
\ProvidesFile{omlpsb.fd}
\DeclareFontFamily{OML}{psb}{\skewchar\font127}
\DeclareFontShape{OML}{psb}{m}{n}
{<-> ssub * cmm/m/it}{}
\DeclareFontShape{OML}{psb}{m}{it}
{<-> ssub * cmm/m/it}{}
\DeclareFontShape{OML}{psb}{m}{sl}
{<-> ssub * cmm/m/it}{}
\DeclareFontShape{OML}{psb}{m}{sc}
{<-> ssub * cmm/m/it}{}
\DeclareFontShape{OML}{psb}{b}{n}
{<-> ssub * cmm/b/it}{}
\DeclareFontShape{OML}{psb}{b}{it}
{<-> ssub * cmm/b/it}{}
\DeclareFontShape{OML}{psb}{b}{sl}
{<-> ssub * cmm/b/it}{}
\DeclareFontShape{OML}{psb}{b}{sc}
{<-> ssub * cmm/b/it}{}
\endinput
# cat > omspsb.fd
\ProvidesFile{omspsb.fd}
\DeclareFontFamily{OMS}{psb}{\skewchar\font48}
\DeclareFontShape{OMS}{psb}{m}{n}
{<-> ssub * cmsy/m/n}{}
\DeclareFontShape{OMS}{psb}{m}{it}
{<-> ssub * cmsy/m/n}{}
\DeclareFontShape{OMS}{psb}{m}{sl}
{<-> ssub * cmsy/m/n}{}
\DeclareFontShape{OMS}{psb}{m}{sc}
{<-> ssub * cmsy/m/n}{}
\DeclareFontShape{OMS}{psb}{b}{n}
{<-> ssub * cmsy/b/n}{}
\DeclareFontShape{OMS}{psb}{b}{it}
{<-> ssub * cmsy/b/n}{}
\DeclareFontShape{OMS}{psb}{b}{sl}
{<-> ssub * cmsy/b/n}{}
\DeclareFontShape{OMS}{psb}{b}{sc}
{<-> ssub * cmsy/b/n}{}
\endinput
#
# cat > ot1psb.fd
\ProvidesFile{ot1psb.fd}
[2001/06/04 font definitions for OT1/psb.]
\DeclareFontFamily{OT1}{psb}{}
\DeclareFontShape{OT1}{psb}{m}{n}{
<-> psbr7t
}{}
\DeclareFontShape{OT1}{psb}{m}{sc}{
<-> psbrc7t
}{}
\DeclareFontShape{OT1}{psb}{m}{sl}{
<-> psbro7t
}{}
\DeclareFontShape{OT1}{psb}{m}{it}{
<-> psbri7t
}{}
\DeclareFontShape{OT1}{psb}{b}{n}{
<-> psbb7t
}{}
\DeclareFontShape{OT1}{psb}{b}{sc}{
<-> psbbc7t
}{}
\DeclareFontShape{OT1}{psb}{b}{sl}{
<-> psbbo7t
}{}
\DeclareFontShape{OT1}{psb}{b}{it}{
<-> psbbi7t
}{}
\DeclareFontShape{OT1}{psb}{bx}{n}{<->ssub * psb/b/n}{}
\DeclareFontShape{OT1}{psb}{bx}{sc}{<->ssub * psb/b/sc}{}
\DeclareFontShape{OT1}{psb}{bx}{sl}{<->ssub * psb/b/sl}{}
\DeclareFontShape{OT1}{psb}{bx}{it}{<->ssub * psb/b/it}{}
\DeclareFontShape{OT1}{psb}{m}{ui}{<->ssub * psb/m/it}{}
\DeclareFontShape{OT1}{psb}{b}{ui}{<->ssub * psb/b/it}{}
\DeclareFontShape{OT1}{psb}{bx}{ui}{<->ssub * psb/b/it}{}
\endinput
#
# cat > t1psb.fd
\ProvidesFile{t1psb.fd}
[2001/06/04 v1.801 font definitions for T1/psb.]
\DeclareFontFamily{T1}{psb}{}
\DeclareFontShape{T1}{psb}{m}{n}{
<-> psbr8t
}{}
\DeclareFontShape{T1}{psb}{m}{sc}{
<-> psbrc8t
}{}
\DeclareFontShape{T1}{psb}{m}{sl}{
<-> psbro8t
}{}
\DeclareFontShape{T1}{psb}{m}{it}{
<-> psbri8t
}{}
\DeclareFontShape{T1}{psb}{b}{n}{
<-> psbb8t
}{}
\DeclareFontShape{T1}{psb}{b}{sc}{
<-> psbbc8t
}{}
\DeclareFontShape{T1}{psb}{b}{sl}{
<-> psbbo8t
}{}
\DeclareFontShape{T1}{psb}{b}{it}{
<-> psbbi8t
}{}
\DeclareFontShape{T1}{psb}{bx}{n}{<->ssub * psb/b/n}{}
\DeclareFontShape{T1}{psb}{bx}{sc}{<->ssub * psb/b/sc}{}
\DeclareFontShape{T1}{psb}{bx}{sl}{<->ssub * psb/b/sl}{}
\DeclareFontShape{T1}{psb}{bx}{it}{<->ssub * psb/b/it}{}
\endinput
# cat > ts1psb.fd
\ProvidesFile{ts1psb.fd}
[2001/06/04 font definitions for TS1/psb.]
\DeclareFontFamily{TS1}{psb}{}
\DeclareFontShape{TS1}{psb}{m}{n}{
<-> psbr8c
}{}
\DeclareFontShape{TS1}{psb}{m}{sl}{
<-> psbro8c
}{}
\DeclareFontShape{TS1}{psb}{m}{it}{
<-> psbri8c
}{}
\DeclareFontShape{TS1}{psb}{b}{n}{
<-> psbb8c
}{}
\DeclareFontShape{TS1}{psb}{b}{sl}{
<-> psbbo8c
}{}
\DeclareFontShape{TS1}{psb}{b}{it}{
<-> psbbi8c
}{}
\DeclareFontShape{TS1}{psb}{bx}{n}{<->ssub * psb/b/n}{}
\DeclareFontShape{TS1}{psb}{bx}{sl}{<->ssub * psb/b/sl}{}
\DeclareFontShape{TS1}{psb}{bx}{it}{<->ssub * psb/b/it}{}
\endinput
This is a `convenience package' of sorts which allows you to turn on the font simply by typing
\usepackage{sabon}
in your document preamble. You can achieve precisely the same effect
by typing
\renewcommand{\rmdefault}{psb}
instead, which is in fact what the style file does below. However, for a spot
of extra nifty, the definitions in the style file change the \texttt{} font
to Courier, and the \textsf{} font to Helvetica. (Similar to what
times.sty does)
# cat > sabon.sty
\ProvidesPackage{sabon}
[2002/09/22
(Michael Eng meng@ed.ac.uk)
]
\renewcommand{\rmdefault}{psb}
\renewcommand\bfdefault{b}
\renewcommand{\sfdefault}{phv}
\renewcommand{\ttdefault}{pcr}
\endinput
#
I understand this part even less, but you need to have `virtual font' files to remap the characters from the Adobe font to TeX font.
These files were originally on CTAN, and are included in the supplied tarball. Make sure you mktexlsr before proceeding onto the next part.
You can test your newly installed font with the following document:
$ cat > test.tex
\documentclass[a4paper,12pt]{article}
\usepackage{sabon}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0cm}
\setlength{\textwidth}{16cm}
\setlength{\oddsidemargin}{0cm}
\setlength{\evensidemargin}{0cm}
\setlength{\topmargin}{-0.94cm}
\setlength{\textheight}{23cm}
\title{Here's a test of the new fonts}
\author{Michael Eng (meng@ed.ac.uk)}
\begin{document}
Hello world!
\section{\ss Styles}
\textrm{roman}
\texttt{typewriter}
\textmd{medium}
\textup{upright}
\textsl{slanted}
\emph{emphasised}
\textsf{sans serif}
\textbf{bold face}
\textit{italic}
\textsc{small caps}
\textnormal{back to normal}
\section{Sizes}
{\tiny tiny}
{\scriptsize very small}
{\footnotesize quite small}
{\small small}
{\normalsize normal}
{\large large}
{\Large larger}
{\LARGE larger again}
{\huge huge}
{\Huge `hugest'}
\section{Some Maths}
\begin{equation}
\phi(t)=\frac{1}{\sqrt{2\pi}}
\int^t_0 e^{-x^2/2} dx
\end{equation}
\end{document}
$ latex test.tex This is TeX, Version 3.14159 (Web2C 7.3.7) (./test.tex LaTeX2e <2001/06/01> Babeland hyphenation patterns for american, french, german, ngerman, n ohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2001/04/21 v1.4e Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/psnfss/sabon.sty) No file test.aux. (/usr/share/texmf/tex/latex/psnfss/ot1psb.fd) (/usr/share/texmf/tex/latex/psnfss/ot1pcr.fd) (/usr/share/texmf/tex/latex/psnfss/ot1phv.fd) [1] (./test.aux) ) Output written on test.dvi (1 page, 1776 bytes). Transcript written on test.log. $ xdvi test.tex
The first time you run xdvi (or dvips), it will generate the slant fonts for \textsl{}.

You can now log off and congratulate yourself on your hacking ability.
Note: You are viewing the No-CSS (Netscape 4 friendly) version of this page. Your browser is: CCBot/1.0 (+http://www.commoncrawl.org/bot.html).
Michael Eng