1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
|
At this moment, it's not clear if the distributed font set will be on
the next X11 tape; hence, here are instructions on how to generate the
fonts.
xtex uses fonts generated by Metafont and converted to X11 format. You
need to provide the Metafont fonts and then convert them.
For screen previewing, you have two options for generating fonts. The
first takes existing high-resolutions fonts and scales them to fit
your display. The second method uses special lower-resolution fonts
that are a little easier to read.
*By default, xtex is configured to use this second option*
These fonts should be available on expo.lcs.mit.edu:contrib/SeeTeX-fonts.tar.Z
-----------------------------------------------------------------------------
(1) In metafont, fonts are have a 'design size' and a magnification.
The design sizeof cmr10 is 10pt. If you magnify this
appropriately, you get an 9pt,11pt,12pt, etc like font. Why
magnify? Because then you don't need to design a true 9pt font.
For small magnifications, it's not bad, but see the TeXbook for
examples of why different font sizes are important.
There is a table at the end of this file listing common font &
scaling combinations. You should really gather these from your
'lfonts.tex' files anr the fonts commonly used by users.
Now, xtex also uses two *magnifications* as well as the font
scaling mentioned above, because sometimes you want to see things
in greater detail than screen resolution. Lets call the two
magnfications SMALL and LARGE. By default, SMALL is 1000 (normal
resolution) and LARGE is 1440 (larger glyphs). We want to magnify
all fonts at their different scalings in each of two
magnifications.
So, lets say you know you want to generate a certain font (e.g.
cmr10) at a certain set of magnifications (e.g. 1000 and 1440).
If you intend to build fonts at device resolution, you'll need the
following tools:
cmr*.mf -- the Computer Modern (or whatever you need) metafont
input files.
mf -- metafont, which taakes the metafont files and
produces .gf font files.
gftopk -- converts .gf font files to the more compact pk format
You can get these from the UNIX TeX distribution; consult your
local TeX or Metafont guru for more information.
The first thing you need to do is determine the true DPI (dots per
inch) of you display. Don't believe, e.g., the X server; for
example, it says the sun is 90DPI, but it's really 85.
The easiest way to do this is to stretch a box or window until
it's a certain number of inches wide (measure this with a ruler),
find out how wide that is in dots & divide.
You need to build a 'modedef' for Metafont that describes your
device. Here is the one I used to build the 85dpi fonts I use.
mode_def sun = % bitgraph and sun screens (true size)
proofing:=0; % no, we're not making proofs
fontmaking:=1; % yes, we are making a font
tracingtitles:=0; % no, don't show titles in the log
pixels_per_inch:=85; % try it to see if it will do
blacker:=.35; % make pens a bit blacker
fillin:=.1; % and compensate for diagonal fillin
o_correction:=.3; % but don't overshoot much
enddef;
Your values may differ, particularly the pixels_per_inch.
Now, you build your fonts using
mf '\mode:=sun;\mag=SMALL/1000;\batchmode;\input YYY'
mf '\mode:=sun;\mag=LARGE/1000;\batchmode;\input YYY'
where 'SMALL' and 'LARGE' are the two magnifications you chose;
these are normally 1000 & 1440 in xtex. YYY is the file name of
the font you're generating. If you use those defaults (85dpi,
SMALL=1000, LARGE=1440) and you're generating 'cmr10', you would
get files 'cmr10.85gf' and 'cmr10.93gf'. To convert these to PK
files, use 'gftopk'. To convert them to directly to BDF fonts,
execute:
mftobdf -dpi 85 cmr10.85gf
mftobdf -dpi 85 cmr10.93gf
and this should produce two files named 'cmr10.85.bdf' and
'cmr10.93.bdf'. These can then be converted to compressed
SNF files,
bdftosnf cmr10.85.bdf > cmr10.85.snf
compress cmr10.85.snf
bdftosnf cmr10.93.bdf > cmr10.93.snf
compress cmr10.93.snf
Of course, it's easier to do this using an automated procedure, which
is what the makefiles & tools in this directory do.
File font-list contains a list of fonts at common scaling in the
format
cmr10 scaled 1000
cmr10 scaled 1095 ... etc
one per line. I built this file using the Emacs LISP program in
extract-font-list.el. See that program for more details.
Program 'bulid-font-makefile' converts the font-list to a makefile.
For example, FontMakefile contains an example. The fontmakefile can
generate all the GF fonts properly, but a miscalcuation of the suffix
(e.g. I may compute .62gf when I want .61gf) that's impossible to
correct outside of metafont, renders it difficult to convert the GF
fonts to PK or BDF automatically.
So your best bet is to generate the font make file (or use mine) and
do (in the boune shell)
make -k pk-fonts
for font in *gf ;
do
gftopk $font && rm -f $font
done
for font in *pk ;
do
mftobdf -dpi 85 $font
base=`echo $font | sed -e 's/pk//'`; \
echo $base
bdftosnf $base.bdf > $base.snf
rm -f $base.bdf
compress $base.snf
done
Building all those GF files takes several hours. Converting them
takes a couple of minutes. If you can get the TAR from
expo.lcs.mit.edu, do so.
-----------------------------------------------------------------------------
(2) The second option is to use existing higher resolution fonts (i.e.
300dpi fonts) and ``shrink'' them to make them smaller. This has
the advantage that you don't need to generate any new Metafont
fonts; however, the fonts don't match your screen resolution & are
sort of hard to read. Also, you can only shrink things intergral
(1/2, 1/3) amounts -- since TeX typically scales things by
magsteps, this means you build two complete sets of your fonts in
the two different mag sizes.
To do this, build the 'fontdesc' file to point to your existing 300DPI
fonts and set the fontdec path name in the toplevel Imakefile. Now,
build 'mftobdf'. Try the executing
'mftobdf -mag 500 cmr10.300pk'
If you're using 300DPI fonts, this should produce a file called
'cmr10.150.bdf.' This file contains a poor-mans version of a 150dpi
font.
xtex uses fonts at two magnifications, a 'small mag' and a 'large
mag' for getting a document overview & closeups of particular
pages. Useing 'shrunken fonts', the best sizes (IMHO) are small mag
'333' and large mag '150' or '250' and '333'. They *must* be
expressed as 1000/I where I is an integer. Lets say you select
'SMALL' and 'LARGE.' First, convert all the fonts in your font
directory. E.g. using the bourne shell:
for font in *pk ;
do
mftobdf -dpi 300 -mag SMALL $font
base=`echo $font | sed -e 's/pk//'`; \
echo $base
bdftosnf $base.bdf > $base.snf
rm -f $base.bdf
compress $base.snf
done
Now, do the same for the 'LARGE' fonts. When they're all done,
you'll have many compressed SNF font files. Run 'mkfontdir' to
build the font directory, if you server uses that. Add this
directory to your font path. Check to see if the fonts are found
using 'xlsfonts', e.g. 'xlsfonts | grep cm' should give a long list
of font names.
Now, edit the xtex application defaults file to use these font sizes
by default. Change the following lines...
Xtex*.dpiHoriz: 85
Xtex*.dpiVert: 83.5
Xtex*.mag: 1000
Xtex*.smallMag: 1000
Xtex*.largeMag: 1440
to
Xtex*.dpiHoriz: 300
Xtex*.dpiVert: 300
Xtex*.mag: SMALL
Xtex*.smallMag: SMALL
Xtex*.largeMag: LARGE
Install the remainder of Xtex and give it a whirl. If the server
can't find a font, a message will appear in the xtex dialog box.
|