Debian Codegraph @

texmf-dist/fonts/source/public/mathabx/maydigit.mf

raw
1 % blackboard typefaces by Anthony Phan.
2 % file: maydigit.mf (Maya digits)
3 % last modification: May 16, 2005.
4
5 numeric fig_width#;
6 fig_width#=max(dtsz#,stem#*(1++slant));
7
8 use_rule1;
9
10 beginchar("0",20u#+2appr#,fig_height#,0);
11 "Maya numeral 0";
12 % italcorr fig_height#*slant-0.5u#;
13 numeric a; a=vround 0.2(h+d);
14 pickup rule.nib; x2r=x4r=good.x 0.5w;
15 pickup fine.nib; y1r=y3r=good.y 0.5[-d,h];
16 top y2r=h+o; y2r-y1r=y1r-y4r; y1'=y2r; y3'=y4r;
17 lft x1r=appr; x3r-x2r=x2r-x1r;
18 x1'=1/3[x1r,x2r]; x3'=1/3[x3r,x4r];
19 pos2(rth,90); pos4(rth,-90);
20 penpos1(diag_width(rth-fine,z1'-z1r),180);
21 penpos3(diag_width(rth-fine,z3'-z3r),0);
22 path tmp_path[],tmp_path[]r,tmp_path[]l;
23 numeric t[],t[]r,t[]l;
24 forsuffixes $=,r,l:
25 z[5]$=z[1]$ shifted(0,a); z[7]$=z[4]$ shifted(0,a);
26 z[9]$=z[3]$ shifted(0,a);
27 tmp_path[1]$=z[1]${z1'-z1r}...z[2]${right}
28 ...z[3]${(z3'-z3r) xscaled -1};
29 tmp_path[2]$=z[9]${z3'-z3r}...z[7]${left}
30 ...z[5]${(z1r-z1') yscaled -1};
31 t[1]$=xpart(tmp_path[2]$
32 intersectiontimes subpath (1,2) of tmp_path[1]);
33 t[2]$=xpart(tmp_path[2]$
34 intersectiontimes subpath (0,1) of tmp_path[1]);
35 tmp_path[3]$=subpath (t[1]$,t[2]$) of tmp_path[2]$;
36 z[6]$=point t[1]$ of tmp_path[2]$;
37 z[8]$=point t[2]$ of tmp_path[2]$;
38 endfor
39 pickup rule.nib; x12=good.x 1/3[x2,x6];
40 x14=x2; x18-x16=x16-x14=x14-x12=x12-x10;
41 pickup fine.nib;
42 for i=10 step 2 until 18:
43 rt x[i]r-lft x[i]l=rth; 0.5[x[i]r,x[i]l]=x[i];
44 forsuffixes $=,r,l:
45 z[i]$=tmp_path[1] intersectionpoint ((x[i]$,y2r)..(x[i]$,y7r));
46 z[i+1]$=tmp_path[3] intersectionpoint ((x[i]$,y2r)..(x[i]$,y7r));
47 endfor
48 filldraw stroke z[i]e..z[i+1]e;
49 endfor
50 filldraw stroke tmp_path[1]e; filldraw stroke tmp_path[3]e;
51 filldraw stroke z3e{z3'-z3r}...z4e{left}...z1e{(z1r-z1') yscaled -1};
52 penlabels(range 1 thru 19); labels(1',3');
53 endchar;
54
55 beginchar("1",fig_width#+2appr#,fig_height#,0);
56 "Maya numeral 1 (hun)";
57 % italcorr fig_height#*slant-0.5u#;
58 pickup fine.nib;
59 adjust_dot1((0.5w,0.5h),dtsz,false,false);
60 dot(1,1');
61 endchar;
62
63 beginchar("2",fig_width#+2appr#,fig_height#,0);
64 "Maya numeral 2 (ca)";
65 % italcorr fig_height#*slant-0.5u#;
66 pickup fine.nib;
67 adjust_dot1((0.5w,0.25h),dtsz,false,false);
68 dot(1,1');
69 adjust_dot2((0.5w,0.75h),dtsz,false,false);
70 dot(2,2');
71 endchar;
72
73 beginchar("3",fig_width#+2appr#,fig_height#,0);
74 "Maya numeral 3 (ox)";
75 % italcorr fig_height#*slant-0.5u#;
76 pickup fine.nib;
77 adjust_dot1((0.5w,h/6),dtsz,false,false);
78 dot(1,1');
79 adjust_dot2((0.5w,0.5h),dtsz,false,false);
80 dot(2,2');
81 x3=x1; x3'=x1'; y2-y1=y3-y2; y2'-y1'=y3'-y2'; dot(3,3');
82 endchar;
83
84 beginchar("4",fig_width#+2appr#,fig_height#,0);
85 "Maya numeral 4 (can)";
86 % italcorr fig_height#*slant-0.5u#;
87 pickup fine.nib;
88 adjust_dot1((0.5w,0.5dtsz),dtsz,false,false);
89 dot(1,1');
90 adjust_dot2((0.5w,1/3(h-dtsz)+0.5dtsz),dtsz,false,false);
91 dot(2,2');
92 x3=x1; x3'=x1'; y2-y1=y3-y2; y2'-y1'=y3'-y2'; dot(3,3');
93 x4=x1; x4'=x1'; y2-y1=y4-y3; y2'-y1'=y4'-y3'; dot(4,4');
94 endchar;
95
96 beginchar("5",fig_width#+2appr#,fig_height#,0);
97 "Maya numeral 5 (ho)";
98 % italcorr fig_height#*slant-0.5u#;
99 pickup fine.nib; top y1=h; bot y2=0;
100 lft x1l=lft x2l=hround(0.5w-0.5stem);
101 pos1(stem,0); pos2(stem,0); filldraw stroke z1e..z2e;
102 penlabels(1,2);
103 endchar;
104
105 % 6=uac, 7=uc, 8=vaxac, 9=bolon, 10=lahun
106 % 11=hun lahun, 12=ca lahun, 13=ox lahun.
107