% blackboard typefaces by Anthony Phan. % file: mbbgrkup.mf (Greek uppercase) % last modification: 25.10.2001. % One can choose to generate only Greek uppercase letters % which are different from latin (don't define the others' codes). % Some Greek-like symbols, defined at the end, obey the same rule. def horizontal_rules_list=0.4h,0.5h,0.6h, -body_depth,-desc_depth,cap_height,asc_height,body_height enddef; use_rule2; iff known bbAlpha: beginchar(bbAlpha,11.5u#+2appr#,cap_height#,0); "Uppercase Greek Alpha"; % no italic correction complete_AV(1,apprl-0.5u,w-apprr+0.5u); pickup circle.nib; z11=whatever[z1,z2]; z12=whatever[z5,z6]; bot y11=bot y12=vround 0.25h; draw z11..z12; labels(11,12); math_fit(0,0); endchar; iff known bbBeta: beginchar(bbBeta,10.15u#+Appr#+appr#,cap_height#,0); "Uppercase Greek Beta"; italcorr 0.8cap_height#*slant-0.85u#; pickup circle.nib; bot y4=vround 0.5h; lft x1=lft x9=Apprl; x2=x4=0.56[x1,x3]; rt x3=w-apprr-hround 0.35u; x6=x8=0.56[x1,x7]; rt x7=w-apprr; x5=x10=x11=x1+hthick; top y1=top y2=top y11=h; y4=y5=y6; y3=0.5[y2,y4]; y7=0.5[y6,y8]; bot y8=bot y9=bot y10=0; x12=max(x7-hThick,x6); x14=min(x12,x3); tmp_path:=z1..z2 right_to_down z3 down_to_left z4..z5 &z5..z6 right_to_down z7 down_to_left z8..z9; draw tmp_path; draw z10..z11; bbbowl(z6,z7,z8,hThick) tmp_path; bbbowl(z2,z3,z4,max(0,x3-x.bowl.mid)) tmp_path; pickup square.nib; draw z1..z9; labels(1,2,3,4,5,6,7,8,9,10,11); math_fit(0,0.3cap_height#*slant); endchar; beginchar(bbGamma,7.5u#+Appr#+appr#,cap_height#,0); "Uppercase Greek Gamma"; italcorr cap_height#*slant-0.5u#; pickup circle.nib; rt x1=w-apprr; lft x2=lft x3=Apprl; x4=x5=x3+hthick; top y1=top y2=top y5=h; bot y3=bot y4=0; pickup square.nib; draw z1--z2--z3--z4--z5; labels(1,2,3,4,5); math_fit(0,max(0.5cap_height#*slant-0.7u#,0)); endchar; beginchar(bbDelta,13u#+2appr#,cap_height#,0); "Uppercase Greek Delta"; % no italic correction complete_AV(1,apprl-0.5u,w-apprr+0.5u); y1a-y1=thin; z1a=whatever[z1,z2]; fill z1--z5--z5a--z1a--cycle; labels(1a); math_fit(0,0); endchar; iff known bbEpsilon: beginchar(bbEpsilon,7.5u#+Appr#+appr#,cap_height#,0); "Uppercase Greek Epsilon"; italcorr cap_height#*slant-0.5u#; pickup circle.nib; rt x1=rt x4=w-apprr; lft x2=lft x3=Apprl; x5=x6=lft x7=x3+hthick; rt x8=w-apprr-hround 0.7u; top y1=top y2=top y6=h; bot y3=bot y4=bot y5=0; bot y7=bot y8=floor 0.5h; pickup square.nib; draw z1--z2--z3--z4; draw z5..z6; draw z7..z8; labels(1,2,3,4,5,6,7,8); math_fit(0,max(0.5cap_height#*slant-0.7u#,0)); endchar; iff known bbZeta: beginchar(bbZeta,10.15u#+2appr#,cap_height#,0); "Uppercase Greek Zeta"; italcorr cap_height#*slant-0.5u#; pickup circle.nib; z1l=(apprl-hround 0.2u,0); z2l=(w-apprr+hround 0.2u,0); z3r=(apprl+hround 0.2u,h); z4r=(w-apprr,h); penpos1(thin,90); penpos2(thin,90); penpos3(thin,90); penpos4(thin,90); z5l=z1r; z8r=z4l; adjust_slanted_bar(5l,8r,6r,7l)(thick+thin,-1); a:=diag_width(thin,z8r-z6r); penpos5(a,0); penpos6(a,0); penpos7(a,0); penpos8(a,0); penstroke z1e..z2e; penstroke z3e..z4e; penstroke z5e..z7e; penstroke z6e..z8e; penlabels(1,2,3,4,5,6,7,8); math_fit(0,0.5cap_height#*slant); endchar; iff known bbEta: beginchar(bbEta,11u#+2Appr#,cap_height#,0); "Uppercase Greek Eta"; italcorr cap_height#*slant-u#; pickup circle.nib; lft x1=lft x3=Apprl; rt x5=rt x7=w-Apprr; x7-x8=x5-x6=x4-x3=x2-x1=hthick; bot y1=0; top y3=h; y1=y2=y5=y6; y3=y4=y7=y8; bot y9=bot y10=floor 0.5h; lft x9=x2; rt x10=x6; draw z9..z10; pickup square.nib; draw z1--z2--z4--z3--cycle; draw z5--z6--z8--z7--cycle; labels(1,2,3,4,5,6,7,8,9,10); math_fit(0,0.5ic#); endchar; beginchar(bbTheta,13u#+2appr#,cap_height#,0); "Uppercase Greek Theta"; italcorr 0.6cap_height#*slant-0.5u#; pickup circle.nib; bbcircle1(apprl,w-apprr,h+o,-o); draw last_path; bbbowl(z1b,z1a,z1d,hThick) last_path; lft x.bowl.top-rt x2=hround u; bbbowl(z1b,z1c,z1d,hThick) last_path; lft x3-rt x.bowl.top=hround u; y2=y3=good.y 0.5h; pickup square.nib; draw z2..z3; penlabels(2,3); math_fit(-0.4cap_height#*slant,ic#); endchar; iff known bbIota: beginchar(bbIota,hthick#+thin#+2Appr#,cap_height#,0); "Uppercase Greek Iota"; italcorr cap_height#*slant-u#; center_bar(1,2) x1=x3; x2=x4; bot y1=bot y2=0; top y3=top y4=h; pickup square.nib; draw z1--z2--z4--z3--cycle; labels(1,2,3,4); math_fit(0,0.5ic#); endchar; iff known bbKappa: beginchar(bbKappa,11.5u#+Appr#+appr#,cap_height#,0); "Uppercase Greek Kappa"; italcorr cap_height#*slant-0.5u#; pickup circle.nib; lft x1=lft x3=Apprl; x2-x1=hthick; x4=x5=x2; bot y1=0; y2=y1; top y3=h; y4=y3; x6r=w-apprr; y6r=h; y5=0.4h; adjust_slanted_bar(5,6r,5a,6)(0.5thin,-1); z6-z6l=z6r-z6; ortho_penpos5(thin,z6-z5); z7=(w-apprr,0); top z8b=(0.78[x3,x4],h); adjust_slanted_bar(8b,7,7b,8)(thick,1); z9=whatever[z5,z6]; z9=whatever[z7,z7b]; z10=whatever[z5,z6]; z10=whatever[z8,z8b]; y7a-y7=y8a-y8=thin; z7a=whatever[z7,z7b]; z8a=whatever[z8,z8b]; penpos7(diag_width(thin,z7b-z7),0); penpos8(diag_width(thin,z8b-z8),0); ortho_penpos9(thin, z7b-z7); ortho_penpos10(thin, z8b-z8); pickup square.nib; draw z1--z2--z4--z3--cycle; penstroke z5e..z6e; penstroke z7e..z9e; penstroke z8e..z10e; fill z7--z8--z8a--z7a--cycle; labels(1,2,3,4,5a,7a,7b,8a,8b); penlabels(5,6,7,8,9,10); math_fit(0,0); endchar; beginchar(bbLambda,11.5u#+2appr#,cap_height#,0); "Uppercase Greek Lambda"; % no italic correction complete_AV(1,apprl-0.5u,w-apprr+0.5u); math_fit(0,0); endchar; iff known bbMu: beginchar(bbMu,14u#+2Appr#,cap_height#,0); "Uppercase Greek Mu"; italcorr cap_height#*slant-u#; pickup circle.nib; bot y1=0; y1=y6=y7=y11=y12; top y2=h; y2=y3=y9=y10; lft x1=lft x2=Apprl; rt x10=rt x11=w-Apprr; x10-x9=x11-x12=x7-x6=x3-x2=hthick; x6-x1=x12-x7; y6r=y7r=0; y2l=y3l=y8l=h; y2l-y2r=y3l-y3r=y6l-y6r=y7l-y7r=thin; x2l=x2r=x2; x8l=lft x9; adjust_slanted_bar(6,3,4',5')(thick,-1); adjust_slanted_bar(7,8l,7',8')(0.5thin,1); if x4'>x7: z4=whatever[z3,z4']; z4=whatever[z7,z8']; z5=whatever[z1,z2]; z5=whatever[z6,z5']; else: z4=z4'; z5=z5'; fi ortho_penpos4(thin,z4'-z3); ortho_penpos5(thin,z6-z5'); ortho_penpos8(thin,z8'-z7); forsuffixes $=r,l: z3$-z4$=whatever*(z3-z4); z7$-z8$=whatever*(z7-z8); z6$-z5$=whatever*(z6-z5); endfor; penstroke z2e--z3e--z4e; penstroke z5e--z6e--z7e--z8e; pickup square.nib; draw z1..z2; draw z9--z10--z11--z12--cycle; penlabels(2,3,4,5,6,7,8); labels(1,4',5',7'8',9,10,11,12); math_fit(0,0.5ic#); endchar; iff known bbNu: beginchar(bbNu,10.7u#+2Appr#,cap_height#,0); "Uppercase Greek Nu"; italcorr cap_height#*slant-u#; pickup circle.nib; bot y1=0; y1=y6=y7; top y2=h; y2=y3=y5; lft x1=lft x2=Apprl; rt x5=rt x6=w-Apprr; x3-x2=x6-x7=hthick; penpos2(thin,-90); penpos6(thin,90); y3l=h; y7l=0; y3l-y3r=y7r-y7l=thin; adjust_slanted_bar(3,7,8a,4a)(thick,-1); if x8a>x2: z8=z8a; else: x8=x2; z8=whatever[z7,z8a]; fi if x4ax4: z12=whatever[z3,z4]; else: z12=tmp_path intersectionpoint ((x12,y1)..(x12,y5)); fi if x14x14: y14=y1; else: z14=whatever[z9,0.5[z0,z11l]]; fi draw z13..z14; draw z15..z16; square_end13(up); square_end16(down); penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); math_fit(0,0); endchar; iff known bbnabla: beginchar(bbnabla,13u#+2appr#,cap_height#,0); "Uppercase Greek nabla"; italcorr cap_height#*slant; complete_AV(-1,apprl-0.5u,w-apprr+0.5u); y1-y1a=thin; z1a=whatever[z1,z2]; fill z1--z5--z5a--z1a--cycle; labels(1a); math_fit(-0.5cap_height#*slant,cap_height#*slant-2.25u#); endchar; iff known bbslash_nabla: beginchar(bbslash_nabla,13u#+2appr#, cap_height#+0.5desc_depth#,0.5desc_depth#); "Uppercase Greek slash nabla"; italcorr cap_height#*slant; begingroup save h,d; h=cap_height; d=0; complete_AV(-1,apprl-0.5u,w-apprr+0.5u); endgroup; y1-y1a=thin; z1a=whatever[z1,z2]; fill z1--z5--z5a--z1a--cycle; z7'=1/3[z1r,z5l]; y7=-d; y10=h; z7'-z7=whatever*(z1-z2); z10-z7=whatever*(z1-z2); forsuffixes $=r,l: z7$-z7=z10$-z10=z1$-z1; z8$=whatever[z7$,z10$]; z8$=whatever[z3,z4]; z9$=whatever[z7$,z10$]; z9$=whatever[z2,z5]; endfor penstroke z7e..z8e; penstroke z9e..z10e; penlabels(7,8,9,10); labels(1a,7'); math_fit(-0.5cap_height#*slant,cap_height#*slant-2.25u#); endchar; iff known bbcoprod: beginchar(bbcoprod,11u#+2Appr#,cap_height#,0); "Coproduct symbol"; italcorr cap_height#*slant-u#; pickup circle.nib; lft x3=Apprl; bot y3=-d; top y4=h; x4=x3; x1=x2=x3+hthick; y2=y7=y6=y3; y1=y8=y5=y4; rt x6=w-Apprr; x5=x6; x7=x8=x6-hthick; pickup square.nib; draw z2--z1--z4--z3--z6--z5--z8--z7; labels(1,2,3,4,5,6,7,8); math_fit(0,0.5ic#); endchar; iff known bbmho: beginchar(bbmho,13u#+2appr#,cap_height#,0); "Uppercase Greek mho"; italcorr cap_height#*slant-1.3u#; pickup circle.nib; z0=(20u,h); y1l=y2l=y11l=y10l=h; x1l-apprl=w-apprr-x11l=hround 0.8u; x2l-x1l=x11l-x10l=ceiling 4.1u; penpos1(thin,-90); penpos2(thin,-90); penpos10(thin,-90); penpos11(thin,-90); z3r=z2r; z9l=z10r; lft x5=apprl; rt x7=w-apprr; x6=0.5[x5,x7]; bot y6=-o; ortho_penpos3(thin,z0); ortho_penpos9(thin,(-x0,y0)); ortho_penpos4(thin,z0); ortho_penpos8(thin,(-x0,y0)); slope:=y0/x0; ellipse_set(6,5,4,3); slope:=-y0/x0; ellipse_set(6,7,8,9); tmp_path:= z4{-z0}...z5 down_to_right z6 right_to_up z7...{-x0,y0}z8; x12-x5=x7-x14=hThick; if x12>x4: z12=whatever[z3,z4]; else: z12=tmp_path intersectionpoint ((x12,y1)..(x12,y5)); fi if x14