summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/levy/b.mf
blob: d6636d9a53398afe49b9104d06306720d22b3e2c (plain)
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
if unknown gen_sigma : readfrom("gen_sigma") fi
     
def dims = 9u#,asc_height#,desc_depth# enddef;
def ital = 0 enddef;
def fit_params = 0,0 enddef;
     
def gen_letter=
  pickup fine.nib;
  numeric thin_stem; thin_stem=.6[hair,stem];           %for upper bowl
  numeric tilt; tilt=min(2*otilt,.5);                   %for both bowls
  pos1(stem,180); y1-.5stem=-d-o;               %bottom left
  pos2(hair,180); y2=.5bar_height;              %self-intersection (cf. z15)
  x1=x2; lft x1r=hround(.75u+.5(hair-stem));    %i.e., lft x2r ~ .75u
  x3r=x2r;                                      %beginning of curve
  top y5r=h+oo; bot y14r=-oo; x5r=x14r;         %top and bottom bulges
  top y10r=vstem+bot y9r=x_height; x9r=x10r;    %top and bottom of cusp
  rt x12r=hround(w-.75u);                       %lower right bulge
  x5r=.5[lft x2r,rt x12r]; x9r-.5vstem=hround(x5r-.5u-.5vstem);
  % we want to simulate the following relations, to make slopes consistent
  % (where z7 is the upper right bulge):
  % z5r-z3r=whatever*(z9r-z7r)=whatever*(z14r-z12r);
  % z7r-z5r=whatever*(z12r-z10r)=whatever*(z5r-z3r) yscaled -1;
  numeric slope;
  slope=((y10r-y12r)+(y12r-y14r))/((x12r-x10r)+(x12r-x14r));
  z7'r=z9r+whatever*(1,slope); z7'r=z5r+whatever*(1,-slope);
  y7r=y7'r; rt x7r=hround rt x7'r;
  z12r=z14r+whatever*(1,slope); z3r=z5r+whatever*(1,slope);
  filldraw double_circ_stroke gr_arc.e(7,6,5)(hair,thin_stem,tilt)..
    gr_arc.e(5,4,3)(hair,thin_stem,tilt)..{down}z2e..z1e;       %top and left
  z2=z15; pos15(hair,slope-90);         %intersection pt
  numeric slope;
  slope=angle((z14r-z15)yscaled 2);
  filldraw stroke z15e{dir slope}...gr_arc.e(14,13,12)(hair,stem,tilt); %bottom
  forsuffixes e=r,l:
    path curv[]e; numeric S[]e;
    curv1e=reverse gr_arc.e(9,8,7)(hair,thin_stem,tilt);        %cusp bottom
    curv2e=gr_arc.e(12,11,10)(hair,stem,tilt); endfor           %cusp top
  (S1r,S2r)=curv1r intersectiontimes curv2r;
  (whatever,S2l)=curv1r intersectiontimes curv2l;
  (S1l,whatever)=curv1l intersectiontimes curv2r;
  if S1l=-1 : S1l:=2; fi
  if S2l=-1 : S2l:=2; fi
  filldraw stroke subpath(0,S1e+eps) of curv1e;                 %fill in cusp
  filldraw stroke subpath(0,S2e+eps) of curv2e;
  filldraw subpath (S1r+eps,2) of curv1r...subpath(2,S2r+eps) of curv2r..cycle;
enddef;
     
cmchar "Lowercase beta";
beginchar("b",dims);
this_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;
     
if boolean barebones: picture savedpicture; endinput; fi
     
cmchar "Lowercase sigma followed by beta";
begindoublechar(oct"002",dim_sigma);
mid_sigma; middoublechar(dims); this_letter; endchar;
     
picture savedpicture;