[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Some Miscellaneous MetaFont hacks



Tom Jennings has suggested the following change to the Punk fonts: reduce the
randomness allowed on numbers to make them more legible.  I also think
that the randomness on the X, should be reduced too to make it less
like a V or an A.

In running a program I wrote to check the consistency of PK font
libraries using \mode_special information, Jim Hafner noticed that a
couple of the fonts didn't have this. On further investigation, I
noticed that the reason for this is that is that a number of the
MetaFont sources (such as a number of the AMS fonts) use ``end''
rather than ``bye'' to finish MetaFont execution.  Looking at the
MetaFont book, I notice that there are *two* definitions for bye, one
in Plain MF on page 278 which just does a let bye = end. And another
on page 321 which is more like what is in U_Wash.mf.

Given the double definition of bye in the MetaFont book, I believe
that even if we could convince all the MetaFont authors to switch over
to ``bye'' instead of ``end,'' there is going to be future confusion by people
writing MetaFont code. Therefore, I propose we keep ``bye'' as a
redefinition of end (like it is in Plain MetaFont) and redefine ``end''
to do the additional things we want. To be more concrete,
I propose the following changing the code that deals with ``bye'' in
U_Wash.mf and modes.mf to:

inner end;
let realend = end;  % We're about to redefine end. Save the primitive one.
def end=
 if fontmaking > 0:  font_family font_identifier_;
  coding_scheme font_coding_scheme_;
  font_face_byte max(0,254-round 2designsize);
  font_mode_specials; fi
 realend
 enddef;

outer end,realend;


This fixed the problems I had with all of the MetaFont sources, except
the slur and beam from MuTeX (which also appear in MusicTeX).

Suggestions follow.
If anyone has an e-mail address for Andrea Steinbach or Angelika
Schofer, I'd appreciate it if you could forward this to me, or forward
everything after the next paragraph of this note. Even if you only
have a external mail address (sometimes referred to as a
``snail-mail'' address) I'd appreciate receiving this.

(I have tried looking at old TUGBoat Membership lists like Karl
Berry suggested, to no avail.)

First and foremost I would like to thank all the people who have
contributed to MTeX (aka MuTeX), especially its authors Andrea Steinbach
and Angelika Schofer.

I have a couple of suggestions concerning the MetaFont sources. In a
number of the MetaFont files, such as the MetaFont code for the slurs and
beams, there is a numeric variable called ``length.''  Unfortunately,
length is also a MetaFont primitive, and is also used in some code
suggested on page 320 of the MetaFont book for putting font information
into a GF or PK file.  My suggestion then, is to change the use of
these variables to something else (such as s_length or slur_length and
b_length or beam_length).

Another very minor change I would suggest is to set the variables
font_identifier and font_coding_scheme. Although get passed merely as
comments in a GF, PK and TFM files, they allow automatic interpretation by
programs somewhat easier. For example, a program that tries to display
or render information about a font could use this information to try
to understand how to do its job.

I would be happy to provide changed sources on request to make this
very concrete.

Feel free to reply in German. I would be happy to provide a
translation of this into German on request---I thought however it
might be dangerous to try to do so initially.

Sincerely,
 Rocky Bernstein