% This is the metafont for the feynfont font. % % When I look at the property list of the generated TFM (using % tftopl) it starts with `(FAMILY CMR)': but this isn't in the cmr % family. I can't find anything in cmbase.mf which would cause % this. Perhaps I need to read the Metafont Book more closely. % % $Id: feyn.mf,v 1.6 2002/04/18 22:32:10 norman Exp $ mode_setup; font_setup; % a# is the position of the characters above the baseline. a# := math_axis#; % math_axis is defined by cmr % Feyn macros input feynmac; define_pixels (module,bigarrow,littlearrow,blobr,a); define_blacker_pixels (linewidth,thinlinewidth); pickup pencircle scaled linewidth; diagram_pen := savepen; % general definitions phangle := 75; % All the character positions between 0 and hex"7F" % have characters in them. Not all of these characters are ones % which should appear on paper; some (such as `s' or `l') only % appear in ligatures, and others shouldn't appear at all. If, % however, there are no characters in these positions, some DVI % readers (including TFtoPL and OzTeX for example) complain about a % `bad TFM file'. These locations are therefore occupied by the % character generated by the errorchar macro, which is 0pt wide, and % 1module# high. This character doesn't generate any real error, % but the glyph will be manifestly peculiar on paper. gfermion (0, -45); gfermion (1, 45); gfermion (2, 90); beginchar (3, 0, module#, 0); errorchar (h); endchar; gboson (4, -45, 1, 0); gboson (5, 45, 1, 0); gboson (6, 90, 1, 0); gboson (7, 90, 0.85, 0); gboson (8, 90, 1.7, 1); for c=hex"09" upto hex"0F": beginchar (c, 0, module#, 0); errorchar (h); endchar; endfor gghost (hex"10", -45); gghost (hex"11", 45); for c=hex"12" upto hex"1F": beginchar (c, 0, module#, 0); errorchar (h); endchar; endfor gbhalfloop (hex"20", 1.3, 9, 0); % small loop gbhalfloop (hex"21", 3, 13, 0); % large loop beginchar (hex"22", 0, module#, 0); errorchar (h); endchar; beginchar (hex"23", 0, module#, 0); errorchar (h); endchar; beginchar (hex"24", 0, module#, 0); errorchar (h); endchar; beginchar (hex"25", 0, module#, 0); errorchar (h); endchar; beginchar (hex"26", 0, module#, 0); errorchar (h); endchar; beginchar (hex"27", 0, module#, 0); errorchar (h); endchar; garrow (hex"28", 0, 0); garrow (hex"29", 45, 0); garrow (hex"2A", 90, 0); garrow (hex"2B", 135, 0); garrow (hex"2C", 180, 0); garrow (hex"2D", 225, 0); garrow (hex"2E", 270, 0); garrow (hex"2F", 315, 0); % Digits 0x30--0x39 go here. Obtain these from the cmr source file: romand.mf. input romand; for c=hex"3A" upto hex"5F": beginchar (c, 0, module#, 0); errorchar (h); endchar; endfor beginchar (hex"60", 2module#, 0, 0); "spacer"; endchar; garrow ("a", 0, 1); "arrow"; beginchar ("b", module#, 0, 0); "short spacer"; % A previous version of this font had this curious construction, without % explanation. I don't know why it was thought necessary. It seems % to result in a hairline being put in this character. Remove it % for the moment. %pickup pencircle scaled 0pt; %draw (0,0) .. (w,0); endchar; beginchar ("c", 2blobr#, blobr# + a#, blobr#); "complete vertex"; pen; draw (0,a) .. (w,a) .. cycle; endchar; beginchar ("d", module#/2, 0, 0); "weeny fermion"; pen; draw (0,a)..(w,a); endchar; beginchar ("e", module#, 0, 0); "short fermion"; pen; draw (0,a)..(w,a); endchar; beginchar ("f", 2module#, 0, 0); "fermion"; pen; draw (0,a)..(w,a); endchar; beginchar ("g", 2module#, 0, 0); pen; "gauge boson"; def ::(expr b) = {dir b} looselink {dir -b} enddef; z1 = (0,a); z5 = (w,a); z2-z1 = z3-z2 = z4-z3 = z5-z4; draw z1 ::(phangle) z2 ::(-phangle) z3 ::(phangle) z4 ::(-phangle) z5; endchar; beginchar ("h", 2module#, 0, 0); "ghost"; pen; z1 = (0,a); z10 = (w,a); z4-z3 = 2(z2-z1); z4-z3 = z6-z5 = z8-z7; z2-z1 = z3-z2 = z5-z4 = z7-z6 = z9-z8 = z10-z9; draw z1..z2; draw z3..z4; draw z5..z6; draw z7..z8; draw z9..z10; endchar; beginchar ("i", module#, 0, 0); "short ghost"; pen; z1 = (0,a); z6 = (w,a); z4-z3 = 2(z2-z1); z2-z1 = z3-z2 = 1/2(z4-z3) = z5-z4 = z6-z5; draw z1..z2; draw z3..z4; draw z5..z6; endchar; beginchar ("j", 0, module#, 0); errorchar (h); endchar; beginchar ("k", module#/2, 0, 0); "weeny massive fermion"; pen; y1 - a = y2 - a = a - y3 = a - y4 = module#/3.5; x1 = x3 = 0; x2 = x4 = w; draw z1--z2; draw z3--z4; endchar; beginchar ("l", module#, 0, 0); "short massive fermion"; pen; y1 - a = y2 - a = a - y3 = a - y4 = module#/3.5; x1 = x3 = 0; x2 = x4 = w; draw z1--z2; draw z3--z4; endchar; beginchar ("m", 2module#, 0, 0); "massive fermion"; pen; y1 - a = y2 - a = a - y3 = a - y4 = module#/3.5; x1 = x3 = 0; x2 = x4 = w; draw z1--z2; draw z3--z4; endchar; beginchar ("n", 4module#, 2module#-a#, 2module#-a#); pen; "fermion loop"; z0 = (0,a); z1 = (w,a); draw z0{dir phangle} ..tension 1.15.. {dir -phangle}z1; draw z0{dir -phangle} ..tension 1.15.. {dir phangle}z1; endchar; gbhalfloop ("o", 2, 11, 0); % gauge boson half loop"; beginchar ("p", 2blobr#, blobr# + a#, blobr# - a#); pen; "proper vertex"; picture p[]; pair t[]; fill (-blobr, 0) .. (blobr, 0) .. cycle; p1 := currentpicture; clearit; draw (-blobr, 0) .. (blobr, 0) .. cycle; p2 := currentpicture; clearit; t1 = 5/6[origin, (0,blobr)] shifted (-blobr, 0); t7 = 5/6[origin, (0,blobr)] shifted (+blobr, 0); forsuffixes s = 2,3,4,5,6 : t[s] = t[s-1] shifted (0, -blobr/3); t[s+6] = t[s+5] shifted (0, -blobr/3); endfor forsuffixes s = 1,2,3,4,5,6,7,8,9,10,11,12 : z[s] = t[s] rotated 45; endfor forsuffixes s = 1,2,3,4,5,6 : draw z[s] -- z[s+6]; endfor addto currentpicture also p1; cull currentpicture keeping (2,2); % & the two pictures addto currentpicture also p2; currentpicture := currentpicture shifted (blobr,a); labels (range 1 thru 12); endchar; beginchar ("q", 0, module#, 0); errorchar(h); endchar; beginchar ("r", 0, module#, 0); errorchar(h); endchar; beginchar ("s", 0, module#, 0); errorchar(h); endchar; beginchar ("t", 0, module#, 0); errorchar(h); endchar; beginchar ("u", 0, module#, 0); errorchar(h); endchar; beginchar ("v", 0, module#, 0); errorchar(h); endchar; gbhalfloop ("w", 2, 11, 1); % "gauge boson (half) loop, inverted"; beginchar ("x", 0, blobr#/sqrt 2 + a# , blobr#/sqrt2 - a#); "counterterm"; pen; -x1 = -x2 = x3 = x4; y1 = -y2 = y3 = -y4; z3 = (2blobr/3, 0) rotated 45; draw z1 .. z4; draw z2 .. z3; currentpicture := currentpicture shifted (0,a); endchar; beginchar ("y", 0, module#, 0); errorchar(h); endchar; beginchar ("z", 0, module#, 0); errorchar(h); endchar; beginchar (hex"7b", 0, module#, 0); errorchar(h); endchar; beginchar (hex"7c", 0, module#, 0); errorchar(h); endchar; beginchar (hex"7d", 0, module#, 0); errorchar(h); endchar; beginchar (hex"7e", 0, module#, 0); errorchar(h); endchar; beginchar (hex"7F", module#, a#, 0); "space block"; pen; draw origin--(w,h); draw (0,h)--(w,0); % nothing endchar; % Construct the ligature tables. ligtable "f" : % fermion "s" =: hex"65", % short "u" =: hex"01", % up "d" =: hex"00", % down "v" =: hex"02", % vertical "l" =: hex"6e", % loop "0" =: hex"60"; % spacer ligtable hex"65" : % short fermion "0" =: hex"62"; % short spacer ligtable "m" : "s" =: hex"6c"; % short massive ligtable "g" : % gauge boson "l" =: hex"6F", % loop "u" =: hex"05", % up "d" =: hex"04", % down "v" =: hex"06"; % vertical ligtable hex"06" : % vertical boson "s" =: hex"07", % short "b" =: hex"08"; % big ligtable hex"6F" : % gauge boson loop "u" =: hex"77"; % lower loop ligtable "h" : % ghost "s" =: "i", % short "u" =: hex"11", % up "d" =: hex"10"; % down