URW Garamond

From ConTeXt wiki

Garamond is a nice font. Now that there is a free version, this would be a nice default font to add to the next ConTeXt distribution. In the meantime:

1. Download

ftp://dante.ctan.org/tex-archive/fonts/urw/garamond.zip (actually, you only need the pfb and afm files, unless your texfont does not work);

2. place ONLY the afm and pfb files in an empty temporary directory;

3. from /temp>, run (adjust your fontroot):

texfont --fontroot=/opt/teTeX/texmf-local --ma --in --ve=urw --co=garamond --show

you may verify the installation of your font by examining texnansi-urw-garamond.pdf.

4. If texfont does not work, you will have to do more work-> the zip package contains tfms etc, and here is a map file you will need:

%% =============texnansi-urw-garamond.map==============
% You need to add the following line to pdftex.cfg:
% map +texnansi-urw-garamond.map
% Alternatively in your TeX source you can say:
% \pdf {+texnansi-urw-garamond.map}
% In ConTeXt you can best use:
% \loadmapfile[texnansi-urw-garamond.map]

texnansi-raw-ugmm8a GaramondNo8-Med 4 < ugmm8a.pfb texnansi.enc
texnansi-raw-ugmmi8a GaramondNo8-MedIta 4 < ugmmi8a.pfb texnansi.enc
texnansi-raw-ugmr8a GaramondNo8-Reg 4 < ugmr8a.pfb texnansi.enc
texnansi-raw-ugmri8a GaramondNo8-Ita 4 < ugmri8a.pfb texnansi.enc

If texfont works, ignore step 4;

5. Now write to file the following typescript:

%% ==========================type-ugm.tex======================
% raw fonts

\starttypescript[serif] [garamond] [texnansi]

\definefontsynonym[Garamond] [ugmr8a] [encoding=texnansi]
\definefontsynonym[GaramondItalic] [ugmri8a] [encoding=texnansi]
\definefontsynonym[GaramondBold] [ugmm8a] [encoding=texnansi]
\definefontsynonym[GaramondBoldItalic][ugmmi8a] [encoding=texnansi]



\starttypescript [serif] [garamond] [name]


\definefontsynonym[Serif] [Garamond]
\definefontsynonym[SerifBold] [Garamond-Bold]
\definefontsynonym[SerifItalic] [Garamond-Italic]



\starttypescript [serif] [garamond] [texnansi]

\definefontsynonym [Garamond]

\definefontsynonym [Garamond-Italic]

\definefontsynonym [Garamond-Bold]

\definefontsynonym [Garamond-BoldItalic]


% maps

\starttypescript [map] [garamond] [texnansi]



% typefaces

\starttypescript [URWGaramond]


\definetypeface [urwgaramond]
[rm] [serif] [garamond] [default]

\definetypeface [urwgaramond]
[ss] [sans] [helvetica] [default]

\definetypeface [urwgaramond]
[mm] [math] [palatino] [default]

\definetypeface [urwgaramond]
[tt] [mono] [modern] [default]


If there are better/more aesthetic choices for sans and math, let me know-)

6. Add support for xdvi and dvips (teTeX-installation):

Rewrite the file fonts/map/pdftex/context/texnansi-urw-garamond.map to:

texnansi-raw-ugmm8a GaramondNo8-Med "TeXnANSIEncoding ReEncodeFont" <texnansi.enc <ugmm8a.pfb
texnansi-raw-ugmmi8a GaramondNo8-MedIta "TeXnANSIEncoding ReEncodeFont" <texnansi.enc <ugmmi8a.pfb
texnansi-raw-ugmr8a GaramondNo8-Reg "TeXnANSIEncoding ReEncodeFont" <texnansi.enc <ugmr8a.pfb
texnansi-raw-ugmri8a GaramondNo8-Ita "TeXnANSIEncoding ReEncodeFont" <texnansi.enc <ugmri8a.pfb

Start "updmap-sys --edit" and add "Map texnansi-urw-garamond.map".

7. Test it out:

\input knuth

\it\input knuth

\bf\input knuth

\bi\input knuth

8. Problems:

See, if you find messages like

Warning: pdfetex (file texnansi-urw-helvetica.map): cannot open font map file
Warning: pdfetex (file texnansi-urw-palatino.map): cannot open font map file

If yes, than try to explain why, and how these warnings can be suppressed.