If you click on [W] in the web browser or press [W] in the text mode interface or say gms
-w
respectively gms
/w
in the command line, then GMS will write the font
map, a list of available fonts which is evaluated by GMS during
initialisation of the format file,
and later is used again by the TeX engine for
typesetting. This font map, however, is only a by-product of a metrics
computation process that may last several minutes, depending on computer speed
and the number of fonts.
TeX comes from a time before PostScript
(PFA/PFB)
and TrueType (TTF)
fonts were introduced.
The TeX approach of typesetting is to place empty boxes accurately on the page,
one box for every letter, and to leave it to the screen or printer driver to
add the character shape information. So the TeX engine’s
device-independent output file (DVI)
could only be used on
systems that already had installed the same fonts.
The pdfTeX
extension written by Hàn Thế Thành enables
TeX to embed all glyph data into a portable document, but the old TeX 3x kernel
does not want to know what the glyphs look like; it still needs TeX font
metric files (TFM)
containing data about the letters’
heights, depths, and widths. Moreover, if an encoding (ENC)
other than TeX’s proprietary
7
-bit code page is used, a virtual font file
(VF)
must be provided.
The font map keeps
together the information about which files are related to any font. A typical
entry looks like this: _putr
Utopia-Regular
"
CP1252-Encoding
ReEncodeFont
"
<CP1252.enc
<putr.pfb
, denoting 1. the base name of the font files (without
leading underscore), 2. the PostScript font name mentioned in the font’s
AFM
file, 3. the PostScript encoding name (quoted), 4. the
encoding file, and 5. the glyph file.
While encoding files can be found in
[GMS_ROOT]/data/enc
, font files are located in
sub-directories of [GMS_ROOT]/fonts
. To minimize search
time, AFM
files (Adobe or PostScript font metrics),
PFA/PFB
(PostScript Type 1 glyph files), TFM
,
TTF
, and VF
files are kept in separate trees. Within
every tree, typesetting systems following the TeX directory specification create
one level of folders named after the type foundries and a second level named
after the font families. There is, however, no technical need for this
pedantry.
As reported in fontmap.log
, the GMS metric processor creates TFM
and
VF
files from AFM
, and AFM
from
TTF
if necessary, running ttf2afm
,
afm2tfm
and vptovf
converters. In simple cases, if
the GMS main encoding can be used that you have selected and if the PostScript font name must not be
corrected, GMS will do this automatically; otherwise you have to modify
three configuration files in [GMS_ROOT]/etc
: font.cfg
, encoding.cfg
and alias.cfg
.
Now let us have a closer look on how GMS was given access to certain fonts. Then you will be able to use your favorite fonts with Markup Shredder too:
[GMS_FONTS]/afm/bt/charter
and
[GMS_FONTS]/type1/bt/charter
. Downloaded
four AFM and four PFB files from CTAN into the corresponding
directories. Shortened the base name of the font files from bchr8a
to bchr
etc. Opened bchr.afm
to find out the PostScript font name: CharterBT. Added
\addFONTalias
Charter
(CharterBT)
to alias.cfg
; so you can simply use the
name Charter
as HTML font-family name in markup
documents.AFM
and two
PFA
files are needed, for regular and bold weight, because the
slanted variants can be computed by pdfTeX. Since Courier is a wide,
non-proportional font, a narrower variant would be useful for technical
documents. To get this, four lines like ncrr
%GMS_CODEPAGE%
embed
0.75
0.25
ncrrco
had to be added to font.cfg
, defining four
typefaces which were grouped to a font-family named
CourierNarrow by saying
\addFONTfamily
CourierNarrow
(ncrrc,
ncrrco,
ncrbc,
ncrbco)
and \addFONTalias
CourierNarrow
(IBMCourier)
in alias.cfg
.TTF
files that
GMS setup copies from %windir%\Fonts
to
%GMS_ROOT%\fonts\ttf
to access standard TrueType fonts on
Windows 32. You can use this font as ArialMT in HTML
documents, or as Arial, because \addFONTalias
Arial
(ArialMT)
and
\addFONTfamstd
Arial
(arial)
were added to alias.cfg
. The
\addFONTfamstd
command corrects irregularities in the
PostScript font naming, as you can see in font.map
: The italic font face
is named Arial-ItalicMT instead of ArialMT-Italic, for
example.
CP1252
(West Europe, Africa,
America, Australia). The Monotype Arial font files, however, contain data for
several hundred characters, covering the windows-125x or
(CP125x)
code page series.
arial
G0400
embedfamily
1.0
0.0
none
04
was added
to font.cfg
, and \addFONTfamuni
Arial
(arial
04)
to alias.cfg
.
Alternatively, to support the Cyrillic code page windows-1251,
the line arial
CP1251
embedfamily
1.0
0.0
none
W1
was added
to font.cfg
, and \addFONTfamily
ArialCyrillic
(arialW1,
arialiW1,
arialbdW1,
arialbiW1)
to alias.cfg
. Here you have to use the font-family name
ArialCyrillic in HTML documents. In the
<head>
element, write <meta
http-equiv
=
"content-type"
content
=
"text/html;
charset=windows-1251"
/>
. You can, however, leave
the GMS main
encoding set to CP1252
.expand
X:\i386\andlso.tt_
%windir%\Fonts\andlso.ttf
in the command line, where you have to replace X
with your CD-ROM
drive letter. GMS comes with a script to extract all XP fonts, just enter
%GMS_ROOT%\batch\xpfonts
X:\i386
%windir%\Fonts
.
CP1252
(West
Europe), if this is the GMS main encoding. Therefore, the line andlso:
ArabicMT
was added to encoding.cfg
.
ArabicMT.enc
is the same as cp1256.enc
(Arabic), except that it uses Monotype glyph
names which differ from the GMS glyph list, which is a compromise on the
Adobe
and Windows glyph
lists.[GMS_ROOT]/fonts/ttf/pub/shusha
,
uses glyph names from the Latin code page cp1252.enc
, but replaces them with the corresponding Hindi
or Marathi letters. No changes had to be done to the configuration files
to access this font with GMS, but you still may have to copy
shusha.ttf
to %windir%\fonts
, if you want
to use it on Windows with your browser.font.map
, these core fonts must not be
embedded in the PDF document, because the corresponding glyph files are present
on every installation of Acrobat Reader. With core fonts, you can produce very
small PDF files for the internet, if you are mainly using letters from code
page CP1252
(West Europe). Symbol and ZapfDingbats need
font-specific encoding (
psy.enc
and pzd.enc
)
.7
-bit fonts
designed by Donald Ervin Knuth are excluded from the GMS metric processing.
GMS comes with the required TFM
files and a separate map file
named cm.map
.After re-computing of font metrics
and re-writing of the font map
, you still have to
re-initialize the TeX format file for Markup
Shredder.
If a TeX font metric file (TFM
) is corrupted, pdfTeX may give
you the following error message: !
Font
=_GENR
at
12pt
not
loadable:
Bad
metric
(TFM)
file
...
line
666.
I
wasn't
able
to
read
the
size
data
for
this
font,
so
I
will
ignore
the
font
specification.
This error should disappear if
font metrics are re-processed; otherwise, you have to remove the corresponding
font face from your document and font.map
.