diff options
Diffstat (limited to 'fonts/mbboard/source')
51 files changed, 8831 insertions, 0 deletions
diff --git a/fonts/mbboard/source/COMP b/fonts/mbboard/source/COMP new file mode 100644 index 0000000000..7faede4096 --- /dev/null +++ b/fonts/mbboard/source/COMP @@ -0,0 +1,5 @@ +#!/bin/bash +mf "\mode=ljfour; mag=1.2; input $1"; gftopk $1.720gf; +mf "\mode=ljfour; input $1"; gftopk $1.600gf; + +mv *.tfm ../tfm; mv *pk ../pk; rm *gf; rm *.log; diff --git a/fonts/mbboard/source/COMPILE b/fonts/mbboard/source/COMPILE new file mode 100644 index 0000000000..89efb8e181 --- /dev/null +++ b/fonts/mbboard/source/COMPILE @@ -0,0 +1,27 @@ +#! /bin/bash +# blackboard typefaces by Anthony Phan. +# file: @compile (stupid compilation script) +# last modification: 09.08.2001. +# +# This script is helful for me. I just type 'bash @compile' +# then drink my coffee. It produces metrics and bitmaps (pk) +# for the 'ljfour' mode, then it wipes out temporary files +# and put the useful stuff in some directory... +# PLEASE CHANGE THE THIS FILE FOR YOUR OWN NEEDS. + +for xx in 17 12 10 9 8 7 6 5 +do + mf "\mode=ljfour; input mbb$xx"; gftopk mbb$xx.600gf; + mf "\mode=ljfour; mag=1.2; input mbb$xx"; gftopk mbb$xx.720gf; + mf "\mode=ljfour; input mbbx$xx"; gftopk mbbx$xx.600gf; + mf "\mode=ljfour; mag=1.2; input mbbx$xx"; gftopk mbbx$xx.720gf; +done; + +for fontxx in mbbheb10 mbbgr10 mbbi10 mbbsl10 mbbsc10 mbbr10 mbbcr10 +do + mf "\mode=ljfour; input $fontxx"; gftopk $fontxx.600gf; + mf "\mode=ljfour; mag=1.2; input $fontxx"; gftopk $fontxx.720gf; +done; + +mv *.tfm ../tfm; mv *pk ../pk; rm *gf; rm *.log; + diff --git a/fonts/mbboard/source/mbb10.mf b/fonts/mbboard/source/mbb10.mf new file mode 100644 index 0000000000..23645cf42f --- /dev/null +++ b/fonts/mbboard/source/mbb10.mf @@ -0,0 +1,23 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb10.mf (parameters' file for 10 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 10pt#; + +slant:=0; +%math_fitting:=true; +square_dots:=true; +straight_bowl:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbdrivr; + + + diff --git a/fonts/mbboard/source/mbb12.mf b/fonts/mbboard/source/mbb12.mf new file mode 100644 index 0000000000..0daa3c7e4e --- /dev/null +++ b/fonts/mbboard/source/mbb12.mf @@ -0,0 +1,23 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb12.mf (parameters' file for 12 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 12pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbdrivr; + + + + + diff --git a/fonts/mbboard/source/mbb17.mf b/fonts/mbboard/source/mbb17.mf new file mode 100644 index 0000000000..0751c1240f --- /dev/null +++ b/fonts/mbboard/source/mbb17.mf @@ -0,0 +1,23 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb17.mf (parameters' file for 17 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 17pt#; + +slant:=0; +%math_fitting:=true; +square_dots:=true; +straight_bowl:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbdrivr; + + + diff --git a/fonts/mbboard/source/mbb5.mf b/fonts/mbboard/source/mbb5.mf new file mode 100644 index 0000000000..f43eabffa5 --- /dev/null +++ b/fonts/mbboard/source/mbb5.mf @@ -0,0 +1,18 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb5.mf (parameters' file for 5 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 5pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbdrivr;
\ No newline at end of file diff --git a/fonts/mbboard/source/mbb6.mf b/fonts/mbboard/source/mbb6.mf new file mode 100644 index 0000000000..3cb6e00bd2 --- /dev/null +++ b/fonts/mbboard/source/mbb6.mf @@ -0,0 +1,20 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb6.mf (parameters' file for 6 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 6pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbdrivr; + + diff --git a/fonts/mbboard/source/mbb7.mf b/fonts/mbboard/source/mbb7.mf new file mode 100644 index 0000000000..29f1294c4f --- /dev/null +++ b/fonts/mbboard/source/mbb7.mf @@ -0,0 +1,20 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb8.mf (parameters' file for 7 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 7pt#; + +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +square_dots:=true; % should dots be square? +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbdrivr; + + diff --git a/fonts/mbboard/source/mbb8.mf b/fonts/mbboard/source/mbb8.mf new file mode 100644 index 0000000000..82186e0185 --- /dev/null +++ b/fonts/mbboard/source/mbb8.mf @@ -0,0 +1,19 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb8.mf (parameters' file for 8 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 8pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbdrivr; + diff --git a/fonts/mbboard/source/mbb9.mf b/fonts/mbboard/source/mbb9.mf new file mode 100644 index 0000000000..438c9e08f4 --- /dev/null +++ b/fonts/mbboard/source/mbb9.mf @@ -0,0 +1,18 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb9.mf (parameters' file for 9 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 9pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbdrivr; diff --git a/fonts/mbboard/source/mbbaccnt.mf b/fonts/mbboard/source/mbbaccnt.mf new file mode 100644 index 0000000000..536c470bca --- /dev/null +++ b/fonts/mbboard/source/mbbaccnt.mf @@ -0,0 +1,270 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbaccnt.mf (accents) +% last modification: 25.10.2001. + +diacritics_proofing;% changes extra_endchar for proof mode. + +def horizontal_rules_list= + -body_depth,-desc_depth,x_height,cap_height,asc_height,body_height +enddef; + +% italic corrections to be revised + +use_rule1; + +numeric tmp_h; tmp_h=x_height; + +beginchar(bbgrave,8u#+2appr#,min(asc_height#,2x_height#),0); + "Grave accent"; + italcorr asc_height#*slant-0.5u#; + complete_grave(apprl,apprr); +endchar; + +beginchar(bbacute,8u#+2appr#,min(asc_height#,2x_height#),0); + "Acute accent"; + italcorr asc_height#*slant-0.5u#; + complete_acute(apprl,apprr); +endchar; + +beginchar(bbcircumflex,8u#+2appr#,min(asc_height#,2x_height#),0); + "Circumflex accent"; + italcorr asc_height#*slant-0.5u#; + complete_hat(apprl,apprr); +endchar; + +iff known bbwide_circumflex: +beginchar(bbwide_circumflex,10u#+2appr#,min(asc_height#,2x_height#),0); + "Wide circumflex accent"; + italcorr asc_height#*slant-0.5u#; + complete_hat(apprl,apprr); +endchar; + +beginchar(bbhacheck,8u#+2appr#,min(asc_height#,2x_height#),0); + "Hackeck accent"; + italcorr asc_height#*slant-0.5u#; + complete_hacheck(apprl,apprr); +endchar; + +beginchar(bbtilde,8u#+2appr#,min(asc_height#,2x_height#),0); + "The tilde accent"; + italcorr asc_height#*slant-0.5u#; + numeric a; if square_dots: a=0; else: a=hround 0.5u; fi + complete_tilde(apprl+a,apprr+a); +endchar; + +iff known bbwide_tilde: +beginchar(bbwide_tilde,10u#+2appr#,min(asc_height#,2x_height#),0); + "The wide tilde accent"; + italcorr asc_height#*slant-0.5u#; + numeric a; if square_dots: a=0; else: a=hround 0.5u; fi + complete_tilde(apprl+a,apprr+a); +endchar; + +iff known bbbreve: +beginchar(bbbreve,8u#+2appr#,min(asc_height#,2x_height#),0); + "Breve accent"; + italcorr asc_height#*slant-0.5u#; + pickup circle.nib; top y1=top y3=h; + lft x1=apprl+hround u; rt x3=w-apprr-hround u; + bot y2=vround 1/3[tmp_h,h]; x2=0.5[x1,x3]; + draw z1 down_to_right z2 right_to_up z3; + square_end1(up); square_end3(up); + labels(1,2,3); +endchar; + +iff known bbmacron: +beginchar(bbmacron,8u#+2appr#,0.4[x_height#,asc_height#]+thin#,0); + "Macron accent"; + italcorr asc_height#*slant-0.5u#; + pickup circle.nib; top y1=top y2=h; + lft x1-apprl=w-apprr-rt x2=hround 0.5u; + pickup square.nib; draw z1..z2; labels(1,2); +endchar; + +beginchar(bbdotaccent,8u#+2appr#, + min(asc_height#,10/7x_height#+0.5dot_size#),0); + "Dot accent"; + italcorr charht*slant-0.5u#; + pickup circle.nib; center_bar(1,2); top y2=h; + bot y1=vround max(h-dot_size,x_height+o); + dot(1,2); labels(1,2); +endchar; + +% It's height has been corrected to fit french trema +beginchar(bbumlaut,8u#+2appr#, + min(asc_height#,10/7x_height# + if not low_umlaut: +0.5dot_size# fi),0); + "Umlaut accent"; + italcorr charht*slant-.5u#; + pickup circle.nib; x2-x1=x4-x3=hthick; + lft x1-apprl=w-apprr-rt x4=hround 0.5u; + top y2=top y4=h; + bot y1=bot y3=vround max(h-dot_size,x_height+o); + dot(1,2); dot(3,4); labels(1,2,3,4); +endchar; + +iff known bblong_umlaut: +beginchar(bblong_umlaut,8u#+2appr#,min(asc_height#,2x_height#),0); + "Long hungarian Umlaut accent"; + italcorr charht*slant-.5u#; + complete_long_umlaut(apprl,apprr); +endchar; + +% If one compare the next program with the cm corresponding one, +% he would see that apex_o is missing from the line above. The reason is +% that our 'A' does not overshoot its upper limit. + +iff known bbcirc_accent: +beginchar(bbcirc_accent,11.5u#+4/3(asc_height#-x_height#)*slant+2appr#, + asc_height#,0); + "The scandinavian circle accent"; + italcorr charht*slant-.5u#; + pickup circle.nib; + top y2=h+o; bot y4=vround(1/3[x_height,h])-eps; + y0=y1=y3=0.5[y4,y2]; x0=x2=x4=0.5[apprl,w-apprr]; + lft x3=hround (x0-0.5max(hThick+thin,3u+thin))-eps; + x1-x0=x0-x3; draw superellipse(z1,z2,z3,z4,superness); + labels(1,2,3,4,0); +endchar; + +iff known bbcedilla: +beginchar(bbcedilla,8u#+2appr#,0,desc_depth#); + "The cedilla accent"; +% no italic correction + complete_cedilla(0.5[apprl,w-apprr],-0.5thin); + square_end1(up); +endchar; + +% Polish accents. + +iff known bbleft_slanted_cross: +beginchar(bbleft_slanted_cross,0,asc_height#,0); + "The left slanted cross"; +% no italic correction + pickup circle.nib; lft x3l=apprl; x2l=x3l+hthick; + x0=rt x2l; y0=vround x_height+.25; apprl-x4l=x1l-x0=y1l-y0=hround(u); + y1l-y1r=thin/((1++slant)*sind angle((z1l-z0)slanted slant)); + x1r=x1l; z4l=whatever[z0,z1l]; z3l=whatever[z0,z1l]; + z2l=whatever[z0,z1l]; z2l-z2r=z3l-z3r=z4l-z4r=z1l-z1r; + penstroke z1e..z2e; penstroke z3e..z4e; + penlabels(0,1,2,3,4); +endchar; + +iff known bbogonek: +beginchar(bbogonek,thin#+2appr#,0,desc_depth#); + "The ogonek accent"; +% no italic correction + center_stem(0); complete_ogonek(x0,-0.5thin); + square_end1(up); +endchar; + +% Greek accents. + +iff known bbstraight_accent: +beginchar(bbstraight_accent,8u#+2appr#,min(asc_height#,2x_height#),0); + "Greek straight accent"; + italcorr asc_height#*slant-0.5u#; + if square_dots: + center_bar(1,2); x3=x2; x4=x1; + top y3=top y4=h; bot y1=bot y2=vround 1/5[x_height,h]; + pickup square.nib; draw z1--z2--z3--z4--cycle; + labels(1,2,3,4); + else: + x1=x2=hround(0.5[apprl,w-apprr]-0.5dot_size)+0.5dot_size; + y2=h+o-dot_size/2; y1=vround 1/5[x_height,h]+dot_size/4; + long_dot(1,2); + fi +endchar; + +iff known bbrough: +beginchar(bbrough,8u#+2appr#,min(asc_height#,2x_height#),0); + "Greek rough accent"; + italcorr asc_height#*slant-0.5u#; + pickup circle.nib; + top y4=h; bot y1=vround 1/5[x_height,h]; + lft x3-apprl=w-apprr-rt x1=hround 2u; x5-x3=hthick; + complete_comma; +endchar; + +iff known bbsmooth: +beginchar(bbsmooth,8u#+2appr#,min(asc_height#,2x_height#),0); + "Greek smooth accent"; + italcorr asc_height#*slant-0.5u#; + pickup circle.nib; + top y4=h; bot y1=vround 1/5[x_height,h]; + lft x1-apprl=w-apprr-rt x3=hround 2u; x3-x5=hthick; + complete_comma; +endchar; + +iff known bbgreek_tilde: +beginchar(bbgreek_tilde,8u#+2appr#, + min(asc_height#,10/7x_height#+0.5dot_size#),0); + "Greek tilde accent"; + italcorr asc_height#*slant-0.5u#; + pickup circle.nib; + top y2=top y6=h-vround 0.25dot_size; + bot y1=bot y5=h-dot_size; + lft x1-apprl=w-apprr-rt x6=hround 0.75u; + z0=0.5[z1,z6]; slope:=-dot_size/4u; + hellipse_set(1,2,3,0); hellipse_set(6,5,4,0); + draw z1 up_to_right z2...z3---z4...z5 right_to_up z6; + square_end1(down); square_end6(up); + labels(0,1,2,3,4,5,6); +endchar; + +iff known bbrough_tilde: +beginchar(bbrough_tilde,8u#+2appr#,body_height#,0); + "Greek rough and tilde accent"; + italcorr asc_height#*slant-0.5u#; + pickup circle.nib; + % rough + top y4'=vround min(h-0.75dot_size,asc_height,2x_height); + bot y1'=vround 1/5[x_height,top y4']; + lft x3'-apprl=w-apprr-rt x1'=hround 2u; x5'-x3'=hthick; + % tilde + top y2=top y6=h+o; bot y1=bot y5=h+o-vround 0.75dot_size; + lft x1-apprl=w-apprr-rt x6=hround 0.75u; + z0=0.5[z1,z6]; slope:=-dot_size/4u; + hellipse_set(1,2,3,0); hellipse_set(6,5,4,0); + draw z1 up_to_right z2...z3---z4...z5 right_to_up z6; + square_end1(down); square_end6(up); + complete_comma'; labels(0,1,2,3,4,5,6); +endchar; + +iff known bbsmooth_tilde: +beginchar(bbsmooth_tilde,8u#+2appr#,body_height#,0); + "Greek smooth and tilde accent"; + italcorr asc_height#*slant-0.5u#; + pickup circle.nib; + % smooth + top y4'=vround min(h-0.75dot_size,asc_height,2x_height); + bot y1'=vround 1/5[x_height,top y4']; + lft x1'-apprl=w-apprr-rt x3'=hround 2u; x3'-x5'=hthick; + % tilde + top y2=top y6=h+o; bot y1=bot y5=h+o-vround 0.75dot_size; + lft x1-apprl=w-apprr-rt x6=hround 0.75u; + z0=0.5[z1,z6]; slope:=-dot_size/4u; + hellipse_set(1,2,3,0); hellipse_set(6,5,4,0); + draw z1 up_to_right z2...z3---z4...z5 right_to_up z6; + square_end1(down); square_end6(up); + complete_comma'; labels(0,1,2,3,4,5,6); +endchar; + +iff known bbsubscript_iota: +beginchar(bbsubscript_iota,8u#+2appr#,0,desc_depth#); + "Subscript iota"; +% no italic correction + center_bar(4,5); x3=x4; x2=0.5[x1,x4]; + rt x1-lft x4=hround max(3u,hthick+thin+1.7u); + bot y2=-(desc_depth+o+dot_skip); + top y4=vround(h-o-dot_skip); + y1=y3=good.y(0.3[y2,y4]); + tmp_path:=z1 down_to_left z2 left_to_up z3..z4; + draw tmp_path; + hbbowl(z2,z3,z4,hthick) tmp_path; + pickup square.nib; draw z4..z.bowl.bot; + square_end1(up); labels(1,2,3,4); +endchar; + +standard_proofing;% restore extra_endchar. + diff --git a/fonts/mbboard/source/mbbbase.mf b/fonts/mbboard/source/mbbbase.mf new file mode 100644 index 0000000000..ed450b9d90 --- /dev/null +++ b/fonts/mbboard/source/mbbbase.mf @@ -0,0 +1,848 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbbase.mf (base file) +% last modification: 25.10.2001. + +mbbbase:=1; % when |mbbbase| is known, this file has been input + +newinternal slant, math_spread, superness; +superness:=1/sqrt 2;% initialisation +superbowl:=superness; + +boolean math_fitting, square_dots,old_digits, +variant_a,variant_f,variant_g,variant_y, +low_umlaut,square_hebrew,dagesh_mark; +math_fitting=false; low_umlaut=true; +square_hebrew=true; dagesh_mark=false; + +string normal_extra_endchar, tmp_string; +normal_extra_endchar:=extra_endchar; + +path tmp_path,tmpp_path,last_path,bowl_path; + +def font_setup= + autorounding:=0; smoothing:=0; + clear_pen_memory; + define_pixels(u,dh); + define_whole_vertical_pixels(body_height,asc_height, + cap_height,fig_height,x_height,desc_depth,dot_size); + $:=1; + forever: + exitif unknown thin[$].#; + define_whole_blacker_pixels(thin[$]); + hthick[$].#:=thick[$].#*(1++slant); + hThick[$].#:=Thick[$].#*(1++slant); + define_whole_pixels(thick[$],Thick[$],hthick[$],hThick[$]) + hthick[$]:=thick[$]*(1++slant); + hThick[$]:=Thick[$]*(1++slant); + lowres_fix(thick[$],Thick[$]) 1.2; + lowres_fix(hthick[$],hThick[$]) 1.2; + pickup pencircle scaled thin[$]; circle.nib[$]:=savepen; + pickup makepen((((.5,.5)--(-.5,.5)--(-.5,-.5)--(.5,-.5)--cycle) + xscaled ((1++slant)*thin[$]) yscaled thin[$])slanted slant); + square.nib[$]:=savepen; + $:=$+1; + endfor + dot_skip#:=max(1.5o#,0.5u#); + define_whole_pixels(dot_skip); + dot_skip:=max(1,dot_skip); + numeric paren_depth#,asc_depth#,body_depth#, + comma_size#,appr#,Appr#, + comma_size,apprl,apprr,Apprl,Apprr,ess,cap_ess; + oo:=vround(0.5o#*hppp*o_correction)+eps; + uo:=vround 1.5oo+eps; + define_corrected_pixels(o); + define_horizontal_corrected_pixels(ho); + appr#=u#+letter_fit#; Appr#=1.5u#+letter_fit#; + apprl=floor(0.5hround(2appr#*hppp)); + apprr=ceiling(0.5hround(2appr#*hppp)); + Apprl=floor(0.5hround(2Appr#*hppp)); + Apprr=ceiling(0.5hround(2Appr#*hppp)); + ess=(ess#/thick1#)*thick1; + cap_ess=(cap_ess#/thick2#)*thick2; + 0.5[body_height#,-paren_depth#]=math_axis#; + 0.5[asc_height#,-asc_depth#]=math_axis#; + body_depth#:=desc_depth#+body_height#-asc_height#; + define_whole_vertical_pixels(asc_depth,body_depth,paren_depth); + comma_size#=min(dot_size#+desc_depth#,asc_height#-x_height#+thin1#); + comma_size=min(dot_size+desc_depth,asc_height-x_height+thin1); + rule_thickness:=ceiling(rule_thickness#*hppp); + pickup pencircle scaled rule_thickness; rule.nib:=savepen; + math_axis:=good.y(math_axis#*hppp); + if slant>0: + currenttransform:=identity slanted slant; + else: + currenttransform:=identity yscaled aspect_ratio scaled granularity; + fi + use_rule1; +% shrink_fit:=1+hround(2letter_fit#*hppp) +% -2hround(letter_fit#*hppp); + if math_fitting: let math_fit=do_math_fit; + else: let math_fit=ignore_math_fit; fi + extra_font_setup; +enddef; + +def extra_font_setup= enddef; + +% not as complex as Knuth's macros. + +def ignore_math_fit(expr left_adjustment,right_adjustment)=enddef; + +def do_math_fit(expr left_adjustment,right_adjustment)= + interim xoffset:=hround(left_adjustment*hppp); + charwd:=charwd+left_adjustment+right_adjustment; + w:=hround(charwd*hppp); + charic:=charic-right_adjustment; if charic<0: charic:=0; fi +enddef; + +vardef ic#=charic enddef; + +def padded expr del_sharp= + charht:=charht+del_sharp; chardp:=chardp+del_sharp +enddef; + +vardef use_rule@#= + circle.nib:=circle.nib@#; + square.nib:=square.nib@#; + thin#:=thin@#.#; thin:=thin@#; + thick:=thick@#; hthick:=hthick@#; + Thick:=Thick@#; hThick:=hThick@#; + thick#:=thick@#.#; hthick#:=hthick@#.#; + Thick#:=Thick@#.#; hThick#:=hThick@#.#; +enddef; + +vardef ortho_penpos@#(expr $,$$)= + (x@#r-x@#l,y@#r-y@#l) + =$*((0,-1)rotated angle($$ slanted slant))slanted -slant; + (x@#r-x@#,y@#r-y@#)=(x@#-x@#l,y@#-y@#l) +enddef; + +vardef stroke text t = + forsuffixes e = l,r: path_.e:=t; endfor + if cycle path_.l: + errmessage "Beware: `stroke' doesn't work with cycles"; + fi + path_.l -- reverse path_.r -- cycle +enddef; + +def diag_width(expr $,$$)= + $/abs sind angle($$ slanted slant) +enddef; + +vardef square_end@#(expr $)= + save x_,y_; + (x_,y_)=unitvector($); + ortho_penpos@#(thin,(x_,y_)); + z@#b=z@#+0.5(x_,y_)*(thin)*((y_-slant*x_)++(-x_)); + z@#a-z@#b=z@#b-z@#c=whatever*(y_,-x_); + z@#a-z@#r=whatever*(x_,y_); + x@#.a:=0.5hround 2x@#.a; x@#.c:=0.5hround 2x@#.c; + y@#.a:=0.5vround 2y@#.a; y@#.c:=0.5vround 2y@#.c; + erase fill z@#.a--z@#.a+(x_,y_)--z@#.c+(x_,y_)--z@#.c--cycle; + fill z@#r--z@#a--z@#c--z@#l--cycle; + labels(@#a,@#b,@#c,@#r,@#l) +enddef; + +% $ <---> $$$; $$ <---> $$$$. sign=+1 for X, -1 for Z. + +vardef adjust_slanted_bar(suffix $,$$,$$$,$$$$)(expr bar_thick,sign)= + save a,b; + if abs(y$$-y$)=bar_thick: + (a1,a2)=(z$$-z$)slanted slant; + if a1=0: b=0;% b should then be infinite. + else: b=if sign<0: - fi (a1++a2)*((a1++a2)/2a1); + fi + else: + a=angle((z$$-z$)slanted slant); + b=(cosd(a)/sind(a) if sign<0: - else: + fi + (((y$$-y$)/(bar_thick)/sind(a))+-+1)) + /(((y$$-y$)/(bar_thick))**2-1)*(y$$-y$); + fi + z$$$=(x$-b,y$); z$$$$=(x$$+b,y$$) +enddef; + +% ellipses and related things. + +primarydef w up_to_right z= + w{0,ypart(z-w)} + ...(superness[xpart z,xpart w], + superness[ypart w,ypart z]){z-w} + ...{xpart(z-w),0}z +enddef; +let up_to_left=up_to_right; +let down_to_right=up_to_right; +let down_to_left=up_to_right; +primarydef w right_to_up z= + w{xpart(z-w),0} + ...(superness[xpart w,xpart z], + superness[ypart z,ypart w]){z-w} + ...{0,ypart(z-w)}z +enddef; +let right_to_down=right_to_up; +let left_to_up=right_to_up; +let left_to_down=right_to_up; + +primarydef w flat_up_to_right z= + flat_up_to_right_(w,z)...{xpart(z-w),0}z +enddef; +vardef flat_up_to_right_(expr w,z)= + save z_,z__; pair z_,z__; + z_=(superness[xpart z,xpart w],superness[ypart w,ypart z]); + xpart z__=xpart w; z__-z_=whatever*(w-z); + w..controls 0.5(w+z__) and z__..z_{z-w} +enddef; +let flat_up_to_left=flat_up_to_right; +let flat_down_to_right=flat_up_to_right; +let flat_down_to_left=flat_up_to_right; +primarydef w flat_right_to_up z= + flat_right_to_up_(w,z)...{0,ypart(z-w)}z +enddef; +vardef flat_right_to_up_(expr w,z)= + save z_,z__; pair z_,z__; + z_=(superness[xpart w,xpart z],superness[ypart z,ypart w]); + ypart z__=ypart w; z__-z_=whatever*(w-z); + w..controls 0.5(w+z__) and z__..z_{z-w} +enddef; +let flat_right_to_down=flat_right_to_up; +let flat_left_to_up=flat_right_to_up; +let flat_left_to_down=flat_right_to_up; + +% Mighty macro by D. E. Knuth + +def ellipse_set(suffix $,@,@@,$$)= + alpha_:=slope*(x@-x$); beta_:=y$$-y$-slope*(x$$-x$); + gamma_:=alpha_/beta_; + y@-y$=.5(beta_-alpha_*gamma_); + x@@-x$=-2gamma_*(x@-x$)/(1+gamma_*gamma_); + y@@-y$$=slope*(x@@-x$$) +enddef; + +def hellipse_set(suffix $,@,@@,$$)= + alpha_:=(y@-y$)/slope; beta_:=x$$-x$-(y$$-y$)/slope; + gamma_:=alpha_/beta_; + x@-x$=.5(beta_-alpha_*gamma_); + y@@-y$=-2gamma_*(y@-y$)/(1+gamma_*gamma_); + x@@-x$$=(y@@-y$$)/slope +enddef; + +vardef elliptic_arc(suffix $,$$,$$$)= + save x_,t,p_; path p_; + p_=z$ up_to_right (x$+5u,y$$) right_to_down (x$+10u,y$); + t=xpart(p_ intersectiontimes ((x$+5u,y$$$)..(x$+10u,y$$$))); + x_=xpart(point t of p_); x$$-x$=5u*((x$$$-x$)/(x_-x$)); + p_:=((p_ shifted (-x$,0)) xscaled ((x$$$-x$)/(x_-x$))) shifted (x$,0); + y$$$'=y$$; z$$$'-z$$$=whatever*(direction t of p_); + subpath (0,t) of p_ +enddef; + +def autorounded= + interim smoothing:=2; interim autorounding:=2 +enddef; + +def center_bar(suffix $,$$)= + pickup circle.nib; + if hround((w+apprl-apprr-hthick-thin)/2) + <>(w+apprl-apprr-hthick-thin)/2: change_width fi; + lft x$=(w+apprl-apprr-hthick-thin)/2; x$$=x$+hthick; +enddef; + +def center_stem(text t)= + pickup circle.nib; + if 0.5(w+apprl-apprr)<>good.x(0.5(w+apprl-apprr)): change_width; fi + for $=t: x[$]=0.5(w+apprl-apprr); endfor +enddef; + +def compute_spread(expr normal_spread,big_spread)= + spread#:=math_spread[normal_spread,big_spread]; + spread:=2ceiling(spread#*hppp/2)+eps +enddef; + +def v_center(expr h_sharp) = + .5h_sharp+math_axis#, .5h_sharp-math_axis# +enddef; + +boolean straight_bowl; +straight_bowl=true; +bowl_max_height:=infinity; + +def bbbowl(expr top_point,mid_point,bot_point,thickness) expr p= + x.bowl.mid:=x.bowl.top:=x.bowl.bot:=xpart mid_point + if xpart mid_point<xpart top_point: + else: - fi thickness; + y.bowl.mid:=ypart mid_point; + y.bowl.top:=ypart(p intersectionpoint + ((x.bowl.mid,ypart top_point)..(x.bowl.mid,y.bowl.mid))); + y.bowl.bot:=ypart(p intersectionpoint + ((x.bowl.mid,ypart bot_point)..(x.bowl.mid,y.bowl.mid))); + bowl_path:=if straight_bowl: z.bowl.top..z.bowl.bot + else: begingroup interim superness:=superbowl; + if xpart mid_point<xpart top_point: + if x.bowl.top<xpart top_point: top_point left_to_down + else: z.bowl.top.. fi + else: if x.bowl.top>xpart top_point: top_point right_to_down + else: z.bowl.top.. fi fi + if ypart(top_point-bot_point)>bowl_max_height: + (x.bowl.mid,ypart top_point-0.5bowl_max_height) + ..(x.bowl.mid,ypart bot_point+0.5bowl_max_height) + else: z.bowl.mid fi + if xpart mid_point<xpart bot_point: + if x.bowl.bot<xpart bot_point: down_to_right bot_point + else: ..z.bowl.bot fi + else: if x.bowl.bot>xpart bot_point: down_to_left bot_point + else: ..z.bowl.bot fi fi + endgroup + fi; + draw bowl_path +enddef; + +def hbbowl(expr top_point,mid_point,bot_point,thickness) expr p= + x.bowl.mid:=x.bowl.top:=x.bowl.bot:=xpart mid_point + if xpart mid_point<xpart top_point: + else: - fi thickness; + y.bowl.mid:=ypart mid_point; y.bowl.bot:=ypart bot_point; + y.bowl.top:=ypart(p intersectionpoint + ((x.bowl.mid,ypart top_point)..(x.bowl.mid,y.bowl.mid))); + bowl_path:=if straight_bowl: z.bowl.top..z.bowl.bot + else: begingroup interim superness:=superbowl; + if xpart mid_point<xpart top_point: + if x.bowl.top<xpart top_point: top_point left_to_down + else: z.bowl.top.. fi + else: if x.bowl.top>xpart top_point: top_point right_to_down + else: z.bowl.top.. fi fi + if abs(ypart(top_point-mid_point))>0.5bowl_max_height: + + (x.bowl.mid,ypart top_point + if ypart(top_point-mid_point)>0: - else: + fi + 0.5bowl_max_height).. + fi + z.bowl.mid if y.bowl.mid<>y.bowl.bot: ..z.bowl.bot fi + endgroup + fi; + draw bowl_path +enddef; + +% some drawings are repeated, so they become macros. +% Also, it makes it simpler to change. + +def dot(suffix $,$$)= + if square_dots: pickup square.nib; + draw (x$,y$)--(x$$,y$)--(x$$,y$$)--(x$,y$$)--cycle; + labels($,$$); + else: pickup circle.nib; + y$a=y$c=0.5[y$,y$$]; x$b=x$d=0.5[x$,x$$]; + x$a=x$; x$c=x$$; y$b=y$$; y$d=y$; + draw z$a up_to_right z$b right_to_down z$c + down_to_left z$d left_to_up z$a; + labels($,$$,$a,$b,$c,$d); fi +enddef; + +% the next program draws `acute', `grave' and related shapes +% when square_dots=false. Well, it is quite tricky and some +% people would think that this program leads to wrong results. +% I am not sure that it does not but I've designed it so. + +vardef long_dot(suffix $,$$)= + pickup circle.nib; save a,r,u_; pair u_; + r$=max(0.5(0.5dot_size-thin),0); + r$$=max(0.5(dot_size-thin),0); + a=(r$$-r$)/abs(z$$-z$); + u_=unitvector(z$$-z$); + z$$b-z$$=r$$*u_; z$b-z$=-r$*u_;% edges + z$-z$a=r$*a*u_; z$$-z$$a=r$$*a*u_;% midpoints + ortho_penpos$a(0.5thick*(1+-+a),u_); + ortho_penpos$$a(thick*(1+-+a),u_); + ortho_penpos$$(thick,u_); + draw z$b{(z$$r-z$$l)}...z$a.r--z$$a.r...z$$r{z$$-z$}... + (superness[z$$,z$$b]+superness[z$$,z$$r]-z$$){z$$b-z$$r} + ...z$$b{-(z$$r-z$$l)}... + (superness[z$$,z$$b]+superness[z$$,z$$l]-z$$){z$$l-z$$b} + ...z$$.l{z$-z$$}...z$$a.l--z$a.l...cycle; + penlabels($a,$$,$$a); labels($,$b,$$b); +enddef; + +% see, for instance, "bbcomma" in bbpunct.mf to learn which +% coordinates should be known before calling the next routine. + +vardef complete_comma@#= + save tmp_path; path tmp_path; + if y4@#>y1@#: top y4@#-y3@#=min(dot_size/2,y4@#-y1@#); + else: y3@#-bot y4@#=min(dot_size/2,y1@#-y4@#); fi + y2@#=y1@#; x2@#=0[x1@#,x5@#]; + tmp_path=z1@#..z2@# right_to_up z3@#; + hbbowl(z1@#,1/3[z3@#,(x3@#,y1@#)],z3@#,abs(x5@#-x3@#)) tmp_path; + draw tmp_path; square_end1@#((x5@#-x3@#,0)); + if square_dots: x4@#=x3@#; y4@#=y5@#; + draw z3@#..z4@#; draw z5@#..z.bowl.bot; + pickup square.nib; draw z4@#..z5@#; + else: x4@#=0.5[x3@#,x5@#]; y5@#=y3@#; + draw z3@# up_to_left z4@# right_to_down z5@#; + fi + labels(1@#,2@#,3@#,4@#,5@#) +enddef; + +def complete_AV(expr $,lftbound,rtbound)= + if $<0: x1l=rtbound; x3r=lftbound; y1l=y5l=y3r=h; y2l=y4r=-d; + else: x1l=lftbound; x3r=rtbound; y1l=y5l=y3r=-d; y2l=y4r=h; fi + numeric a,x,y; + a=(abs(x3r-x1l)-2(h+d)*slant)/(2h+2d); + y=(thick+thin)/(2h+2d); + x=(thick+thin)*(-a*y+sqrt(1+(a**2)-(y**2)))/(1-(y**2)); + x4r-x2l=x3r-x5l=if $<0: - fi x; x2l-x1l=x5l-x2l; z6l=z2l; + numeric x,y; + x=if $<0: - fi diag_width(thin,z3r-z4r); + y=if $<0: - fi diag_width(thin,z1l-z2l); + penpos1(y,0); penpos2(y,0); penpos3(x,0); + penpos4(x,0); penpos5(x,0); penpos6(x,0); + y3a-y3=if $<0:- fi thin; + z3a-z3=z5a-z5=z4-z4a=z6-z6a=whatever*(z4-z3); + z2a=whatever[z1r,z2r]; z2a=whatever[z5,z6]; + fill z1r--z2a--z6--z2l--z1l--cycle; + penstroke z3e..z4e; penstroke z5e..z6e; + fill z3--z5--z5a--z3a--cycle; + fill z4--z6--z6a--z4a--cycle; + penlabels(1,2,3,4,5,6); labels(2a,3a,4a,5a,6a) +enddef; + +% def adjust_O(expr @,$,$$,$$$,$$$$)= +% pickup circle.nib; +% rt x[@]=w-apprr+$$; lft x[@+2]=apprl-$; +% top y[@+1]=h+$$$; bot y[@+3]=-d-$$$$; +% y[@]=y[@+2]=0.5[y[@+1],y[@+3]]; x[@+1]=x[@+3]=0.5[x[@],x[@+2]]; +% x[@+4]-x[@+2]=x[@]-x[@+6]=hThick; +% tmp_path:=superellipse(z[@],z[@+1],z[@+2],z[@+3],superness); +% z[@+4]=tmp_path intersectionpoint ((x[@+4],y[@+3])..(x[@+4],y[@])); +% z[@+5]=tmp_path intersectionpoint ((x[@+4],y[@+1])..(x[@+4],y[@])); +% z[@+6]=tmp_path intersectionpoint ((x[@+6],y[@+3])..(x[@+6],y[@])); +% z[@+7]=tmp_path intersectionpoint ((x[@+6],y[@+1])..(x[@+6],y[@])); +% enddef; + +vardef bbcircle@#(expr left_side,right_side,top_side,bot_side)= + rt x@#a=right_side; lft x@#c=left_side; + top y@#b=top_side; bot y@#d=bot_side; + y@#a=y@#c=0.5[y@#b,y@#d]; x@#b=x@#d=0.5[x@#a,x@#c]; + last_path:=superellipse(z@#a,z@#b,z@#c,z@#d,superness); + labels(@#a,@#b,@#c,@#d) +enddef; + +% def complete_O(expr $,$$,$$$,$$$$)= +% pickup circle.nib; +% rt x1=w-apprr+$$; lft x3=apprl-$; top y2=h+$$$; bot y4=-d-$$$$; +% y1=y3=0.5[y2,y4]; x2=x4=0.5[x1,x3]; +% tmp_path:=superellipse(z1,z2,z3,z4,superness); +% draw tmp_path; +% bbbowl(x3,y2,y4,hThick) tmp_path; +% bbbowl(x1,y2,y4,hThick) tmp_path; +% labels(1,2,3,4); +% enddef; + +def complete_X(expr shift)= + pickup circle.nib; + numeric a; + x1l=apprl-shift; x4r=w-apprr+shift; y1l=h; y4r=-d; + adjust_slanted_bar(1l,4r,2r,3l)(thick+thin,1); + a=diag_width(thin,z1l-z3l); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + z5l=(apprl,-d); z8r=(w-apprr,h); + adjust_slanted_bar(5l,8r,5r,8l)(thin,-1); + forsuffixes $=l,r: + z6$=whatever[z5$,z8$]; z6$=whatever[z1,z3]; + z7$=whatever[z5$,z8$]; z7$=whatever[z2,z4]; + endfor + y1-y1a=thin; z1a=whatever[z1,z3]; z1-z1a=z2-z2a=z3a-z3=z4a-z4; + penstroke z1e..z3e; penstroke z2e..z4e; penstroke z5e..z6e; + penstroke z7e..z8e; fill z1a--z2a--z2--z1--cycle; + fill z3--z4--z4a--z3a--cycle; labels(1a,2a,3a,4a); + penlabels(1,2,3,4,5,6,7,8); +enddef; + +% macros for lowercase. + +boolean g_bar, j_bar; +g_bar=false; j_bar=false; + +% $ and $$ : proportionnal depth of the curve along the straight bar. + +def complete_right_lower(expr $,$$)= + if g_bar or j_bar: complete_gj_bar(-1); + else: pickup circle.nib; lft x1=apprl; x3=x1; + bot y1=-d; y2=y1; top y3=h; y4=y3; x2-x1=x4-x3=hthick; + pickup square.nib; draw z1--z2--z4--z3--cycle; + fi + pickup circle.nib; + rt x7=w-apprr+ho; terminate_lower($,$$); +enddef; + +% $ and $$ : proportionnal depth of the curve along the straight bar. + +def complete_left_lower(expr $,$$)= + if g_bar or j_bar: complete_gj_bar(1); + else: pickup circle.nib; rt x1=w-apprr; x3=x1; + bot y1=-d; y2=y1; top y3=h; y4=y3; x1-x2=x3-x4=hthick; + pickup square.nib; draw z1--z2--z4--z3--cycle; fi + pickup circle.nib; + lft x7=apprl-ho; terminate_lower($,$$); +enddef; + +def terminate_lower(expr $,$$)= + pickup circle.nib; + x5=x9=x2; y7=0.5[y6,y8]; x6=x8=0.5[x7,x1]; + if ab_down_factor>0: bot y6=-oo; + y5=ab_down_factor[top 0,bot x_height]; + else: bot y6=bot y5=0; fi + if ab_up_factor>0: top y8=x_height+oo; + y9=ab_up_factor[bot x_height,top 0]; + else: top y8=top y9=x_height; fi + tmp_path:=z5 if ab_down_factor>0: down_to_left else:.. fi + z6 left_to_up z7 up_to_right z8 + if ab_up_factor>0: right_to_down else:.. fi z9; + bbbowl(z8,z7,z6,hThick) tmp_path; draw tmp_path; + labels(1,2,3,4,5,6,7,8,9); +enddef; + +% $ : proportionnal depth of the curve along the straight bar. + +def complete_n= + pickup circle.nib; lft x1=apprl; x3=x1; + bot y1=bot y2=0; top y3=top y4=h; x2-x1=x4-x3=hthick; + x5=x2; x6=0.5[x7,x5]; rt x7=rt x8=w-apprr; + if hmn_factor>0: y5=hmn_factor[bot x_height, y1]; + top y6=x_height+oo; + else: top y5=top y6=x_height; fi + y7=0.7[y1,y6]; x8-x9=hthick; + if g_bar or j_bar: y8=0; else: bot y8=bot y9=-d; fi + tmp_path:=z5 if hmn_factor>0: up_to_right else:.. fi + z6 right_to_down z7.. + if g_bar: g_curve8(9,x9,true); + elseif j_bar: j_curve8(9,x9,true); + else: z8; fi + draw tmp_path; hbbowl(z6,z7,z8,hthick) tmp_path; + pickup square.nib; draw z1--z2--z4--z3--cycle; + if (not j_bar) and (not g_bar): draw z8..z9; fi + labels(1,2,3,4,5,6,7,8,9,10); g_bar:=false; j_bar:=false; +enddef; + +def complete_u(expr $)= + if g_bar or j_bar: complete_gj_bar(1); + else: + pickup circle.nib; rt x1=w-apprr; x3=x1; + bot y1=-d; y2=y1; top y3=h; y4=y3; x1-x2=x3-x4=hthick; + pickup square.nib; draw z1--z2--z4--z3--cycle; fi + pickup circle.nib; + x5=x2; x6=0.5[x7,0.5[x2,x1]]; lft x7=lft x8=apprl; + top y8=x_height; y7=0.7[y8,y6]; + if uy_factor>0: y5=uy_factor[top 0,y8]; bot y6=-oo; + else: bot y5=bot y6=0; fi + tmp_path:=z5 if uy_factor>0: down_to_right else:.. fi + z6 left_to_up z7..z8; + draw tmp_path; hbbowl(z6,z7,z8,hthick) tmp_path; + pickup square.nib; + draw z8..z.bowl.bot; labels(1,2,3,4,5,6,7,8,9,10); +enddef; + +def complete_gj_bar(expr $)= + pickup circle.nib; + top y3=top y4=h; y1=0; + if $>0: rt x1=rt x3=w-apprr; x3-x4=hthick; + else: lft x1=lft x3=apprl; x4-x3=hthick; fi + draw z3..if g_bar: g_curve1(2,x4,true); g_bar:=false; + else: j_curve1(2,x4,true); j_bar:=false; fi + draw z2..z4; pickup square.nib; draw z3..z4; +enddef; + +vardef g_curve@#(suffix $)(expr $$,squared_end)= + save p_; path p_; + bot y@#.a=-d; y@#.b=0.5[bot y@#,y@#.a]; + if $$<x@#: lft x@#.b=apprl+hround 0.15u; + else: rt x@#.b=w-apprr-hround 0.15u; fi + p_=elliptic_arc(@#,@#.a,@#.b); + hbbowl(z@#.a,z@#,z@#,abs($$-x@#)) p_; + z$=z.bowl.bot; + if squared_end: square_end@#.b(z@#.b-z@#.b'); fi + labels(@#.a,@#.b,@#.b'); + p_ +enddef; + +vardef j_curve@#(suffix $)(expr $$,squared_end)= + save p_; path p_; + bot y@#.a=bot y@#.b=-d; + $$-x@#.b=if x@#<$$: - fi hround 2u; + x@#.a=0.25[x@#.b,$$]; + p_=z@# down_to_right z@#.a..z@#.b; + hbbowl(z@#.a,z@#,z@#,abs($$-x@#)) p_; + z$=z.bowl.bot; + if squared_end: square_end@#.b(z@#.b-z@#.a); fi + labels(@#.a,@#.b); + p_ +enddef; + +def complete_f_stroke(suffix $,$$)(expr top_width,squared_end)= + pickup circle.nib; + top y$.a=top y$.b=h; y$=x_height; + x$.a-x$$=top_width; x$.b=0.25[x$.a,x$$]; + tmp_path:=z$.a..z$.b left_to_down z$; + hbbowl(z$.b,z$,z$,x$$-x$) tmp_path; + if not variant_f: + bot y$.c=bot y$$=0; x$.c=x$; tmpp_path:=z$$..z.bowl.bot; + else: bot y$$.a=bot y$$.b=-d; y$$=0; + x$-x$$.a=hround 2u; x$$.b=0.25[x$$.a,x$]; + tmpp_path:=z$$.a..z$$.b right_to_up z$$..z.bowl.bot; + hbbowl(z$$.b,z$$,z$$,x$$-x$) tmpp_path; z$.c=z.bowl.bot; fi + draw tmp_path..z$.c; draw tmpp_path; + if not variant_f: pickup square.nib; + draw z$.c..z$$; labels($,$.a,$.b,$.c,$$,$$.a); + else: square_end$$.a(left); + labels($,$.a,$.b,$.c,$$,$$.a,$$.b); fi + if squared_end: square_end$.a(right); fi +enddef; + +% +% accents +% + +if unknown tmp_h: tmp_h:=x_height; fi + +def complete_grave(expr $,$$)= + if square_dots: + x0=(w+$-$$)/2+0.25u; x2l=hround $-0.5; + y0=y3r=vround 1/3[tmp_h,h]; y2l=y4r=h; + adjust_slanted_bar(2l,0,0',1l)(0.5(thick+thin),1); + a:=diag_width(thin,z0'-z0); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + x3-x0=x0-x1; x4-x0'=x0'-x2; + y1a-y1=thin; z1a=whatever[z1,z2]; + z1a-z1=z3a-z3=z2-z2a=z4-z4a; + penstroke z1e..z2e; penstroke z3e..z4e; + fill z1a--z3a--z3--z1--cycle; + fill z2--z4--z4a--z2a--cycle; + labels(1a,2a,3a,4a); penlabels(0,0',1,2,3,4); + else: + pickup circle.nib; + x2=$+dot_size/2+hround((w-$-$$)/8); + x1=w-$$-dot_size/4-hround((w-$-$$)/5); + y1=vround 1/5[tmp_h,h]+dot_size/4; + y2=h-dot_size/2; long_dot(1,2); + fi +enddef; + +def complete_acute(expr $,$$)= + if square_dots: + x0=(w+$-$$)/2-0.25u; x4r=w-hround $$+0.5; + y0=y1l=vround 1/3[tmp_h,h]; y2l=y4r=h; + adjust_slanted_bar(4r,0,0',3r)(0.5(thick+thin),-1); + a:=diag_width(thin,z0'-z0); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + x3-x0=x0-x1; x4-x0'=x0'-x2; + y1a-y1=thin; z1a=whatever[z1,z2]; + z1a-z1=z3a-z3=z2-z2a=z4-z4a; + penstroke z1e..z2e; penstroke z3e..z4e; + fill z1a--z3a--z3--z1--cycle; + fill z2--z4--z4a--z2a--cycle; + labels(1a,2a,3a,4a); penlabels(0,0',1,2,3,4); + else: + pickup circle.nib; + x2=w-$$-dot_size/2-hround((w-$-$$)/8); + x1=$+dot_size/4+hround((w-$-$$)/5); + y1=vround 1/5[tmp_h,h]+dot_size/4; + y2=h-dot_size/2; long_dot(1,2); + fi +enddef; + +def complete_circumflex(expr $,$$,$$$)= + if square_dots: + begingroup save d; d=-vround 1/3[tmp_h,h]; + complete_AV($$$,$,w-$$); + endgroup; + else: + pickup circle.nib; + if $$$>0: top y1=top y2=y1r=y2r=h; y1l=y2l=y1r-thin; + y3r=y4r=y4a=y6a=y6r=y7r=vround 1/5[tmp_h,h]; + y5=max(top y1r-dot_size,0.5[y1r,y3r]); + else: bot y1=bot y2=y1r=y2r=vround 1/5[tmp_h,h]; + y1l=y2l=y1r+thin; y3r=y4r=y4a=y6a=y6r=y7r=h; + y5=min(bot y1r+dot_size,0.5[y1r,y3r]); + fi + x2-x1=hthick; x7r=$; x3r=w-$$; x1-x7r=x3r-x2; + adjust_slanted_bar(7r,1,7,1a)(0.5thin,-$$$); + adjust_slanted_bar(3r,2,3,2a)(0.5thin,$$$); + z1r=whatever[z7r,z1a]; z2r=whatever[z3r,z2a]; + z6=z7; z3=z4; x5=0.5[x1,x2]; + x4-x4r=diag_width(0.5thin,z5-z4); x6r-x6=diag_width(0.5thin,z5-z6); + z5r-z4r=whatever*(z5-z4); z5r-z6r=whatever*(z5-z6); + z5l-(x4+(x4-x4r),y4)=whatever*(z5-z4); + z5l-(x6-(x6r-x6),y6)=whatever*(z5-z6); + z1r-z7r=whatever*(z1-z7); z2r-z3r=whatever*(z2-z3); + z1l-(x7+(x7-x7r),y7)=whatever*(z1-z7); + z2l-(x3-(x3r-x3),y3)=whatever*(z2-z3); + z1l-z7l=whatever*(z1-z7); z2l-z3l=whatever*(z2-z3); + z7l-z5l=whatever*(z7-z5); z3l-z5l=whatever*(z3-z5); + z6l=z7l; z4l=z3l; + penstroke z1e--z2e--z3e--z4e--z5e--z6e--z7e--cycle; + penlabels(1,2,3,4,5,6,7); labels(1a,2a); + fi +enddef; + +def complete_hat(expr $,$$)=complete_circumflex($,$$,1); enddef; + +def complete_hacheck(expr $,$$)=complete_circumflex($,$$,-1); enddef; + +def complete_tilde(expr $,$$)= + if square_dots: + x1r=$; x8r=w-$$; + x2r=0.25[x1r,x8r]; x2r-x1r=x8r-x7r; y8r=h; y8r-y7r=y2r-y1r; + y1r=y7r+o=min(vround 2/3[h,tmp_h],h-vround 1.2(thick+thin)); + adjust_slanted_bar(2r,7r,5r,4r)(thick+thin,-1); + numeric a,b; + a=diag_width(thin,z2r-z4r); b=diag_width(thin,z2r-z1r); + penpos4(a,0); penpos5(a,180); penpos1(b,180); penpos8(b,0); + z2l-z1l=whatever*(z2r-z1r); z2l-z4l=whatever*(z2r-z4r); + z7l-z5l=whatever*(z7r-z5r); z7l-z8l=whatever*(z7r-z8r); + forsuffixes @=r,l: + z3@-z4@=whatever*(z2r-z4r); z3@-z8=whatever*(z7r-z8r); + z6@-z5@=whatever*(z7r-z5r); z6@-z1=whatever*(z2r-z1r); + endfor + penstroke z1e--z2e--z3e; penstroke z6e--z7e--z8e; + penlabels(1,2,3,4,5,6,7,8); + else: pickup circle.nib; + bot y1=bot y6l+o=vround 1/3[tmp_h,h]; + lft x1=$; rt x7=w-$$; top y7=top y2r-o=h; + y6r-y6l=y2r-y2l=vround 0.5[thin,dot_size-thin]; + z4=0.5[z1,z7]; slope:=2(y7-y1)/(x1-x7); numeric a; + a=(sind angle((-1,-slope)slanted slant))[dot_size-thin,thick]; + ortho_penpos4(a,(-1,-slope)); + forsuffixes @=r,l: + hellipse_set(1,2@,3@,4@); hellipse_set(7,6@,5@,4@); + draw z1 up_to_right z2@...z3@---z5@ + ...z6@ right_to_up z7; + endfor + square_end1(down); square_end7(up); + penlabels(1,2,3,4,5,6,7); + fi +enddef; + +def complete_dot(expr $,$$)= + pickup circle.nib; center_bar(1,1'); + top y1'=h; bot y1=h-dot_size; dot(1,1'); +enddef; + +def complete_umlaut(expr $,$$)= + pickup circle.nib; x1'-x1=x2'-x2=hthick; + lft x1-$=w-$$-rt x2'=hround 0.5(w-$-$$-7u); + top y1'=top y2'=h; bot y1=bot y2=h-dot_size; + dot(1,1'); dot(2,2'); +enddef; + +def complete_long_umlaut(expr $,$$)= + if square_dots: + y0=vround 1/3[tmp_h,h]; y8r=h; + x0=0.5[$,w-$$]; x8r=w-$$; + adjust_slanted_bar(0,8r,6r,0') + (max(thick+thin+0.5u,2u),-1); + a:=diag_width(1,z0'-z0); + forsuffixes @#=1,2,3,4,5,6,7,8: penpos@#(a*thin,0); endfor + z2-z1=z4-z3=z6-z5=z8-z7=(a*thick,0); + z8r-z0'=z0'-z3l;z6r-z0=z0-z1l; y1a-y1=thin; + z1a-z1=z2a-z2=z3-z3a=z4-z4a=z5a-z5=z6a-z6 + =z7-z7a=z8-z8a=whatever*(z3-z1); + penstroke z1e..z3e; penstroke z2e..z4e; + penstroke z5e..z7e; penstroke z6e..z8e; + for i=1 upto 4: + fill z[2i-1]--z[2i]--z[2i]a---z[2i-1]a--cycle; + endfor + penlabels(0,0',1,2,3,4,5,6,7,8); labels(1a,2a,3a,4a,5a,6a,7a,8a); + else: + pickup circle.nib; + y1=y3=vround 1/5[tmp_h,h]+0.25dot_size; + y2=y4=h-0.5dot_size+o; + x1-x3=x2-x4=hround(max(dot_size+0.5u,3u)); + 0.5[x1,x3]=0.5[$,w-$$]; + x2=w-$$-max(0.5dot_size,u); + long_dot(1,2); long_dot(3,4); + fi +enddef; + +def complete_circ(expr $,$$)= + pickup circle.nib; + numeric a,b; b=vround(1/3[tmp_h,h]); + a=round max(hThick+thin,h+o-b); + top y2=b+a+eps; bot y4=b-eps; y1=y3=0.5[y4,y2]; + lft x3-$=w-$$-rt x1=hround 0.5(w-$-$$-a); + x2=x4=0.5[x1,x3]; + draw superellipse(z1,z2,z3,z4,superness); + labels(1,2,3,4,0); +enddef; + +def complete_breve(expr $,$$)= + pickup circle.nib; top y1=top y3=h; + lft x1-$=w-$$-rt x3=hround 0.5(w-$-$$-6u); + bot y2=vround 1/3[tmp_h,h]; x2=0.5[x1,x3]; + draw z1 down_to_right z2 right_to_up z3; + square_end1(up); square_end3(up); + labels(1,2,3); +enddef; + +def complete_cedilla(expr $,$$)= + pickup circle.nib; + x1=x2=x4=good.x $; x3-x1=hThick; x1-x5=hround 2u; + y1=$$; bot y4=bot y5=-desc_depth; top y2=-vround max(o,d/6); + y3=0.5[y4,y2]; draw z2 right_to_down z3 down_to_left z4..z5; + draw z1..z4; square_end5(left); + labels(1,2,3,4,5); +enddef; + +def complete_ogonek(expr $,$$)= + pickup circle.nib; + x1=x6=good.x $; x5-x1=x1-x2=hthick; x2=x3; + y1=$$; bot y4=bot y6=-desc_depth-oo; + y5=good.y 1/3[y4,y1]; y1-y2=y5-y6; + y3=(superness**2)[y4,y2]; + x4=(superness**2)[x6,x3]; + tmp_path:=z1{z2-z1}...z3 down_to_right z4{right}...z5{z5-z6}; + z7=tmp_path intersectionpoint ((x1,y3)..(x1,y4)); + draw tmp_path; draw z1..z7; square_end5(z5-z6); + labels(1,2,3,4,5,6,7); +enddef; + +% `iff' construction + +let semi_ =;; let colon_ = :; let endchar_ = endchar; +def iff expr b = if b:let next_=use_it else:let next_=lose_it fi; next_ enddef; +def use_it = let : = restore_colon; enddef; +def restore_colon = let : = colon_; enddef; +def lose_it = let endchar=fi; +let ;=fix_ semi_ if false enddef; +def fix_=let ;=semi_; let endchar=endchar_; +enddef; +def always_iff = let : = endgroup; killboolean enddef; +def killboolean text t = use_it enddef; + +% proofing + +def horizontal_rules_list= + -body_depth,-desc_depth,x_height,cap_height,asc_height,body_height +enddef; + +def makebox(text rule) = + for y=-d.o_,0,h.o_: + rule((-xoffset,y),(w-xoffset,y)); endfor + for y=horizontal_rules_list: + rule((apprl-xoffset,y),(w-apprr-xoffset,y)); endfor + for x=0,apprl,w-apprr,w: + rule((x-xoffset,-d.o_),(x-xoffset,h.o_)); endfor + for x=apprl+u step u until w-apprr-1.5: + rule((x-xoffset,-d.o_),(x-xoffset,h.o_)); endfor + if charic<>0: + rule((w-xoffset+charic*hppp,h.o_), + (w-xoffset+charic*hppp,.5h.o_)); fi +enddef; + +def accents_proofing= + for $=0 upto 19: + makelabel("",(0.5[apprl,w-apprr],0.5x_height) + +(4u*cosd($*360/20),0.5x_height*sind($*360/20))); + endfor +enddef; + +def diacritics_proofing= + if proofing>0:extra_endchar:=extra_endchar&"accents_proofing;"; fi +enddef; + +def standard_proofing= + if proofing>0:extra_endchar:=normal_extra_endchar; fi +enddef; diff --git a/fonts/mbboard/source/mbbcr10.mf b/fonts/mbboard/source/mbbcr10.mf new file mode 100644 index 0000000000..e020d610cc --- /dev/null +++ b/fonts/mbboard/source/mbbcr10.mf @@ -0,0 +1,20 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbcr10.mf (parameters' file for 10 points Cork roman fonts) +% last modification: 01.01.2000. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbbcr"; font_size 10pt#; + +slant:=0; +square_dots:=true; +straight_bowl:=true; +math_fitting:=false; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbcrkdr; diff --git a/fonts/mbboard/source/mbbcrkdr.mf b/fonts/mbboard/source/mbbcrkdr.mf new file mode 100644 index 0000000000..8e9cfb2043 --- /dev/null +++ b/fonts/mbboard/source/mbbcrkdr.mf @@ -0,0 +1,167 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbcrkdr.mf (Cork driver file) +% last modification: 25.10.2001. + +mode_setup;font_setup; +font_coding_scheme:="TeX text";% Cork encoding + +numeric cap_accent_height#,accent_height#, +cap_accent_height_bis#,accent_height_bis#, +cork_code[],cork_wd[],cork_ht[],cork_dp[],cork_ic[],cork_h[]; +picture cork_picture[]; + +cap_accent_height#=min(1.25body_height#-cap_height#,x_height#); +accent_height#=min(asc_height#-x_height#,x_height#); +cap_accent_height_bis#=min(cap_height#, + 10/7x_height#+0.5dot_size#)-x_height#; +accent_height_bis#=min(asc_height#, + 10/7x_height#+0.5dot_size#)-x_height#; +accent_height_ter#=min(asc_height#, + 10/7x_height# if not low_umlaut: +0.5dot_size# fi)-x_height#; + +numeric slash_width; +slash_width=hround(3.8u+hthick+thin); + +def cork_extra_endchar= + if known cork_code[charcode]: cork_wd[charcode]:=charwd; + cork_ht[charcode]:=charht; cork_dp[charcode]:=chardp; + cork_ic[charcode]:=charic; cork_h[charcode]:=h; + cork_picture[charcode]:=currentpicture; + fi +enddef; + +def correct_width_by(expr $,$$)=charwd:=charwd+$+$$; + w:=hround(charwd*hppp); interim xoffset:=hround($*hppp); + currentpicture:=currentpicture shifted (xoffset,0); +enddef; + +def begincorkchar(expr letter,accent,code,extra_height,extra_depth)= + numeric a,rshift,lshift; a=byte letter; + beginchar(code,cork_wd[a],cork_ht[a]+extra_height, + cork_dp[a]+extra_depth); + "The letter "& if string letter: letter else: "i" fi &" with "& accent; + currentpicture:=cork_picture[a]; + tmp_h:=cork_h[a]; + rshift-apprr=lshift-apprl + =hround 0.5(w-apprr-apprl-min(max(w-apprl-apprr,7u),9u)); + enddef; + def endcorkchar=endchar +enddef; + +bbes_zet:=hex"FF"; +bbslash_o:=hex"F8"; bbslash_O:=hex"D8"; +bbae:=hex"E6"; bbAE:=hex"C6"; +bboe:=hex"F7"; bbOE:=hex"D7"; +bbdotless_i:=hex"19"; bbdotless_j:=hex"1A"; +bbcross_d:=hex"F0"; +bbEng:=hex"8D"; bbeng:=hex"AD"; +bbThorn:=hex"DE"; bbthorn:=hex"FE"; + +cork_code[byte "A"]=1; cork_code[byte "a"]=1; +cork_code[byte "C"]=1; cork_code[byte "c"]=1; +cork_code[byte "D"]=1; cork_code[byte "d"]=1; +cork_code[byte "E"]=1; cork_code[byte "e"]=1; +cork_code[byte "G"]=1; cork_code[byte "g"]=1; +cork_code[byte "I"]=1; cork_code[byte "i"]=1; +cork_code[byte "J"]=1; cork_code[byte "j"]=1; +cork_code[byte "L"]=1; cork_code[byte "l"]=1; +cork_code[byte "N"]=1; cork_code[byte "n"]=1; +cork_code[byte "O"]=1; cork_code[byte "o"]=1; +cork_code[byte "R"]=1; cork_code[byte "r"]=1; +cork_code[byte "S"]=1; cork_code[byte "s"]=1; +cork_code[byte "T"]=1; cork_code[byte "t"]=1; +cork_code[byte "U"]=1; cork_code[byte "u"]=1; +cork_code[byte "Y"]=1; cork_code[byte "y"]=1; +cork_code[byte "Z"]=1; cork_code[byte "z"]=1; +cork_code[byte bbdotless_i]=1; + +% roman encoding +bblig_ff:=hex"1B"; bblig_fi:=hex"1C"; bblig_fl:=hex"1D"; bblig_ffi:=hex"1E"; +bblig_ffl=hex"1F"; +ligtable "f": "f"=:bblig_ff, "i"=:bblig_fi, "l"=:bblig_fl, "f"=:bblig_ff; +ligtable bblig_ff: "i"=:bblig_ffi, "l"=:bblig_ffl; +% bblig_ct=hex"09"; +% bblig_st=hex"0A"; +% ligtable "c": "t"=:bblig_ct; +% ligtable "s": "t"=:bblig_st; + +bbgrave:=hex"00"; bbacute:=hex"01"; bbcircumflex:=hex"02"; +bbtilde:=hex"03"; bbumlaut:=hex"04"; bblong_umlaut:=hex"05"; +bbcirc_accent:=hex"06"; bbhacheck:=hex"07";bbbreve:=hex"08"; +bbmacron:=hex"09"; bbdotaccent:=hex"0A"; bbcedilla:=hex"0B"; +bbogonek:=hex"0C";bbwide_circumflex:=hex"5E"; bbwide_tilde:=hex"7E"; + +bbnormal_space:=hex"20"; bbunderscore:=hex"5F"; +bbasterisk:=hex"2A"; bbcomma:=hex"2C"; bbperiod:=hex"2E"; +bbcolon:=hex"3A"; bbsemicolon:=hex"3B"; +bbquestion_mark:=hex"3F"; bbexclamation_point:=hex"21"; +bbspanish_shriek:=hex"BD"; bbspanish_query:=hex"BE"; +bbslash:=hex"2F"; bbback_slash:=hex"5C"; +vertical:=hex"7C"; +parenthesis_left:=hex"28"; parenthesis_right:=hex"29"; +bracket_left:=hex"5B"; bracket_right:=hex"5D"; +brace_left:=hex"7B"; brace_right:=hex"7D"; +bbapostrophe:=hex"27"; bbreverse_apostrophe:=hex"60"; +bbopening_quotes:=hex"10"; bbclosing_quotes:=hex"11"; +bbgerman_opening_comma:=hex"0D"; +bbgerman_opening_quotes:=hex"12"; +bbstraight_quotes:=hex"22"; % ASCII location +bbfso_quotes:=hex"0E"; bbfsc_quotes:=hex"0F"; +bbfdo_quotes:=hex"13"; bbfdc_quotes:=hex"14"; +bbdash:=hex"2D"; bben_dash:=hex"15"; bbem_dash:=hex"16"; +bbcompound_word_mark:=hex"17"; bbhyphenchar:=hex"7F"; +ligtable bbdash: bbdash=:bben_dash; +ligtable bben_dash: bbdash=:bbem_dash; +ligtable bbreverse_apostrophe: bbreverse_apostrophe=:bbopening_quotes; +ligtable bbapostrophe: bbapostrophe=:bbclosing_quotes; +ligtable bbcomma: bbcomma=:bbgerman_opening_quotes; +% Next characters are no more treated as ligatures. +%ligtable bbexclamation_point: bbreverse_apostrophe=:bbspanish_shriek; +%ligtable bbquestion_mark: bbreverse_apostrophe=:bbspanish_query; +% Strange, there's nothing to do with french single quotes. +ligtable "<": "<"=:bbfdo_quotes; +ligtable ">": ">"=:bbfdc_quotes; + +% symbols encoding +equal_sign:=hex"3D"; plus_sign:=hex"2B";% minus_sign:=hex""; +inferior_sign:=hex"3C"; superior_sign:=hex"3E"; +hash_sign:=hex"23";% bbhash_mark:=hex"23"; +bbdollar:=hex"24"; bbpercent:=hex"25"; +bbsmall_zero:=hex"18"; +bbeuro:=hex"9F";% I don't want to code any chapter mark. +ligtable bbpercent:bbsmall_zero kern(-1.5u#-2letter_fit#); +ligtable bbsmall_zero:bbsmall_zero kern(-1.5u#-2letter_fit#); +bbampersand:=hex"26"; bbat_sign:=hex"40"; bbpound:=hex"BF"; + +% let the show begin : +input mbbaccnt; +extra_endchar:="cork_extra_endchar"; +input mbbromup; +extra_endchar:=""; +input mbbcrkup; +extra_endchar:="cork_extra_endchar"; +input mbbromlo; +extra_endchar:=""; +input mbbcrklo; +input mbbromxu; +input mbbromxl; +input mbbromlg; +input mbbdigit; +input mbbpunct; +input mbbsymbl; + +% parameters for TFM files. + +font_slant=slant; +font_x_height=x_height#; +font_normal_stretch=3u#; +font_normal_shrink=2u#; +font_quad=18u#+4letter_fit#; +font_extra_space=2u#; +font_normal_space=6u#+2letter_fit#; + +% +% Needs ligtables... +% + +bye. diff --git a/fonts/mbboard/source/mbbcrklo.mf b/fonts/mbboard/source/mbbcrklo.mf new file mode 100644 index 0000000000..94b5b7691b --- /dev/null +++ b/fonts/mbboard/source/mbbcrklo.mf @@ -0,0 +1,312 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbcrklo.mf (Cork roman lowercase) +% last modification: 25.10.2001. + +% some new instructions (eg. begincorkchar) +% and new measures (eg. accent_height#) +% are defined in the driver file `bbcrkdrv.mf'. + +use_rule1; + +begincorkchar("a","grave",hex"E0",accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar("a","acute",hex"E1",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("a","circumflex",hex"E2",accent_height#,0); +italcorr cork_ic[a]; +complete_hat(lshift,rshift); +endcorkchar; + +begincorkchar("a","tilde",hex"E3",accent_height#,0); +italcorr cork_ic[a]; +complete_tilde(lshift,rshift); +endcorkchar; + +begincorkchar("a","umlaut",hex"E4",accent_height_ter#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("a","circ",hex"E5",accent_height#,0); +italcorr cork_ic[a]; +complete_circ(lshift,rshift); +endcorkchar; + +begincorkchar("a","breve",hex"A0",accent_height#,0); +italcorr cork_ic[a]; +complete_breve(lshift,rshift); +endcorkchar; + +begincorkchar("a","ogonek",hex"A1",0,desc_depth#); +italcorr cork_ic[a]; +pickup circle.nib; rt x0=w-apprr; +complete_ogonek(x0,0); +endcorkchar; + +begincorkchar("c","acute",hex"A2",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("c","hacheck",hex"A3",accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("c","cedilla",hex"E7",0,desc_depth#); +italcorr cork_ic[a]; +pickup circle.nib; lft x0l=apprl; rt x0r=w-apprr; +complete_cedilla(0.527[x0l,x0r],-oo); +endcorkchar; + +begincorkchar("d","bar",hex"9E",0,0); +italcorr cork_ic[a]; +pickup circle.nib; +y1=y2=y3=y4=good.y 0.5[x_height,h]; +rt x1=w-apprr+hround u; x2=w-apprr; x3=x2-hthick-thin; +rt x1-lft x4=slash_width; pickup square.nib; +draw z1..z2; draw z3..z4; labels(1,2,3,4); +endcorkchar; + +begincorkchar("d","hacheck",hex"A4",0,0); +italcorr cork_ic[a]; +correct_width_by(0,7.5u#-hthick#-thin#); +pickup circle.nib; +top y1=x_height; top y4=h; rt x3=w-apprr; x3-x5=hthick; +lft x1=hround min(apprl+9u,x5-thin); complete_comma; +endcorkchar; + +begincorkchar("e","grave",hex"E8",accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar("e","acute",hex"E9",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("e","circumflex",hex"EA",accent_height#,0); +italcorr cork_ic[a]; +complete_hat(lshift,rshift); +endcorkchar; + +begincorkchar("e","umlaut",hex"EB",accent_height_ter#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("e","hacheck",hex"A5",accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("e","ogonek",hex"A6",0,desc_depth#); +italcorr cork_ic[a]; +complete_ogonek(0.5[apprl,w-apprr],-oo); +endcorkchar; + +begincorkchar(bbdotless_i,"grave",hex"EC",accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar(bbdotless_i,"acute",hex"ED",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar(bbdotless_i,"circumflex",hex"EE",accent_height#,0); +italcorr cork_ic[a]; +complete_hat(lshift,rshift); +endcorkchar; + +begincorkchar(bbdotless_i,"umlaut",hex"EF",accent_height_ter#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("i","j",hex"BC",0,desc_depth#); +italcorr cork_ic[a+1]; +currentpicture:=currentpicture+cork_picture[a+1] shifted (w,0); +correct_width_by(0,cork_wd[a+1]); +endcorkchar; + +begincorkchar("g","breve",hex"A7",accent_height#,0); +italcorr cork_ic[a]; +complete_breve(lshift,rshift); +endcorkchar; + +begincorkchar("l","acute",hex"A8",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("l","hacheck",hex"A9",0,0); +italcorr cork_ic[a]; +correct_width_by(0,7.5u#+2appr#-charwd); +pickup circle.nib; top y1=x_height; top y4=h; +rt x3=w-apprr; x3-x5=hthick; +lft x1=hround min(apprl+hthick+thin+u,x5-thin); +complete_comma; +endcorkchar; + +begincorkchar("l","cross",hex"AA",0,0); +italcorr cork_ic[a]; +correct_width_by(0.5u#,0.5u#); +x2l=vround(0.5[apprl,w-apprr]-0.5(hthick+thin))+0.5thin; +x3l-x2l=hthick; x0-x3l=0.5thin; x2l-x1l=x4l-x3l=hround 1.25u+0.5thin; +y0=x_height; y4l-y0=vround 1.25u; +a:=thin/cosd angle((z4l-z0)slanted slant); +forsuffixes $=1,2,3: z$l=whatever[z0,z4l]; endfor +penpos1(a,-90); penpos2(a,-90); penpos3(a,-90); penpos4(a,-90); +penstroke z1e..z2e; penstroke z3e..z4e; +labels(0); penlabels(1,2,3,4); +endcorkchar; + +begincorkchar("n","acute",hex"AB",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("n","hacheck",hex"AC",accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("n","tilde",hex"F1",accent_height#,0); +italcorr cork_ic[a]; +complete_tilde(lshift,rshift); +endcorkchar; + +begincorkchar("o","grave",hex"F2",accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar("o","acute",hex"F3",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("o","circumflex",hex"F4",accent_height#,0); +italcorr cork_ic[a]; +complete_hat(lshift,rshift); +endcorkchar; + +begincorkchar("o","tilde",hex"F5",accent_height#,0); +italcorr cork_ic[a]; +complete_tilde(lshift,rshift); +endcorkchar; + +begincorkchar("o","umlaut",hex"F6",accent_height_ter#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("o","long umlaut",hex"AE",accent_height#,0); +italcorr cork_ic[a]; +complete_long_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("r","acute",hex"AF",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("r","hacheck",hex"B0",accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("s","acute",hex"B1",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("s","hacheck",hex"B2",accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("s","cedilla",hex"B3",0,desc_depth#); +italcorr cork_ic[a]; +complete_cedilla(0.5[apprl,w-apprr],-oo); +endcorkchar; + +begincorkchar("t","hacheck",hex"B4", + asc_height#-cork_ht[byte "t"],0); +italcorr cork_ic[a]; +correct_width_by(0,1.5u#); +pickup circle.nib; +bot y1=x_height+max(thin,vround 0.1x_height); +top y4=h; rt x3=w-apprr; x3-x5=hthick; +lft x1=hround min(apprl+hthick+thin+u,x5-thin); +complete_comma; +endcorkchar; + +begincorkchar("t","cedilla",hex"B5",0,desc_depth#); +italcorr cork_ic[a]; +complete_cedilla(0.5[apprl,w-apprr],-oo); +endcorkchar; + +begincorkchar("u","grave",hex"F9",accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar("u","acute",hex"FA",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("u","circumflex",hex"FB",accent_height#,0); +italcorr cork_ic[a]; +complete_hat(lshift,rshift); +endcorkchar; + +begincorkchar("u","umlaut",hex"FC",accent_height_ter#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("u","long umlaut",hex"B6",accent_height#,0); +italcorr cork_ic[a]; +complete_long_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("u","circ",hex"B7",accent_height#,0); +italcorr cork_ic[a]; +complete_circ(lshift,rshift); +endcorkchar; + +begincorkchar("y","acute",hex"FD",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("y","umlaut",hex"B8",accent_height_ter#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("z","acute",hex"B9",accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("z","hacheck",hex"BA",accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("z","dot",hex"BB",accent_height_bis#,0); +italcorr cork_ic[a]; +complete_dot(lshift,rshift); +endcorkchar; diff --git a/fonts/mbboard/source/mbbcrkup.mf b/fonts/mbboard/source/mbbcrkup.mf new file mode 100644 index 0000000000..db86a0a01d --- /dev/null +++ b/fonts/mbboard/source/mbbcrkup.mf @@ -0,0 +1,322 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbcrkup.mf (Cork roman uppercase) +% last modification: 25.10.2001. + +% some new instructions (eg. begincorkchar) +% and new measures (eg. cap_accent_height#) +% are defined in the driver file `bbcrkdrv.mf'. + +use_rule2; + +begincorkchar("A","grave",hex"C0",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar("A","acute",hex"C1",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("A","circumflex",hex"C2",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hat(lshift,rshift); +endcorkchar; + +begincorkchar("A","tilde",hex"C3",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_tilde(lshift,rshift); +endcorkchar; + +begincorkchar("A","umlaut",hex"C4",cap_accent_height_bis#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("A","circ",hex"C5",0.7cap_accent_height#,0); +italcorr cork_ic[a]; +pickup circle.nib; +bot y4=tmp_h-eps; top y2=h+o; y0=y1=y3=0.5[y4,y2]; +x0=x2=x4=0.5[apprl,w-apprr]; x1-x0=x0-x3; +lft x3=hround(x0-0.5max(hThick+thin,3u+thin))-eps; +draw superellipse(z1,z2,z3,z4,superness); +labels(1,2,3,4,0); +endcorkchar; + +begincorkchar("A","breve",hex"80",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_breve(lshift,rshift); +endcorkchar; + +begincorkchar("A","ogonek",hex"81",0,desc_depth#); +italcorr cork_ic[a]; +complete_ogonek(w-apprr-0.5thin,0); +endcorkchar; + +begincorkchar("C","acute",hex"82",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("C","hacheck",hex"83",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("C","cedilla",hex"C7",0,desc_depth#); +italcorr cork_ic[a]; +pickup circle.nib; lft x0l=apprl; rt x0r=w-apprr; +complete_cedilla(0.527[x0l,x0r],-o); +endcorkchar; + +begincorkchar("D","hacheck",hex"84",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("D","bar",hex"D0",0,0); +italcorr cork_ic[a]; +pickup circle.nib; +lft x1=Apprl-hround 1.25u; x2=Apprl; x3=Apprl+hthick+thin; +rt x4-lft x1=slash_width; y1=y2=y3=y4=good.y 0.5h; +pickup square.nib; draw z1..z2; draw z3..z4; labels(1,2,3,4); +endcorkchar; + +begincorkchar("E","grave",hex"C8",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar("E","acute",hex"C9",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("E","circumflex",hex"CA",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hat(Apprl,Apprr); +endcorkchar; + +begincorkchar("E","umlaut",hex"CB",cap_accent_height_bis#,0); +italcorr cork_ic[a]; +complete_umlaut(Apprl,Apprr); +endcorkchar; + +begincorkchar("E","hacheck",hex"85",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(Apprl,Apprr); +endcorkchar; + +begincorkchar("E","ogonek",hex"86",0,desc_depth#); +italcorr cork_ic[a]; +pickup circle.nib; rt x0=w-apprr; +complete_ogonek(x0,0); +endcorkchar; + +begincorkchar("I","grave",hex"CC",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar("I","acute",hex"CD",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("I","circumflex",hex"CE",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hat(lshift,rshift); +endcorkchar; + +begincorkchar("I","umlaut",hex"CF",cap_accent_height_bis#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("I","dot",hex"9D",cap_accent_height_bis#,0); +italcorr cork_ic[a]; +complete_dot(lshift,rshift); +endcorkchar; + +begincorkchar("I","J",hex"9C",0,0); +italcorr cork_ic[a+1]; +currentpicture:=currentpicture+cork_picture[a+1] shifted(w,0); +correct_width_by(0,cork_wd[a+1]); +endcorkchar; + +begincorkchar("G","breve",hex"87",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_breve(w-13u,0); +endcorkchar; + +begincorkchar("L","acute",hex"88",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("L","hacheck",hex"89",0,0); +italcorr cork_ic[a]; +correct_width_by(0,0.5u#); +pickup circle.nib; top y1=x_height; top y4=h; +rt x3=w-apprr; x3-x5=hthick; +lft x1=hround min(Apprl+hthick+thin+u,x5-thin); +complete_comma; +endcorkchar; + +begincorkchar("L","cross",hex"8A",0,0); +italcorr cork_ic[a]; +y0=x_height-eps; x1l=Apprl-hround 1.25u; +x0-hthick-0.5thin=x2l=x3l-hthick=Apprl+0.5thin; +x4l-x1l=y4l-y1l=slash_width; z0=whatever[z1l,z4l]; +y4l-y4r=thin/((1++slant)*sind angle((z4l-z1l)slanted slant)); +x4l=x4r; z2l=whatever[z1l,z4l]; z3l=whatever[z1l,z4l]; +z1l-z1r=z2l-z2r=z3l-z3r=z4l-z4r; +penstroke z1e..z2e; penstroke z3e..z4e; +labels(0); penlabels(1,2,3,4); +endcorkchar; + +begincorkchar("N","acute",hex"8B",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("N","hacheck",hex"8C",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("N","tilde",hex"D1",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_tilde(lshift,rshift); +endcorkchar; + +begincorkchar("O","grave",hex"D2",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar("O","acute",hex"D3",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("O","circumflex",hex"D4",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hat(lshift,rshift); +endcorkchar; + +begincorkchar("O","tilde",hex"D5",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_tilde(lshift,rshift); +endcorkchar; + +begincorkchar("O","umlaut",hex"D6",cap_accent_height_bis#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("O","long umlaut",hex"8E",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_long_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("R","acute",hex"8F",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("R","hacheck",hex"90",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("S","acute",hex"91",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("S","hacheck",hex"92",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("S","cedilla",hex"93",0,desc_depth#); +italcorr cork_ic[a]; +complete_cedilla(0.5[apprl,w-apprr],-o); +endcorkchar; + +begincorkchar("S","S (es-zet)",hex"DF",0,0); +italcorr cork_ic[a]; +currentpicture:=currentpicture+cork_picture[a] shifted(w,0); +correct_width_by(0,charwd); +endcorkchar; + +begincorkchar("T","hacheck",hex"94",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("T","cedilla",hex"95",0,desc_depth#); +italcorr cork_ic[a]; +complete_cedilla(0.5[apprl,w-apprr],0); +endcorkchar; + +begincorkchar("U","grave",hex"D9",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_grave(lshift,rshift); +endcorkchar; + +begincorkchar("U","acute",hex"DA",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("U","circumflex",hex"DB",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hat(lshift,rshift); +endcorkchar; + +begincorkchar("U","umlaut",hex"DC",cap_accent_height_bis#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("U","long umlaut",hex"96",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_long_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("U","circ",hex"97",0.7cap_accent_height#,0); +italcorr cork_ic[a]; +pickup circle.nib; +bot y4=tmp_h-eps; top y2=h+o; y0=y1=y3=0.5[y4,y2]; +x0=x2=x4=0.5[apprl,w-apprr]; x1-x0=x0-x3; +lft x3=hround(x0-0.5max(hThick+thin,3u+thin))-eps; +draw superellipse(z1,z2,z3,z4,superness); +labels(1,2,3,4,0); +endcorkchar; + +begincorkchar("Y","acute",hex"DD",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("Y","umlaut",hex"98",cap_accent_height_bis#,0); +italcorr cork_ic[a]; +complete_umlaut(lshift,rshift); +endcorkchar; + +begincorkchar("Z","acute",hex"99",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_acute(lshift,rshift); +endcorkchar; + +begincorkchar("Z","hacheck",hex"9A",cap_accent_height#,0); +italcorr cork_ic[a]; +complete_hacheck(lshift,rshift); +endcorkchar; + +begincorkchar("Z","dot",hex"9B",cap_accent_height_bis#,0); +italcorr cork_ic[a]; +complete_dot(lshift,rshift); +endcorkchar;
\ No newline at end of file diff --git a/fonts/mbboard/source/mbbdigit.mf b/fonts/mbboard/source/mbbdigit.mf new file mode 100644 index 0000000000..a471148eeb --- /dev/null +++ b/fonts/mbboard/source/mbbdigit.mf @@ -0,0 +1,229 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbdigit.mf (Arabic numerals) +% last modification: 25.10.2001. + +def horizontal_rules_list=0.25h,0.5h,0.7h, + -body_depth,-desc_depth,x_height,cap_height,asc_height,body_height +enddef; + +use_rule1; + +if not(known old_digits): old_digits=false; fi + +beginchar("0",8u#+2appr#, + if old_digits: x_height# else: fig_height# fi,0); + "The numeral 0"; + italcorr if old_digits: x_height# + else: fig_height# fi *slant-.5u#; + pickup circle.nib; + bbcircle1(apprl-ho,w-apprr+ho,h+o,-o); draw last_path; + bbbowl(z1b,z1a,z1d,hThick) last_path; + bbbowl(z1b,z1c,z1d,hThick) last_path; +endchar; + +beginchar("1",8u#+2appr#, + if old_digits: x_height# else: fig_height# fi,0); + "The numeral 1"; + italcorr if old_digits: x_height# + else: fig_height# fi *slant-.5u#; + pickup circle.nib; + y3r=top y4=top y5=h+o; + bot y6=bot y7=0; y1r=vround(0.68h+0.5thin); + rt x5=rt x6=hround(0.5[apprl,w-apprr]+0.5(u+hthick+thin)); + x6-x7=hthick; x3r=lft x4=0.25[lft x7,rt x6]; + x1r=hround max(lft x7-2.3u,apprl+0.5u); + z2r=0.5[z1r,z3r]+0.08(z3r-z1r)rotated -90; + tmpp_path:=z1r...z2r{z3r-z1r}...z3r; + ortho_penpos1(thin,-direction 0 of tmpp_path); + ortho_penpos2(thin,z1r-z3r); + ortho_penpos3(thin,-direction 2 of tmpp_path); + tmp_path:=z1...z2{z3-z1}...z3; + z8=tmp_path intersectionpoint (z7..(x7,y3r)); + penstroke z1e...z2e{z3e-z1e}...z3e; draw z7..z8; + pickup square.nib; draw z4--z5--z6--z7; + penlabels(1,2,3); labels(4,5,6,7,8); +endchar; + +beginchar("2",8u#+2appr#, + if old_digits: x_height# else: fig_height# fi,0); + "The numeral 2"; + italcorr if old_digits: x_height# + else: fig_height# fi *slant-.5u#; + pickup circle.nib; + x1l=rt x7=w-apprr+ho; x2l=lft x13=apprl; x9=x12=0.5[x13,x7]; + y1l=y2l=0; bot y7=bot y13=vround 0.7h; top y12=h+o; + penpos1(thin,90); penpos2(thin,90); z3l=z2r; + adjust_slanted_bar(3l,7,4,6l)((thick+thin)/2,-1); + z5r-z4=z8r-z7=z4-z3l; + a:=diag_width(thin,z7-z4); + penpos3(a,0); penpos5(a,0); penpos6(a,0); penpos8(a,0); + numeric a,x,y; + (x,y)=(z7-z4)slanted slant; a=angle((y,-x)slanted -slant); + z9=whatever[z3,z6]; + z9l=whatever[z3l,z6l]; z9l=z9+whatever*dir(a); + z9r=whatever[z3r,z6r]; z9r=z9+whatever*dir(a); + z10=whatever[z5,z8]; z10=z9+whatever*dir(a); + z10r=whatever[z5r,z8r]; z10r=z9+whatever*dir(a); + z10l=whatever[z5l,z8l]; z10l=z9+whatever*dir(a); + x7l=x7; z7l=whatever[z5,z8]; z11-z7=z9-z10; + x11l=x11; z11l=whatever[z3,z6]; + penstroke z1e..z2e; penstroke z3e..z9e; penstroke z5e..z10e; + draw z9..controls 2/3[z9,z11l] and 2/3[z11,z11l]..z11 up_to_left z12; + draw z10..controls 2/3[z10,z7l] and 2/3[z7,z7l]..z7 + up_to_left z12 left_to_down z13; + square_end13(down); penlabels(range 1 thru 13); +endchar; + +beginchar("3",8u#+2appr#, + if old_digits: x_height#,desc_depth# else: fig_height#,0 fi); + "The numeral 3"; + italcorr if old_digits: x_height# + else: fig_height# fi *slant-.5u#; + pickup circle.nib; top y2=h+o; bot y7=-d-o; + bot y4=bot y5=vround 0.5(h-d); y3=0.5[y2,y4]; + bot y1=vround y3; y6=0.5[y4,y7]; top y8=0.2[-d,h]; + lft x1-hround 0.2u=lft x8=apprl; rt x3=rt x6-ho=w-apprr; + x4=0.5[x8,x3]; x6-x9=hThick; x11=min(x9,x3-thin); + lft x5=hround min(apprl+2.75u,x11-1.5thin); + tmpp_path:=z5..z4 right_to_up z3 & elliptic_arc(3,2,1); + tmp_path:=z5..z4 left_to_down z6& elliptic_arc(6,7,8); + bbbowl(z4,z6,z7,hThick) tmp_path; + bbbowl(z2,z3,z4,max(0,x3-x.bowl.mid)) tmpp_path; + draw tmp_path; draw tmpp_path; + square_end1(z1-z1'); + square_end5(left); + square_end8(z8-z8'); + penlabels(range 1 thru 8,8'); +endchar; + +beginchar("4",8u#+2appr#, + if old_digits: x_height#,desc_depth# else: fig_height#,0 fi); + "The numeral 4"; + italcorr if old_digits: x_height# + else: fig_height# fi *slant-.5u#; + pickup circle.nib; + rt x2=w-apprr-hround u; top y2=h+o; x3=x2=lft x7; + bot y7=if old_digits:0 else: vround 0.25h fi; + bot y3=-d; y4=y3; x4=x3-hthick; x5=rt x8=x4; y8=y7=y9=y6; + rt x6=w-apprr+hround 0.5u; lft x9=x10l=apprl-hround 0.5u; + x11l=0.25[lft x4,rt x3]; y10l=top y9; y11l=top y2; + a:=diag_width(thin,z11l-z10l); + penpos10(a,0); penpos11(a,0); z1r=z11; penpos2(thin,90); + z1l=whatever[z10,z11]; y1l=y2l; z5=whatever[z10,z11]; + draw z5..z4; penstroke z10e..z11e; penstroke z1e..z2e; + pickup square.nib; draw z2--z3--z4; draw z6--z7; draw z8--z9; + penlabels(range 1 thru 11); +endchar; + +beginchar("5",8u#+2appr#, + if old_digits: x_height#,desc_depth# else: fig_height#,0 fi); + "The numeral 5"; + italcorr if old_digits: x_height# + else: fig_height# fi *slant-.5u#; + penpos6(thin,-90); + pickup circle.nib; + top y1=top y2=top y10=h; + top y6=x_height-d; bot y8=-d-o; + top y9=0.2[-d,h]; y7=0.5[y8,y6]; + bot y3=bot y4=y5r=min(vround 0.5(h-d),bot y6); + lft x9=apprl; rt x1=w-apprr-hround 0.3u; + rt x7=w-apprr+ho; lft x2=lft x3=apprl+hround 0.3u; + x10-x2=hthick; + tmp_path:=elliptic_arc(7,8,9); + x4=0.5[x3,x10]; x6=max(0.4[x4,x7],x8); + x5r=x4+0.5thin*((1++slant)-slant); + z0=(z6r-z5r) xscaled 1/3; + ortho_penpos5(thin,z0); + tmp_path:=z3--z4--z5{z0}...z6 + right_to_down z7 & tmp_path; + z11=tmp_path intersectionpoint (z10..(x10,y3)); + bbbowl(z6,z7,z8,hThick) tmp_path; + draw subpath (3,infinity) of tmp_path; draw z10..z11; + penstroke z5e{z0}...z6e{right}; + pickup square.nib; draw z1--z2--z3--z4; + square_end9(z9-z9'); + labels(1,2,3,4,7,8,9,9',10,11); + penlabels(5,6); +endchar; + +beginchar("6",8u#+2appr#,fig_height#,0); + "The numeral 6"; + italcorr fig_height#*slant-.5u#; + numeric t; + pickup circle.nib; top y2=h+o; + bot y1=min(0.095[h,-d],bot y2-1); bot y4=-d-o; + top y6=x_height-d; y3=0.5[y2,y4]; y5=y7=0.5[y4,y6]; + rt x1=w-apprr-0.74u; lft x3=lft x7=apprl-ho; + rt x5=w-apprr+ho; x4=x6=0.5[x3,x5]; + tmp_path:=reverse elliptic_arc(3,2,1) + & z3 down_to_right z4 right_to_up z5 + up_to_left z6 left_to_down z7; + bbbowl(z2,z3,z4,hThick) tmp_path; + t=8+xpart(subpath (8,12) of tmp_path intersectiontimes bowl_path); + bbbowl(z6,z5,z4,hThick) tmp_path; + draw subpath (0,t) of tmp_path; + square_end1(z1-z1'); + labels(1,1',2,3,4,5,6,7); +endchar; + +beginchar("7",8u#+2appr#, + if old_digits: x_height#,desc_depth# else: fig_height#,0 fi); + "The numeral 7"; + italcorr if old_digits: x_height# + else: fig_height# fi *slant-.5u#; + y1r=y2r=h; x1r=apprl; x2r=w-apprr+hround 0.75u; + penpos1(thin,90); penpos2(thin,90); + z3r=z2l; y6l=y4r=-d; y5l=y3r; x3r-x4r=hround 4.25u; + numeric a; + a=diag_width(1,z3r-z4r); + x4r-x6l=x3r-x5l=(thick+thin)*a; + penpos3(thin*a,0); penpos4(thin*a,0); + penpos5(thin*a,0); penpos6(thin*a,0); + y4a-y4=thin; z4a=whatever[z3,z4]; z6a-z6=z4a-z4; + penstroke z1e..z2e; penstroke z3e..z4e; + penstroke z5e..z6e; fill z4a--z6a--z6--z4--cycle; + penlabels(range 1 thru 8); labels(4a,6a); +endchar; + +beginchar("8",8u#+2appr#,fig_height#,0); + "The numeral 8"; + italcorr fig_height#*slant-.5u#; + pickup circle.nib; + rt z1=(w-apprr,0.5[y4,y2]); top z2=(0.5[x1,x3],h+o); lft z3=(apprl,y1); + bot z4=(x2,vround 0.5(h-d)); + rt z5=(w-apprr+ho,0.5[y7,y4]); bot z7=(x2,-d-o); lft z6=(apprl-ho,y5); + tmpp_path:=superellipse(z1,z2,z3,z4,superness); + tmp_path:=superellipse(z5,z4,z6,z7,superness); + bbbowl(z4,z6,z7,hThick) tmp_path; + bbbowl(z2,z3,z4,max(0,x.bowl.mid-x3)) tmpp_path; + bbbowl(z4,z5,z7,hThick) tmp_path; + bbbowl(z2,z1,z4,max(0,x1-x.bowl.mid)) tmpp_path; + draw tmpp_path; draw tmp_path; + labels(1,2,3,4,5,6,7); +endchar; + +beginchar("9",8u#+2appr#, + if old_digits: x_height#,desc_depth# else: fig_height#,0 fi); + "The numeral 9"; + italcorr if old_digits: x_height# + else: fig_height# fi *slant-.5u#; + numeric t; + pickup circle.nib; bot y2=-d-o; + top y1=max(0.095[-d,h],top y2+1); top y4=h+o; + bot y6=h-x_height; y3=0.5[y2,y4]; y5=y7=0.5[y4,y6]; + lft x1=apprl+0.74u; rt x3=rt x7=w-apprr+ho; + lft x5=apprl-ho; x4=x6=0.5[x3,x5]; x3-x8=x10-x5=hThick; + tmp_path:=reverse elliptic_arc(3,2,1) + & z3 up_to_left z4 left_to_down z5 + down_to_right z6 right_to_up z7; + bbbowl(z4,z3,z2,hThick) tmp_path; + t=8+xpart(subpath (8,12) of tmp_path intersectiontimes bowl_path); + bbbowl(z4,z5,z6,hThick) tmp_path; + draw subpath (0,t) of tmp_path; + square_end1(z1-z1'); + labels(1,1',2,3,4,5,6,7); +endchar; + + + + diff --git a/fonts/mbboard/source/mbbdrivr.mf b/fonts/mbboard/source/mbbdrivr.mf new file mode 100644 index 0000000000..5ca2718102 --- /dev/null +++ b/fonts/mbboard/source/mbbdrivr.mf @@ -0,0 +1,307 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbdrivr.mf (driver file) +% last modification: 25.10.2001. + +font_coding_scheme "Unknown"; +mode_setup; font_setup; + +font_coding_scheme:="Unknown"; + +% skewchar:=hex"7F"; +% hypenchar:=hex"60"; + +% roman + +bblig_ct :=hex"09"; bblig_st :=hex"0A"; bblig_ff :=hex"0B"; +bblig_fi :=hex"0C"; bblig_fl :=hex"0D"; bblig_ffi :=hex"0E"; +bblig_ffl:=hex"0F"; bbdotless_i:=hex"10"; bbdotless_j:=hex"11"; + +% roman extension + +bbes_zet:=hex"19"; +bbae :=hex"1A"; bboe:=hex"1B"; bbslash_o:=hex"1C"; +bbAE :=hex"1D"; bbOE:=hex"1E"; bbslash_O:=hex"1F"; + +% bbcross_d:=hex"F8"; +% bbEng:=hex"F4"; bbeng:=hex"FC"; +% bbThorn:=hex"F5"; bbthorn:=hex"FD"; + +% accents + +bbgrave :=hex"12"; bbacute :=hex"13"; bbhacheck :=hex"14"; +bbbreve :=hex"15"; bbmacron :=hex"16"; bbcirc_accent:=hex"17"; +bbcedilla :=hex"18"; +bbcircumflex :=hex"5E"; bbdotaccent:=hex"5F"; +bblong_umlaut:=hex"7D"; bbtilde :=hex"7E"; bbumlaut :=hex"7F"; +% bbleft_slanted_cross:=hex"20";% polish +% bbogonek:=hex"22";% Polish + +% greek accents + +% bbstraight_accent:=hex"C8"; +% bbrough:=hex"C9"; bbsmooth:=hex"CA"; +% bbgreek_tilde:=hex"CB"; +% bbrough_tilde:=hex"CC"; bbsmooth_tilde:=hex"CD"; +% bbsubscript_iota:=hex"CE"; + +% punctuation + +bbnormal_space :=hex"20"; bbasterisk :=hex"2A"; +bbcomma :=hex"2C"; bbperiod :=hex"2E"; +bbcolon :=hex"3A"; bbsemicolon :=hex"3B"; +bbquestion_mark :=hex"3F"; bbexclamation_point :=hex"21"; +bbspanish_shriek:=hex"07"; bbspanish_query :=hex"08"; +bbslash :=hex"2F"; bbback_slash :=hex"5C"; + +parenthesis_left:=hex"28"; parenthesis_right :=hex"29"; +bracket_left :=hex"5B"; bracket_right :=hex"5D"; +brace_left :=hex"DB"; vertical :=hex"DC" ; brace_right:=hex"DD"; +angle_left :=hex"DE"; angle_right :=hex"DF"; + +bbfso_quotes :=hex"00"; bbfsc_quotes :=hex"01"; +bbfdo_quotes :=hex"02"; bbfdc_quotes :=hex"03"; + +bbapostrophe :=hex"27"; bbreverse_apostrophe:=hex"60"; +bbopening_quotes:=hex"04"; bbclosing_quotes :=hex"05"; +% bbgerman_opening_comma:=hex""; +bbgerman_opening_quotes:=hex"06"; +bbstraight_quotes:=hex"22"; % ASCII location +bbdash:=hex"2D"; bben_dash:=hex"7B"; bbem_dash:=hex"7C"; +% bbvariant_dash:=hex"";% centered dash. +% bbunderscore:=hex""; + +% blackboard symbols + +plus_sign :=hex"2B"; +equal_sign :=hex"3D"; +hash_sign :=hex"23"; +inferior_sign :=hex"3C"; +superior_sign :=hex"3E"; +% bbhash_mark :=hex"23"; +bbdollar :=hex"24"; +bbpercent :=hex"25"; +bbampersand :=hex"26"; +bbat_sign :=hex"40"; +bbpartial :=hex"A0"; +bbWeierstrass_p:=hex"80"; +% bbperthousand :=hex"E8"; +% bbpertenthousand:=hex"E9"; +bbeuro :=hex"FB"; +bbpound :=hex"FC"; +bbcent :=hex"FD"; +bbyen :=hex"FE"; +% bbshereq :=hex"FF"; +% bbestimated :=hex"EE"; +% bbbar_h :=hex"F7"; +% bbcross_h :=hex"FF"; + +ligtable inferior_sign: inferior_sign=:bbfdo_quotes; +ligtable superior_sign: superior_sign=:bbfdc_quotes; +ligtable bbdash: bbdash=:bben_dash; +ligtable bben_dash: bbdash=:bbem_dash; +ligtable bbreverse_apostrophe: bbreverse_apostrophe=:bbopening_quotes; +ligtable bbapostrophe: bbapostrophe=:bbclosing_quotes; +ligtable bbcomma: bbcomma=:bbgerman_opening_quotes; +ligtable bbexclamation_point: bbreverse_apostrophe=:bbspanish_shriek; +ligtable bbquestion_mark: bbreverse_apostrophe=:bbspanish_query; + +% greek uppercase + +bbAlpha:=hex"81"; bbBeta :=hex"82"; bbGamma :=hex"83"; +bbDelta:=hex"84"; bbEpsilon:=hex"85"; bbZeta :=hex"86"; +bbEta :=hex"87"; bbTheta :=hex"88"; bbIota :=hex"89"; +bbKappa:=hex"8A"; bbLambda :=hex"8B"; bbMu :=hex"8C"; +bbNu :=hex"8D"; bbXi :=hex"8E"; bbOmicron:=hex"8F"; +bbPi :=hex"90"; bbRho :=hex"91"; bbSigma :=hex"92"; +bbTau :=hex"93"; bbUpsilon:=hex"94"; bbPhi :=hex"95"; +bbChi :=hex"96"; bbPsi :=hex"97"; bbOmega :=hex"98"; +% varUpsilon:=hex""; + +% greek like symbols + +bbnabla :=hex"9A"; bbcoprod :=hex"9B"; bbmho:=hex"9C"; +bbslash_Sigma:=hex"9D"; bbslash_nabla:=hex"9E"; + +% ionian uppercase + +% bbDigamma:=hex"C0"; bbKoppa:=hex"C1"; bbSampi:=hex"C2"; + +% greek lowercase + +bbalpha:=hex"A1"; bbbeta :=hex"A2"; bbgamma :=hex"A3"; +bbdelta:=hex"A4"; bbepsilon:=hex"A5"; bbzeta :=hex"A6"; +bbeta :=hex"A7"; bbtheta :=hex"A8"; bbiota :=hex"A9"; +bbkappa:=hex"AA"; bblambda :=hex"AB"; bbmu :=hex"AC"; +bbnu :=hex"AD"; bbxi :=hex"AE"; bbomicron:=hex"AF"; +bbpi :=hex"B0"; bbrho :=hex"B1"; bbsigma :=hex"B2"; +bbtau :=hex"B3"; bbupsilon:=hex"B4"; bbphi :=hex"B5"; +bbchi :=hex"B6"; bbpsi :=hex"B7"; bbomega :=hex"B8"; +% variants +%bbvarbeta:=hex"9F"; +bbvarepsilon:=hex"B9"; bbvartheta:=hex"BA"; +bbvarkappa :=hex"BB"; bbvarpi :=hex"BC"; +bbvarrho :=hex"BD"; bbvarsigma:=hex"BE"; +bbvarphi :=hex"BF"; + +% greek like letters + +bbslash_lambda:=hex"9F"; + +% ionian lowercase + +% bbdigamma:=hex"C3"; bbkoppa:=hex"C4"; bbsampi:=hex"C5"; +bbvardigamma:=hex"99"; +% bbvarkoppa:=hex"C7"; + +% Activate to allow characters with undefined code. +% (for proof mode compilation) + +% let iff=always_iff; + +% let the show begin : + +input mbbromup; +input mbbromlo; +input mbbromlg; +input mbbromxu; +input mbbromxl; +input mbbaccnt; +input mbbdigit; +input mbbsymbl; +input mbbpunct; +input mbbgrkup; +input mbbgrklo; +% input mbbextra; + +%% ligtable's funny examples: +%% || is the left boundary character that precede every word. +%% Defining is ligtable allows to produce automatic replacements +%% such as for beta (or hebrew letters with final forms). +%% {\it boundarychar\/} is an internal variable which has to be +%% set to a value between 0 and 255. The corresponding character +%% plays the symmetric role of ||. +% boundarychar:=0; +% ligtable ||:bbvarbeta=:bbbeta; +% ligtable "u": boundarychar=:bbSigma; + +% parameters for TFM files. + +font_slant=slant; +font_x_height=x_height#; +font_normal_stretch=3u#; +font_normal_shrink=2u#; +font_quad=18u#+4letter_fit#; +font_extra_space=2u#; +font_normal_space=6u#+2letter_fit#; + +k#:=-.25u#; kk#:=-0.5u#; kkk#:=-0.75u#; kkkk#:=-u#;% 4 degrees of kerning + +ligtable "f" : "f" =: bblig_ff, "i" =: bblig_fi, +"l"=:bblig_fl, "f" =: bblig_ff, +bbapostrophe kern 1.25u#, bbquestion_mark kern 1.25u#, +bbexclamation_point kern 1.25u#, parenthesis_right kern 1.25u#, +bracket_right kern 1.25u#, brace_right kern 1.25u#, +skipto 1; + +ligtable bblig_ff : "i" =: bblig_ffi, "l" =: bblig_ffl, +bbapostrophe kern 1.25u#, bbquestion_mark kern 1.25u#, +bbexclamation_point kern 1.25u#, parenthesis_right kern 1.25u#, +bracket_right kern 1.25u#, brace_right kern 1.25u#, +skipto 1; + +%ligtable "c" : "t"=: bblig_ct; +%ligtable "s" : "t"=: bblig_st; + +ligtable "e" : "o" : "b" : "p" : bbae: bboe: bbslash_o: +bbdelta: bbomicron: bbphi: bbvarphi: bbrho: bbvarrho: bbomega: +"x" kern kkk#, "v" kern kk#, "w" kern k#, "z" kern kk#, +bbgamma kern kk#, bblambda kern kk#, bbtau kern kk#, +bbchi kern kkk#, bbvarkappa kern kkk#; + +ligtable 1:: "v" : "z" : bbgamma: bblambda: bbtau: +"a" kern kk#, "e" kern kk#, "o" kern kk#, "c" kern kk#, +"d" kern kk#, "g" kern kk#, "q" kern kk#, bbae kern kk#, +bboe kern kk#, bbslash_o kern kk#, +bbalpha kern kk#, bbepsilon kern kk#, bbdelta kern kk#, +bbphi kern kk#, bbvarphi kern kk#, bbomega kern kk#; + +ligtable "r" : "w" : +"a" kern k#, "e" kern k#, "o" kern k#, "c" kern k#, +"d" kern k#, "g" kern k#, "q" kern k#, bbae kern k#, +bboe kern k#, bbslash_o kern k#, +bbalpha kern k#, bbepsilon kern k#, bbdelta kern k#, +bbphi kern k#, bbvarphi kern k#, bbomega kern k#; + +ligtable "k" : "x" : bbxi: bbzeta: bbkappa: bbchi: bbvarkappa: +"a" kern kkk#, "e" kern kkk#, "o" kern kkk#, "c" kern kkk#, +"d" kern kkk#, "g" kern kkk#, "q" kern kkk#, bbae kern kkk#, +bboe kern kkk#, bbslash_o kern kkk#, +bbalpha kern kkk#, bbepsilon kern kkk#, bbdelta kern kkk#, +bbphi kern kkk#, bbvarphi kern kkk#, bbomega kern kkk#; + +% hebrew encoding + numeric bbhebr[];%bbhebvow[],bbhebmas[]; + for i=0 upto 26: bbhebr[i]=hex"C0"+i; endfor% can go up to 31 +% ligtable bbhebr[5]: bbhebr[5]=:bbhebr[27]; +% ligtable bbhebr[9]:bbhebr[5]=:bbhebr[28],bbhebr[9]=:bbhebr[29]; +% for i=0 upto 31: bbhebmas[i]=hex"A0"+i; endfor +% for i=0 upto 20: bbhebvow[i]=hex"C0"+i; endfor + input mbbhebrw; + dagesh_accent:=hex"FF"; + ligtable dagesh_accent: + bbhebr[0]=:bbhebr[0]+32, + bbhebr[1]=:bbhebr[1]+32, + bbhebr[2]=:bbhebr[2]+32, + bbhebr[3]=:bbhebr[3]+32, + bbhebr[4]=:bbhebr[4]+32, + bbhebr[5]=:bbhebr[5]+32, + bbhebr[6]=:bbhebr[6]+32, + bbhebr[7]=:bbhebr[7]+32, + bbhebr[8]=:bbhebr[8]+32, + bbhebr[9]=:bbhebr[9]+32, + bbhebr[10]=:bbhebr[10]+32, + bbhebr[11]=:bbhebr[11]+32, + bbhebr[12]=:bbhebr[12]+32, + bbhebr[13]=:bbhebr[13]+32, + bbhebr[14]=:bbhebr[14]+32, + bbhebr[15]=:bbhebr[15]+32, + bbhebr[16]=:bbhebr[16]+32, + bbhebr[17]=:bbhebr[17]+32, + bbhebr[18]=:bbhebr[18]+32, + bbhebr[19]=:bbhebr[19]+32, + bbhebr[20]=:bbhebr[20]+32, + bbhebr[21]=:bbhebr[21]+32, + bbhebr[22]=:bbhebr[22]+32, + bbhebr[23]=:bbhebr[23]+32, + bbhebr[24]=:bbhebr[24]+32, + bbhebr[25]=:bbhebr[25]+32, + bbhebr[26]=:bbhebr[26]+32; + dagesh_mark:=true; + for i=0 upto 26: bbhebr[i]:=hex"E0"+i; endfor + input mbbhebrw; +% input mbbhebvw; +% input mbbhebma; + +% ligtable "A": "L": bbDelta : bbLambda : +% "T" kern -2u#, "V" kern -2u#, "W" kern -2u#, "Y" kern -2u#, +% bbTau kern -2u#, bbUpsilon kern -2u#; + +% ligtable "T" : "V" : "W" : "Y" : bbTau : bbUpsilon : +% "a" kern -2u#, "c" kern -2u#, "d" kern -2u#, "e" kern -2u#, +% "g" kern -2u#, "m" kern -2u#, "n" kern -2u#, "o" kern -2u#, +% "q" kern -2u#,"r" kern -2u#,"s" kern -2u#,"u" kern -2u#, +% "v" kern -2u#,"w" kern -2u#,"x" kern -2u#,"y" kern -2u#, +% "y" kern -2u#, +% bbalpha kern -2u#, bbgamma kern -2u#, bbepsilon kern -2u#, +% bbvarepsilon kern -2u#, bbeta kern -2u#, bbiota kern -2u#, +% bbkappa kern -2u#, bbvarkappa kern -2u#, bbmu kern -2u#, +% bbnu kern -2u#, bbomicron kern -2u#, bbpi kern -2u#, +% bbvarpi kern -2u#, bbrho kern -2u#, bbvarrho kern -2u#, +% bbsigma kern -2u#, bbvarsigma kern -2u#, +% bbtau kern -2u#, bbupsilon kern -2u#, bbphi kern -2u#, +% bbchi kern -2u#, bbpsi kern -2u#, bbomega kern -2u#, +% "A" kern -2u#, bbDelta kern -2u#,bbLambda kern -2u#; +end. + + + diff --git a/fonts/mbboard/source/mbbextra.mf b/fonts/mbboard/source/mbbextra.mf new file mode 100644 index 0000000000..ce9b837562 --- /dev/null +++ b/fonts/mbboard/source/mbbextra.mf @@ -0,0 +1,7 @@ +% blackboard typefaces by Anthony Phan. +% file: bbextra.mf (temporary designs) +% last modification: 25.10.2001. + +def horizontal_rules_list=0.4h,0.5h,0.6h, + -body_depth,-desc_depth,x_height,cap_height,asc_height,body_height +enddef; diff --git a/fonts/mbboard/source/mbbgr10.mf b/fonts/mbboard/source/mbbgr10.mf new file mode 100644 index 0000000000..d5b0ddb798 --- /dev/null +++ b/fonts/mbboard/source/mbbgr10.mf @@ -0,0 +1,20 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbgr10.mf (parameters' file for 10 points greek fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbbgr"; font_size 10pt#; + +slant:=0; +square_dots:=false; +math_fitting:=false; +variant_a:=true; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0.05; ab_down_factor:=0.15; +hmn_factor:=0.15; uy_factor:=0.15; + +input mbblight; +input mbbgrkdr; + diff --git a/fonts/mbboard/source/mbbgrkdr.mf b/fonts/mbboard/source/mbbgrkdr.mf new file mode 100644 index 0000000000..7ba734490d --- /dev/null +++ b/fonts/mbboard/source/mbbgrkdr.mf @@ -0,0 +1,124 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbgrkdr.mf (greek driver file) +% last modification: 25.10.2001. + +mode_setup; font_setup; +font_coding_scheme:="mbb greek font"; +% Inspired by Silvio Levi and Yannis Haralambous' work + +% +% +% Activate to allow characters with undefined code. +% (for proof mode compilation) + +%def iff expr b= +% if b: let next_=use_it else: let next_=use_it fi; next_ +%enddef; + +bbrough=hex"10"; bbsmooth=hex"11"; +bbgrave=hex"12"; bbacute=hex"13"; +bbcircumflex=hex"5E"; bbhacheck=hex"14"; bbtilde=hex"7E"; +bbbreve=hex"15"; bbmacron=hex"16"; +bbdotaccent=hex"5F"; bbumlaut=hex"7F";bbcirc_accent=hex"17"; +%bbcedilla=hex"18"; +bbsubscript_iota:=hex"18"; +bblong_umlaut:=hex"7D"; +% bbleft_slanted_cross=hex"20"; +% bbogonek=hex"22";% Polish +% bbstraight_accent=hex"E0";% Greek + +bbnormal_space:=hex"20"; bbasterisk=hex"2A"; +bbcomma=hex"2C"; bbperiod=hex"2E"; +bbcolon=hex"3A"; bbsemicolon=hex"3B"; +bbquestion_mark=hex"3F"; bbexclamation_point=hex"21"; +bbspanish_shriek=hex"07"; bbspanish_query=hex"08"; +bbslash=hex"2F"; bbback_slash=hex"5C"; + +parenthesis_left=hex"28"; parenthesis_right=hex"29"; +bracket_left=hex"5B"; bracket_right=hex"5D"; +%brace_left=hex"DB"; vertical=hex"DC"; brace_right=hex"DD"; +%angle_left=hex"DE"; angle_right=hex"DF"; + +bbfso_quotes=hex"00"; bbfsc_quotes=hex"01"; +bbfdo_quotes=hex"02"; bbfdc_quotes=hex"03"; + +bbapostrophe=hex"27"; bbreverse_apostrophe=hex"60"; +bbopening_quotes=hex"04"; bbclosing_quotes=hex"05"; +% bbgerman_opening_comma:=hex""; +bbgerman_opening_quotes:=hex"06"; +bbstraight_quotes:=hex"22"; % ASCII location +bbdash:=hex"2D"; bben_dash:=hex"7B"; bbem_dash:=hex"7C"; +% bbvariant_dash:=hex"";% centered dash. +% bbunderscore:=hex""; + +% symbols encoding +% partial=hex"A0"; +% bbpartial_derivative=hex"A0"; +plus_sign:=hex"2B"; +equal_sign:=hex"3D"; +inferior_sign:=hex"3C"; +superior_sign:=hex"3E"; +hash_sign:=hex"23"; +bbpercent=hex"25"; +bbampersand=hex"26"; +bbdollar=hex"24"; +% bbeuro=hex"E8"; bbpound=hex"E9"; bbcent=hex"EA"; +% bbhash_mark=hex"23"; +bbat_sign=hex"40"; Infinity=hex"80"; + +ligtable inferior_sign: inferior_sign=:bbfdo_quotes; +ligtable superior_sign: superior_sign=:bbfdc_quotes; +ligtable bbdash: bbdash=:bben_dash; +ligtable bben_dash: bbdash=:bbem_dash; +ligtable bbreverse_apostrophe: bbreverse_apostrophe=:bbopening_quotes; +ligtable bbapostrophe: bbapostrophe=:bbclosing_quotes; +ligtable bbcomma: bbcomma=:bbgerman_opening_quotes; +ligtable bbexclamation_point: bbreverse_apostrophe=:bbspanish_shriek; +ligtable bbquestion_mark: bbreverse_apostrophe=:bbspanish_query; + +% greek encoding +bbAlpha=hex"41"; bbBeta=hex"42"; bbGamma=hex"47"; bbDelta=hex"44"; +bbEpsilon=hex"45"; bbZeta=hex"5A"; bbEta=hex"48"; bbTheta=hex"4A"; +bbIota=hex"49"; bbKappa=hex"4B"; bbLambda=hex"4C"; bbMu=hex"4D"; +bbNu=hex"4E"; bbXi=hex"58"; bbOmicron=hex"4F"; bbPi=hex"50"; +bbRho=hex"52"; bbSigma=hex"53"; bbTau=hex"54"; bbUpsilon=hex"55"; +bbPhi=hex"46"; bbChi=hex"51"; bbPsi=hex"59"; bbOmega=hex"57"; +boolean variant_Upsilon; variant_Upsilon=false; +% bbslash_Sigma=hex"9A"; bbnabla=hex"9B"; bbcoprod=hex"9C"; +% bbmho=hex"9D"; +% bbDigamma=hex"E1"; bbKoppa=hex"E2"; bbSampi=hex"E3"; + +bbalpha=hex"61"; bbbeta=hex"62"; bbgamma=hex"67"; bbdelta=hex"64"; +bbvarepsilon=hex"65"; bbzeta=hex"7A"; bbeta=hex"68"; bbtheta=hex"6A"; +bbiota=hex"69"; bbkappa=hex"6B"; bblambda=hex"6C"; bbmu=hex"6D"; +bbnu=hex"6E"; bbxi=hex"78"; bbomicron=hex"6F"; bbpi=hex"70"; +bbrho=hex"72"; bbsigma=hex"73"; bbtau=hex"74"; bbupsilon=hex"75"; +if variant_f: bbvarphi else: bbphi fi=hex"66"; bbchi=hex"71"; +bbpsi=hex"79"; bbomega=hex"77"; + %bbvarepsilon=hex"7F"; bbvartheta=hex"BA"; bbvarkappa=hex"BB"; + %bbvarpi=hex"BC"; bbvarrho=hex"BD"; +bbvarsigma=hex"63"; +% bbvarphi=hex"BF"; +% bbvardigamma=hex"99"; +% bbdigamma=hex"E4"; bbkoppa=hex"E5"; bbsampi=hex"E6"; bbvarkoppa=hex"E7"; + +% let the show begin : + +input mbbgrkup; +input mbbgrklo; +input mbbdigit; +input mbbaccnt; +input mbbpunct; +input mbbsymbl; + +% parameters for TFM files. + +font_slant=slant; +font_x_height=x_height#; +font_normal_stretch=3u#; +font_normal_shrink=2u#; +font_quad=18u#+4letter_fit#; +font_extra_space=2u#; +font_normal_space=6u#+2letter_fit#; + +bye.
\ No newline at end of file diff --git a/fonts/mbboard/source/mbbgrklo.mf b/fonts/mbboard/source/mbbgrklo.mf new file mode 100644 index 0000000000..78a6ddc1de --- /dev/null +++ b/fonts/mbboard/source/mbbgrklo.mf @@ -0,0 +1,875 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbgrklo.mf (Greek lowercase) +% last modification: 25.10.2001. + +% One can choose to generate some characters or their variants +% or both when they exist. Characters with no variants will +% be generated anyway +% (except ``bbomicron'' which is the same as roman ``o''). + +def horizontal_rules_list= + -body_depth,-desc_depth,0.5x_height,x_height,cap_height, + asc_height,body_height +enddef; + +use_rule1; + +iff variant_a: +beginchar(bbalpha,10u#+2appr#,x_height#,0); + "Lowercase Greek alpha"; + italcorr x_height#*slant-.5u#; + path tmppp_path; numeric t[]; + pickup circle.nib; + lft x3=apprl-ho; rt x1=hround((8u#+2appr#)*hppp)-apprr; + x2=x4=0.5[x3,x1]; rt x6=w-apprr+hround 0.4u; rt x5=w-apprr; + top y2=h+uo; bot y4=-oo; top y5=h; bot y6=bot y7=0; + y3=0.5[y4,y2]; y1=0.45[y5,y6]; y8=0.45[y6,y5]; + x1-x8=hthick; x11-x3=hThick; + x7=min(x6-u,x8+(x1-x2)*((y8-y7)/(y2-y1))); + tmp_path:=z1 up_to_left z2 left_to_down z3 down_to_right z4; + tmpp_path:=z6..z7 left_to_up z8; + tmppp_path=z4 right_to_up z5; + bbbowl(z2,z3,z4,hThick) tmp_path; + hbbowl(z2,z1,(x1,y8),x1-x8) tmp_path; + hbbowl(z7,z8,(x8,y1),x1-x8) tmpp_path; + t1=xpart(tmppp_path intersectiontimes tmpp_path); + t2=xpart(tmppp_path intersectiontimes bowl_path); + draw z1..z1 & tmp_path & subpath (0,t1) of tmppp_path; + draw subpath (t2,2) of tmppp_path; draw tmpp_path; + square_end5(up); square_end6(right); + labels(1,2,3,4,5,6,7,8); + math_fit(0,0); +endchar; + +iff not variant_a: +beginchar(bbalpha,10u#+2appr#,x_height#,0); + "Lowercase Greek alpha"; + italcorr x_height#*slant-.5u#; + save tmp_path; path tmp_path[]; numeric t[]; + pickup circle.nib; + % cross + y10=y9'l=0; y1'=y9r=h; x10=x9r=w-apprr; x1'=x9'l=x10-5u; + adjust_slanted_bar(1',10,10',1)(thick,1); + adjust_slanted_bar(9'l,9r,9'r,9l)(thin,-1); + z9'=0.5[z9'r,z9'l]; z9=0.5[z9r,z9l]; + % curves + top y3=top y12=h+uo; bot y5=-oo; y4=0.5[y3,y5]; lft x4=apprl-ho; + slope:=(y1'-y1)/(x1'-x1); + hellipse_set(4,3,2,1); hellipse_set(4,12,11,10); + slope:=(y9-y9')/(x9-x9'); hellipse_set(4,5,6,9); + tmp_path1=z1---z2...z3{left}; + tmp_path2=z10---z11...z12{left}..z3; + tmp_path3=z5{right}...z6---z9; + t1=xpart(tmp_path3 intersectiontimes tmp_path1); + t2=xpart(tmp_path3 intersectiontimes tmp_path2); + z7=point t1 of tmp_path3; z8=point t2 of tmp_path3; + tmp_path4=z2{z2-z1}...z3 left_to_down z4 down_to_right z5 + & subpath (0,t1) of tmp_path3; + bbbowl(z3,z4,z5,hThick) tmp_path4; + ortho_penpos2(thin,z1'-z1); ortho_penpos11(thin,z10'-z10); + ortho_penpos8(thin,z9-z8); + penpos1(diag_width(thin,z1'-z1),0); + penpos10(diag_width(thin,z10'-z10),0); + y1a-y1=thin; z1a-z1=z10a-z10=whatever*(z1'-z1); + draw tmp_path4; draw subpath (1,3) of tmp_path2; + penstroke z1e..z2e; penstroke z10e..z11e; penstroke z8e..z9e; + fill z1a--z10a--z10--z1--cycle; + penlabels(1,2,8,9,9',10,11); + labels(1',1a,3,4,5,6,7,10',10a); + math_fit(0,0); +endchar; + +beginchar(bbbeta,8u#+2appr#,asc_height#,desc_depth#); + "Lowercase Greek beta"; + italcorr 0.8asc_height#*slant-.5u#; + pickup circle.nib; + lft x1=lft x2=apprl; x3=x5=0.5[x1,x4]; rt x4=w-apprr; rt x6=w-apprr+ho; + bot y1=-d; y2=0.5[y5,y4]; top y3=h+oo; y4=0.5[y5,y3]; top y5=x_height; + y6=0.5[y7,y5]; x8=x1+hthick; + if ab_down_factor>0: bot y7=-oo; + x7=ab_down_factor[(x1+x6)/2,(x1+x3+2x6)/4]; + y8=ab_down_factor[top 0,y5]; + else: bot y7=bot y8=0; x7=0.5[x1,x6]; fi + tmp_path:=z1..z2 up_to_right z3 right_to_down z4 down_to_left z5 + & z5 right_to_down z6 down_to_left z7 + if ab_down_factor>0: left_to_up z8 else: ..z8 fi; + draw tmp_path; + bbbowl(z5,z6,z7,hThick) tmp_path; + bbbowl(z3,z4,z5,max(0,x4-x.bowl.mid)) tmp_path; + hbbowl(z3,z2,z1,hthick) tmp_path; + pickup square.nib draw z1..z.bowl.bot; + square_end5(left); + labels(1,2,3,4,5,6,7,8); + math_fit(0,0); +endchar; + +beginchar(bbgamma,8u#+2appr#,x_height#,desc_depth#); + "Lowercase Greek gamma"; + italcorr x_height#*slant-0.5u#; + pickup circle.nib; + y1=y12r=h; y2'=y12'l=bot y7=-d-oo; + x1=x12'l=apprl; x2'=x12r=w-apprr; + adjust_slanted_bar(1,2',2,1')(thick,1); + adjust_slanted_bar(12'l,12r,12'r,12l)(thin,-1); + z12=0.5[z12r,z12l]; z12'=0.5[z12'r,z12'l]; + a:=diag_width(thin,z1-z1'); + penpos1(a,0); penpos2(a,0); + y1-y1a=thin; z1-z1a=z2-z2a=whatever*(z1-z1'); + forsuffixes $=,r,l: + z11$=whatever[z2,z2']; z11$=whatever[z12$,z12'$]; + endfor + z10=whatever[z1,z1']; z10=whatever[z12,z12']; + x7=0.5[apprl,w-apprr]; + lft x8=apprl+hround 1.95u; x6-x5=0.5[thin,thick]; + 0.5[x5,x6]-x7=x7-x8; + slope:=(y1'-y1)/(x1'-x1); + ellipse_set(7,5,3,1); ellipse_set(7,6,4,2); + slope:=(y12'r-y12r)/(x12'r-x12r); ellipse_set(7,8,9,12); + ortho_penpos3(thin,z1-z3); ortho_penpos4(thin,z2-z4); + draw z4{z4-z2}...z6 down_to_left z7 left_to_up z8...z9--z10; + draw z3{z3-z1}...z5 down_to_left z7; + penstroke z1e..z3e; penstroke z2e..z4e; + penstroke z11e..z12e; fill z1--z2--z2a--z1a--cycle; + penlabels(1,2,3,4,14,12,12'); labels(1',1a,2',2a,5,6,7,8,9,10); + math_fit(0,0); +endchar; + +%beginchar(bbgamma,8u#+2appr#,x_height#,desc_depth#); +% "Lowercase Greek gamma"; +% italcorr x_height#*slant-0.5u#; +% pickup circle.nib; +% y1=y14r=h; y4=y15l=-0.3d; +% x1=apprl; x14r=w-apprr; +% rt x4=rt x6=w-apprr+ho-hround u; +% x15l=lft x10=apprl+hround u; +% x8=0.5[x6,x10-hthick/2]; bot y8=-d-oo; x6-x17=hthick; +% adjust_slanted_bar(1,4,2,3)(thick,1); +% adjust_slanted_bar(14r,15l,14l,15r)(thin,-1); +% z13r=whatever[z14r,z15r]; z13l=whatever[z14l,z15l]; +% z13r=whatever[z2,z4]; z13l=whatever[z2,z4]; +% z12=whatever[z1,z3]; z12=whatever[0.5[z14l,z14r],0.5[z15l,z15r]]; +% y1-y1a=thin; z1a=whatever[z1,z3]; z2-z2a=z1-z1a; +% slope:=(y3-y1)/(x3-x1); ellipse_set(8,6,5,2); ellipse_set(8,17,16,1); +% slope:=(y15r-y14r)/(x15r-x14r); ellipse_set(8,10,11,12); +% penpos1(diag_width(thin,z1-z3),0); +% penpos2(diag_width(thin,z1-z3),0); +% ortho_penpos5(thin,z2-z5); ortho_penpos16(thin,z1-z16); +% z7=z6 downleft z8; z9=z8 leftup z10; z18=z17 downleft z8; +% penstroke z1e..z16e; penstroke z2e..z5e; penstroke z13e..z14e; +% fill z1--z2--z2a--z1a--cycle; +% draw z5{z5-z2}...z6{down}...z7{z8-z6}...z8{left}...z9{z10-z8} +% ...z10{up}...z11---z12; +% draw z16{z16-z1}...z17{down}...z18{z8-z17}...z8{left}; +% penlabels(1,2,5,,13,14,15,16); +% labels(1a,2a,3,4,6,7,8,9,10,11,12,17,18); +% math_fit(0,0); +%endchar; + +beginchar(bbdelta,8u#+2appr#,asc_height#,0); + "Lowercase Greek delta"; + italcorr asc_height#*slant-2u#; + pickup circle.nib; + top y1=h; y2=y0=y1; bot y10=-oo; y8=y12; y13=y7; + bot y6=x_height; + x6-x0=6u; + rt x1=w-apprr-hround 1.5u; lft x4=apprl+hround u; x2=0.3[x4,x1]; + x6=x10=0.5[x12,x8]; rt x8=w-apprr+ho; lft x12=apprl-ho; + slope:=(y0-y6)/(x0-x6); ellipse_set(2,4,5,6); ellipse_set(10,8,7,6); + x15-x12=x8-x17=hThick; x7-x6=x6-x13; + tmp_path:=z1..z2 left_to_down z4...z5---z6---z7...z8 + down_to_left z10 left_to_up z12...z13...z6; + z15=tmp_path intersectionpoint ((x15,y10)..(x15,y12)); + z16=tmp_path intersectionpoint ((x15,y12)..(x15,y6)); + z17=tmp_path intersectionpoint ((x17,y10)..(x17,y12)); + z18=tmp_path intersectionpoint ((x17,y8)..(x17,y6)); + draw tmp_path; draw z15..z16; draw z17..z18; + square_end1(right); + labels(0,0a,1,2,3,4,5,6,7,8,9,10,11,12,13,14); + math_fit(0,0); +endchar; + +iff known bbepsilon: +beginchar(bbepsilon,6u#+2appr#,x_height#,0); + "Lowercase Greek epsilon"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; + rt x1=rt x5=w-apprr; top y1=h; x2=0.75[lft x3,rt x1]; y2=y1; + lft x3=apprl-ho; bot y3=vround 0.5h; bot y4=bot y5=0; x4=x2; + tmp_path:=z1..z2 left_to_down z3 down_to_right z4..z5; + draw tmp_path; bbbowl(z2,z3,z4,hThick) tmp_path; + z6=bowl_path intersectionpoint (z3..(w,y3)); + rt x7=hround(w-apprr-0.5u); y7=y3; + draw z6..z7; + square_end1(right); + square_end5(right); + square_end7(right); + labels(1,2,3,4,5,6,7,8,9); + math_fit(0,0); +endchar; + +beginchar(bbzeta,8u#+2appr#,asc_height#,desc_depth#); + "Lowercase Greek zeta"; + italcorr x_height#*slant-2u#; + pickup circle.nib; + top y1=h; top y2=top y3=top y4=vround(y1-0.25(h-x_height)); + bot y6=bot y7=0; bot y9=-d; + y5=0.3[y6,y4]; y8=0.5[y9,y7]; + lft x1=apprl+hround 2u; lft x5=apprl-ho; + rt x3=w-apprr-hround 1.5u; rt x8=w-apprr+ho; + x2=0.7[x1,x3]; + x4=0.85[x5,x3]; + x6-x5=x8-x7=0.44(x8-x5); + x9=good.x(0.5[x5,x8]); + tmp_path:=z1 down_to_right z2..z3 & z3..z4 left_to_down z5 + down_to_right z6...z7right_to_down z8 down_to_left z9; + draw tmp_path; + bbbowl(z4,z5,z6,hThick) tmp_path; + bbbowl(z7,z8,z9,hThick) tmp_path; + square_end1(up); + square_end3(right); + square_end9(left); + labels(1,2,3,4,5,6,7,8,9); + math_fit(0,0); +endchar; + +beginchar(bbeta,8u#+2appr#,x_height#,desc_depth#); + "Lowercase Greek eta"; + italcorr 0.75x_height#*slant-.5u#; + complete_n; + math_fit(0,0); +endchar; + +iff known bbtheta: +beginchar(bbtheta,8u#+2appr#,asc_height#,0); + "Lowercase Greek theta"; + italcorr 0.6asc_height#*slant+ho#-.5u#; + pickup circle.nib; + bbcircle1(apprl-ho,w-apprr+ho,h+oo,-oo); draw last_path; + bbbowl(z1b,z1a,z1d,hThick) last_path; x2=x.bowl.top; + bbbowl(z1b,z1c,z1d,hThick) last_path; x3=x.bowl.top; + y2=y3=good.y(0.5[y1b,y1d]); draw z2..z3; labels(2,3); + math_fit(0,0); +endchar; + +beginchar(bbiota,6u#+2appr#,x_height#,0); + "Lower Greek iota"; +% no italic correction + pickup circle.nib; + rt x1=w-apprr; x2=0.5[x1,x4]; lft x3=lft x4=apprl; + bot y2=-oo; top y4=h; y1=y3=good.y(0.3[y2,y4]); + tmp_path:=z1 down_to_left z2 left_to_up z3..z4; + draw tmp_path; + hbbowl(z2,z3,z4,hthick) tmp_path; + pickup square.nib; draw z4..z.bowl.bot; + square_end1(up); labels(1,2,3,4,5,6); + math_fit(0,0); +endchar; + +iff known bbkappa: +beginchar(bbkappa,9u#+2appr#,x_height#,0); "Lower Greek kappa"; + italcorr x_height#*slant-.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.4*h; + 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.25[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,9u#+2appr#,asc_height#,0); + "Lowercase Greek lambda"; +% no italic correction + x1=apprl; x5=w-apprr; + y2=y3=max(x_height,0.6h)-0.5thin; y1=y4=y5=0; y6=y7=h; + numeric a,x,y; a=(abs(x5-x1)-2y2*slant)/(2y2); y=thick/(2y2); + x=thick*(-a*y+sqrt(1+(a**2)-(y**2)))/(1-(y**2)); + x3-x2=x5-x4=x7-x6=x; x2-x1=x4-x2; z6=whatever[z4,z2]; + a:=diag_width(thin,z2-z4); + penpos1(diag_width(thin,z2-z1),0); + penpos4(a,0); penpos5(a,0); penpos6(a,0); penpos7(a,0); + forsuffixes $=r,l: + z2$-z1$=whatever*(z2-z1); z2$=whatever[z2,z4]; + endfor + y6-y6a=thin; z6-z6a=z7-z7a=z4a-z4=z5a-z5=whatever*(z6-z4); + penstroke z1e..z2e; penstroke z4e..z6e; penstroke z5e..z7e; + fill z4--z5--z5a--z4a--cycle; fill z6--z7--z7a--z6a--cycle; + penlabels(1,2,3,4,5,6,7); labels(4a,5a,6a,7a); + math_fit(0,0); +endchar; + +beginchar(bbmu,8u#+2appr#,x_height#,desc_depth#); "Lowercase Greek mu"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; + bot y1=0; y2=y1; top y3=h; y4=y3=y7=y8; bot y5=bot y6=-d; + rt x1=w-apprr; x3=x1; lft x7=lft x5=apprl; + x1-x2=x3-x4=x8-x7=x6-x5=hthick; + if uy_factor>0: numeric t; + x9=x2; y9=uy_factor[y2,y4]; bot y10=-oo; x10=0.5[x7,0.5[x2,x1]]; + x11=x7; y11=0.7[y7,y10]; + tmp_path:=z9 down_to_left z10 left_to_up z11; + t=xpart(tmp_path intersectiontimes (z8..z6)); + z14=point t of tmp_path; + draw subpath (0,t) of tmp_path; + labels(10,11); + else: z9=(x6,y1); draw z2..z9; fi + pickup square.nib; draw z1--z2--z4--z3--cycle; + draw z5--z6--z8--z7--cycle; + labels(0,1,2,3,4,5,6,7,8,9); + math_fit(0,0); +endchar; + +beginchar(bbnu,8u#+2appr#,x_height#,0); "Lowercase Greek nu"; + italcorr x_height#*slant+ho#-.5u#; + pickup circle.nib; + top y2=h; y2=y3=y6=y7; bot y4=bot y5=0; + lft x3=lft x4=apprl; rt x6=w-apprr+ho; + x2-x3=hthick; x6-x7=hThick; x5=rt x4; + tmp_path:=z5 right_to_up z6; + z8=tmp_path intersectionpoint (z7..(x7,y5)); + z1=tmp_path intersectionpoint (z2..(x2,y5)); + draw tmp_path; draw z1..z2; draw z7..z8; + pickup square.nib; draw z2--z3--z4; draw z6..z7; + labels(1,2,3,4,5,6,7,8); + math_fit(0,0); +endchar; + +beginchar(bbxi,8u#+2appr#,asc_height#,desc_depth#); + "Lowercase Greek xi"; + italcorr x_height#*slant-2.5u#; + pickup circle.nib; + top y1=h; top y2=top y3=top y4=vround(y1-0.25(h-x_height)); + top y6=top y7=top y8=vround 0.5h; bot y10=bot y11=0; bot y13=-d; + y5=0.5[y6,y4]; y9=0.4[y10,y8]; y12=0.5[y13,y11]; + lft x1=apprl+hround 2u; lft x5=apprl; lft x9=apprl-ho; + rt x3=rt x7=w-apprr-hround 2u; rt x12=w-apprr+ho; + x2=0.7[x1,x3]; + x4=0.85[x5,x3]; + x6=0.7[x5,x7]; + x8=0.8[x9,x7]; + x10-x9=x12-x11=0.44(x12-x9); + x13=good.x 0.5[x9,x12]; + tmp_path:=z1 down_to_right z2..z3 & z3..z4 left_to_down z5 + down_to_right z6..z7 & z7..z8 left_to_down z9 down_to_right z10 + ...z11 right_to_down z12 down_to_left z13; + draw tmp_path; + bbbowl(z8,z9,z10,hThick) tmp_path; + bbbowl(z4,z5,z6,max(0,x.bowl.mid-x5)) tmp_path; + bbbowl(z11,z12,z13,hThick) tmp_path; + square_end1(up); + square_end3(right); + square_end7(right); + square_end13(left); + labels(1,2,3,4,5,6,7,8,9,10,11,12,13); + math_fit(0,0); +endchar; + +iff known bbomicron: +beginchar(bbomicron,8u#+2appr#,x_height#,0); "Lowercase Greek omicron"; + italcorr 0.6x_height#*slant+ho#-.5u#; + pickup circle.nib; + bbcircle1(apprl-ho,w-apprr+ho,x_height+uo,-oo); draw last_path; + bbbowl(z1b,z1a,z1d,hThick) last_path; + bbbowl(z1b,z1c,z1d,hThick) last_path; + math_fit(0,0); +endchar; + +iff known bbpi: +beginchar(bbpi,9u#+2appr#,x_height#,0); "Lowercase Greek pi"; + italcorr x_height#*slant; + pickup circle.nib; top y1=h; apprl-lft x1=rt x2-w+apprr=hround 0.5u; + y1=y2=y3=y6=y7=y10; bot y4=0; y4=y5=y8=y9; + lft x3-apprl=lft x4-apprl=w-apprr-rt x10=w-apprr-rt x9=hround 0.75u; + x10-x7=x9-x8=x6-x3=x5-x4=hthick; pickup square.nib; + draw z1..z2; draw z3--z4--z5--z6; draw z7--z8--z9--z10; + labels(1,2,3,4,5,6,7,8,9,10); + math_fit(0,0); +endchar; + +iff known bbrho: +beginchar(bbrho,8u#+2appr#,x_height#,desc_depth#); + "Lowercase Greek rho"; + italcorr 0.6x_height#*slant+ho#-.5u#; + pickup circle.nib; numeric t; + bot y1=-d; top y3=h+uo; bot y5=-oo; y2=y4=0.5[y5,y3]; + lft x2=lft x1=apprl; rt x4=w-apprr+ho; x3=x5=0.5[x2,x4]; + tmp_path:=z1..z2 up_to_right z3 right_to_down + z4 down_to_left z5 left_to_up z2; + bbbowl(z3,z4,z5,hThick) tmp_path; + hbbowl(z3,z2,z1,hthick) tmp_path; + t=5+xpart(subpath (5,infinity) of tmp_path + intersectiontimes bowl_path); + draw subpath (0,t) of tmp_path; + pickup square.nib; draw z.bowl.bot..z1; + penlabels(1,2,3,4,5); + math_fit(0,0); +endchar; + +iff known bbsigma: +beginchar(bbsigma,8u#+2appr#,x_height#,0); + "Lowercase Greek sigma"; + italcorr x_height#*slant+.5u#; + pickup circle.nib; + rt x1=hround(w-apprr+u); x2=x4=0.5[x3,x5]; + lft x3=apprl-ho; rt x5=rt x6=w-apprr; + top y1=top y2=h; y3=y5=0.5[y4,y2]; + bot y4=-oo; y6=y1; + tmp_path:=z1..z2 left_to_down z3 down_to_right + z4 right_to_up z5..z6; + draw tmp_path; + bbbowl(z2,z3,z4,hThick) tmp_path; + hbbowl(z4,z5,z6,hthick) tmp_path; + square_end1(right); + labels(1,2,3,4,5,6,7,8,9,10); + math_fit(0,0); +endchar; + +beginchar(bbtau,7u#+2appr#,x_height#,0); + "Lowercase Greek tau"; + italcorr x_height#*slant; + pickup circle.nib; center_bar(1,2); bot y1=bot y2=0; + apprl-lft x5=rt x6-w+apprr=hround 0.5u; top y5=top y6=h; + z3=(x1,y5); z4=(x2,y5); pickup square.nib; draw z5..z6; + draw z3--z1--z2--z4; labels(1,2,3,4,5,6); + math_fit(0,0); +endchar; + +beginchar(bbupsilon,8u#+2appr#,x_height#,0); + "Lowercase Greek upsilon"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; + rt x1=rt x2=w-apprr; lft x4=lft x5=apprl; x3=0.5[x2,x4]; + top y1=top y5=h; bot y3=-oo; y2=y4=1/3[y3,y1]; + tmp_path:=z1..z2 down_to_left z3 left_to_up z4..z5; + draw tmp_path; + hbbowl(z3,z4,z5,hthick) tmp_path; + pickup square.nib; draw z5..z.bowl.bot; + square_end1(up); labels(1,2,3,4,5); + math_fit(0,0); +endchar; + +iff known bbphi: +beginchar(bbphi,10u#+2appr#,asc_height#,desc_depth#); + "Lowercase Greek phi"; + italcorr 0.6x_height#*slant+ho#-.5u#; + center_stem(2,3); bot y2=-d; top y3=h; + bbcircle1(apprl-ho,w-apprr+ho,x_height+oo,-oo); draw last_path; + bbbowl(z1b,z1a,z1d,hThick) last_path; + bbbowl(z1b,z1c,z1d,hThick) last_path; + pickup square.nib; draw z2..z3; + labels(2,3); + math_fit(0,0); +endchar; + +beginchar(bbchi,9u#+2appr#,x_height#,desc_depth#); + "Lowercase Greek khi"; + italcorr x_height#*slant-0.5u#; + complete_X(0.35u); + math_fit(0,0); +endchar; + +beginchar(bbpsi,10u#+2appr#,asc_height#,desc_depth#); + "Lowercase Greek psi"; + italcorr x_height#*slant-.5u#; + center_stem(1,2,6); + bot y1=-d; top y2=h; + top y4=top y8=x_height; y5=y7=0.5[y4,y6]; bot y6=-oo; + lft x4=lft x5=apprl; rt x7=rt x8=w-apprr; + tmp_path:=z4..z5 down_to_right z6 right_to_up z7..z8; + draw tmp_path; + hbbowl(z6,z5,z4,hthick) tmp_path; z3=z.bowl.bot; + hbbowl(z6,z7,z8,hthick) tmp_path; z9=z.bowl.bot; + pickup square.nib; draw z1..z2; draw z3..z4; draw z8..z9; + labels(1,2,3,4,5,6,7,8,9); + math_fit(0,0); +endchar; + +beginchar(bbomega,12u#+2appr#,x_height#,0); + "Lowercase Greek omega"; + italcorr 0.6x_height#*slant+ho#-.5u#; + center_stem(4,5); top y1=top y8=h; y2=y7=0.42[y3,y1]; + bot y3=bot y6=-oo; y4=0.35h; top y5=vround(2h/3); + lft x2=apprl-ho; rt x7=w-apprr+ho; + rt x1=hround max(0.3[lft x2,rt x7],x2+hThick+1.5thin); + x1-x2=x7-x8; x3=0.25[x2,x7]; x7-x6=x3-x2; x9-x2=x7-x11=hThick; + z1'-z1=(z2-z1) yscaled 1/4; z8'-z8=(z7-z8) yscaled 1/4; + tmp_path:=z1{z1'-z1}...z2 down_to_right + z3 right_to_up z4 & z4down_to_right z6 right_to_up z7 + ...z8{z8-z8'}; + z9=tmp_path intersectionpoint ((x9,y1)..(x9,y2)); + z10=tmp_path intersectionpoint ((x9,y2)..(x9,y3)); + z11=tmp_path intersectionpoint ((x11,y1)..(x11,y2)); + z12=tmp_path intersectionpoint ((x11,y2)..(x11,y3)); + draw tmp_path; draw z4..z5; draw z9..z10; draw z11..z12; + square_end5(up); + square_end1(z1-z1'); + square_end8(z8-z8'); + labels(range 1 thru 12); + math_fit(0,0); +endchar; + +% Variants + +iff known bbvarbeta: +beginchar(bbvarbeta,8u#+2appr#,asc_height#,0); + "Lowercase Greek variant beta"; + italcorr 0.8asc_height#*slant-.5u#; + pickup circle.nib; + numeric t[]; + lft x5=lft x9=apprl-ho; rt x7=w-apprr+ho; + lft x1=min(apprl+hround(4u/3)-eps,lft x5+hThick); + rt x3=w-apprr-hround(u/3)+eps; x2=x4=0.5[x1,x3]; + x6=x8=0.5[x5,x7]; + top y4=h+oo; bot y6=-oo; top y8=x_height+oo; + y2=good.y 1/3[y8,y4]; y5=0.5[y6,y4]; + y1=y3=0.5[y2,y4]; y7=y9=0.5[y6,y8]; + tmp_path:= z1 down_to_right z2 right_to_up z3 + up_to_left z4 left_to_down z5 down_to_right + z6 right_to_up z7 up_to_left z8 left_to_down z9; + bbbowl(z4,z5,z6,hThick) subpath (6,infinity) of tmp_path; + t1=xpart(subpath (0,4) of tmp_path intersectiontimes bowl_path); + t2=12+xpart(subpath (12,16) of tmp_path intersectiontimes bowl_path); + draw subpath (t1,t2) of tmp_path; + bbbowl(z8,z7,z6,hThick) tmp_path; + labels(range 1 thru 15); + math_fit(0,0); +endchar; + +iff known bbvarepsilon: +beginchar(bbvarepsilon,6u#+2appr#,x_height#,0); + "Lowercase Greek variant epsilon"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; + top y2=h+uo; bot y8=-oo; bot y4=vround 0.5h; y4=y5=y6; + y1=0.76[y4,y2]; y9=0.76[y5,y8]; + y3=0.5[y4,y2]; y7=0.5[y6,y8]; + rt x1=rt x9=w-apprr; rt x5=w-apprr-hround 1.5u; + lft x3=lft x7=apprl-ho; x4=x2; x6=x8; x10-x3=hThick; + tmp_path:=reverse elliptic_arc(3,2,1) & z3 down_to_right z4..z5; + tmpp_path:=reverse elliptic_arc(7,8,9) & z7 up_to_right z6..z5; + bbbowl(z6,z7,z8,hThick) tmpp_path; + bbbowl(z2,z3,z4,max(0,x.bowl.mid-x3)) tmp_path; + draw tmp_path; draw tmpp_path; + square_end1(z1-z1'); + square_end5(right); + square_end9(z9-z9'); + labels(1,1',2,3,4,5,6,7,8,9,9'); + math_fit(0,0); +endchar; + +iff known bbvartheta: +beginchar(bbvartheta,8u#+2appr#,asc_height#,0); + "Lowercase Greek variant theta"; + italcorr 0.7asc_height#*slant+ho#-.5u#; + pickup circle.nib; numeric t; + top y6=h+oo; bot y4=-oo; rt x5=w-apprr+ho; lft x3=apprl-ho; + y3=y2=y5=y9=good.y 0.5[y4,y6]; x4=x6=0.5[x3,x5]; + x2-x3=hThick; x7=good.x 0[x2,x3]; y7=0.35[y6,y9]; + rt x9=w-apprr+hround u; z8=z5; + tmp_path:=z3 down_to_right z4 right_to_up z5 + up_to_left z6 left_to_down z7 down_to_right z8; + hbbowl(z4,z3,z3,x2-x3) tmp_path; + bbbowl(z6,z5,z4,hThick) tmp_path; + t=8+xpart(subpath (8,10) of tmp_path intersectiontimes bowl_path); + draw subpath (0,t) of tmp_path; + y2r=y3r=top y2; y3l=y2l=bot y2; y3a=y2a=y2; + x3r=x3a=lft x3; x2r=x2a=rt x2; x2l=x2; x3l=x3; + draw z5..z9; + fill z3l--z2l--z2a--z2r--z3r--z3a--cycle; + square_end9(right); + labels(2,3,4,5,6,7,8,9,2a,2l,2r,3a,3l,3r); + math_fit(0,0); +endchar; + +iff known bbvarkappa: +beginchar(bbvarkappa,9u#+2appr#,x_height#,0); + "Lowercase Greek variant kappa"; + italcorr x_height#*slant-0.2u#; + pickup circle.nib; + x1r=w-apprr+0.3u; x4l=apprl-0.3u; y1r=h; y4l=-d; + adjust_slanted_bar(1r,4l,2l,3r)(thick+thin,-1); + a:=diag_width(thin,z1r-z3r); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + y1-y1a=thin; z1a=whatever[z1,z3]; + z1-z1a=z2-z2a=z3a-z3=z4a-z4; + top y5=top y12=h; bot y8=bot y9=0; lft x5=apprl; rt x9=w-apprr; + z8=whatever[z2,z4]; z12=whatever[z1,z3]; + rt x6-apprl=w-apprr-lft x10=hround 3u; slope:=(y1-y3)/(x1-x3); + ellipse_set(5,6,7,8); ellipse_set(9,10,11,12); + penstroke z1e..z3e; penstroke z2e..z4e; + fill z1--z1a--z2a--z2--cycle; fill z3--z3a--z4a--z4--cycle; + draw z5 right_to_down z6...z7---z8; + draw z9 left_to_up z10...z11---z12; + square_end5(left); square_end9(right); + penlabels(1,2,3,4); labels(1a,2a,3a,4a,5,6,7,8,9,10,11,12); + math_fit(0,0); +endchar; + +iff known bbvarpi: +beginchar(bbvarpi,12u#+2appr#,x_height#,0); + "Lowercase Greek variant pi"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; + center_stem(1,4); + top y1=h; y1=y7=y8; bot y3=bot y5=-oo; + top y4=vround 0.6h; y2=y6=0.4[y3,y1]; + lft x2+ho=lft x7=apprl; rt x6-ho=rt x8=w-apprr; + x3=0.45[x2,x4]; x5=0.45[x6,x4]; + tmp_path:=z1 left_to_down z2 down_to_right z3 right_to_up z4 + & z4 down_to_right z5 right_to_up z6 up_to_left z1; + draw tmp_path; + bbbowl(z1,z2,z3,hThick) tmp_path; + bbbowl(z1,z6,z5,hThick) tmp_path; + pickup square.nib; draw z7..z8; square_end4(up); + labels(1,2,3,4,5,6,7,8,9,10,11,12); + math_fit(0,0); +endchar; + +iff known bbvarrho: +beginchar(bbvarrho,8u#+2appr#,x_height#,desc_depth#); + "Lowercase Greek variant rho"; + italcorr 0.6x_height#*slant+ho#-.5u#; + pickup circle.nib; numeric t; + rt x1=w-apprr; lft x3=lft x4=apprl; rt x6=w-apprr+ho; + x2=x5=x7=0.5[x4,x6]; + bot y1=bot y2=-d; y3=0; top y5=h+uo; bot y7=-oo; + y4=y6=0.5[y7,y5]; + tmp_path:=z1..z2 left_to_up z3..z4 up_to_right z5 + right_to_down z6 down_to_left z7 left_to_up z4; + hbbowl(z5,z4,z4,hthick) tmp_path; + hbbowl(z2,z3,z4,hthick) subpath (0,5) of tmp_path; + t=8+xpart(subpath (8,12) of tmp_path intersectiontimes bowl_path); + draw subpath (0,t) of tmp_path; + bbbowl(z5,z6,z7,hThick) tmp_path; + square_end1(right); + labels(1,2,3,4,5,6,7); + math_fit(0,0); +endchar; + +iff known bbvarsigma: +beginchar(bbvarsigma,7u#+2appr#,x_height#,desc_depth#); + "Lowercase Greek variant sigma"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; + top y1=h; y2=0.4[y3,y1]; bot y3=0; y4=0.5[y3,y5]; bot y5=-d; + rt x1=w-apprr; lft x2=apprl-ho; rt x4=w-apprr+ho; + x3=0.5[x2,x4]; x5=good.x(x3-0.5u); + tmp_path:=z1left_to_down z2 down_to_right + z3 right_to_down z4 down_to_left z5; + draw tmp_path; + bbbowl(z1,z2,z3,hThick) tmp_path; + bbbowl(z3,z4,z5,hThick) tmp_path; + square_end1(right); square_end5(left); + labels(1,2,3,4,5,6,7,8,9); + math_fit(0,0); +endchar; + +%beginchar(bbvarsigma,7u#+2appr#,x_height#,comma_size#-dot_size#); +% "Lowercase Greek variant sigma"; +% italcorr x_height#*slant-.5u#; +% pickup circle.nib; +% slope:=-x_height/30u; +% top y1'=top y2=h+oo; bot y8=bot y9'=-d; +% y5=good.y max(0.5thin,1/3[y8,y2]); +% rt x1=w-apprr; lft x3=apprl-ho; rt x7=w-apprr+ho; +% x2=x5=0.5[x3,x7]; x9=good.x(0.5[x3,x7]-0.5u); +% x8=0.4[x7,x9]; x1'=0.5[x1,x2]; x9'=0.5[x9,x8]; +% x10=x3+hThick; x12=x7-hThick; +% y1=good.y(y1'+slope*(x1-x1')); +% y9=good.y(y9'+slope*(x9-x9')); +% ellipse_set(2,3,4,5); ellipse_set(8,7,6,5); +% tmp_path:=z1{z1'-z1}...z2 left_to_down +% z3...z4---z6...z7 down_to_left z8...z9{z9-z9'}; +% z10=tmp_path intersectionpoint ((x10,y3)..(x10,y5)); +% z11=tmp_path intersectionpoint ((x10,y3)..(x10,y2)); +% z12=tmp_path intersectionpoint ((x12,y7)..(x12,y5)); +% z13=tmp_path intersectionpoint ((x12,y7)..(x12,y8)); +% draw tmp_path; draw z10..z11; draw z12..z13; +% square_end1(z1-z1'); square_end9(z9-z9'); +% labels(1,1',2,3,4,5,6,7,8,9,9',10,11,12,13); +% math_fit(0,0); +%endchar; + +iff known bbvarphi: +beginchar(bbvarphi,10u#+2appr#,x_height#,desc_depth#); + "Lowercase Greek variant phi"; + italcorr 0.6x_height#*slant+ho#-.5u#; + center_stem(1,2,5); bot y1=-d; y2=0.7[y5,y3]; + top y3=top y7=h+oo; y4=y6=0.5[y5,y3]; bot y5=-oo; + x3=0.3[x2,x4]; rt x4=w-apprr+ho; lft x6=apprl-ho; + rt x7=lft x1-hround 0.25u; + tmp_path:=z1..z2 up_to_right z3 right_to_down z4 + down_to_left z5 left_to_up z6 up_to_right z7; + draw tmp_path; + bbbowl(z7,z6,z5,hThick) tmp_path; + bbbowl(z3,z4,z5,hThick) tmp_path; + square_end1(down); + square_end7(right); + labels(1,2,3,4,5,6,7); + math_fit(0,0); +endchar; + +% Ionian extension +% (Carl B. Boyer, ``A History of Mathematics''; +% Yannis Haralambous and Claus Thull, +% ``Typesetting Modern Greek with 128 Character Codes''.) +% One should also cite Sylvio Levy for his talentuous work +% on Greek letters. + +iff known bbdigamma: +beginchar(bbdigamma,10u#+2appr#,x_height#,desc_depth#); + "Lowercase Ionian digamma"; + italcorr x_height#*slant+.5u#; + pickup circle.nib; + top y1=vround 0.9h; top y3=h+oo; bot y9=-oo; + y5=good.y 0.3[y9,y3]; y7=good.y 0.7[y9,y3]; + y4=0.42[y5,y3]; y8=.384[y7,y9]; y10=0.3[y9,y5]; + rt x1=w-apprr+hround u; lft x4=apprl-ho; + rt x8=w-apprr-hround u+ho; lft x10=x5; + x3=0.5[x4,x8]; z2=0.5[z1,z3]; x5=0.25[x4,x8]; + x7=0.75[x4,x8]; z6=0.5[z5,z7]; + tmp_path:=z1{left}...z2{(z3-z1) xscaled 0.5}...z3 + left_to_down z4 down_to_right z5...z6{(z6-z5) xscaled 1/3} + ...z7 right_to_down z8 & elliptic_arc(8,9,10); + x16=good.x x9; y16=-d; + penpos15(thin*(1++slant),0); penpos16(thin*(1++slant),0); + z15=tmp_path intersectionpoint (z16..(x16,y10)); + draw tmp_path; + bbbowl(z3,z4,z5,hThick) tmp_path; + bbbowl(z7,z8,z9,hThick) tmp_path; + penstroke z15e..z16e; + square_end1(right); square_end10(z10-z10'); + labels(1,2,3,4,5,6,7,8,9,10,10'); penlabels(15,16); + math_fit(0,0); +endchar; + +iff known bbkoppa: +beginchar(bbkoppa,8u#+2appr#,x_height#,desc_depth#); + "Lowercase Ionian koppa"; + italcorr 0.6x_height#*slant+ho#-.5u#; + center_stem(2,3); penpos2(thin*(1++slant),0); + penpos3(thin*(1++slant),0); y3=-d; y2=y1d; + bbcircle1(apprl-ho,w-apprr+ho,x_height+uo,-oo); draw last_path; + bbbowl(z1b,z1a,z1d,hThick) last_path; + bbbowl(z1b,z1c,z1d,hThick) last_path; + penstroke z2e..z3e; + penlabels(2,3); + math_fit(0,0); +endchar; + +% I won't use it, but I think it would have been nice +% that `koppa' looked as a reverse `rho'. +%beginchar(bbkoppa,8u#+2appr#,x_height#,desc_depth#); +% "Lowercase Ionian koppa"; +% italcorr 0.6x_height#*slant+ho#-.5u#; +% pickup circle.nib; numeric t; +% bot y2=bot y3=-d; top y5=h+uo; bot y7=-oo; y4=y6=0.5[y7,y5]; +% rt x4=rt x3=w-apprr; lft x6=apprl-ho; x5=x7=0.5[x4,x6]; +% x3-x2=hthick; x9-x6=hThick; +% tmp_path:=z3..z4 up_to_left z5 left_to_down +% z6 down_to_right z7 right_to_up z4; +% t=xpart(tmp_path intersectiontimes (z2..(x2,y4))); +% z8=point t of tmp_path; +% z1=tmp_path intersectionpoint ((x2,y4)..(x2,y5)); +% z9=tmp_path intersectionpoint ((x9,y7)..(x9,y6)); +% z10=tmp_path intersectionpoint ((x9,y6)..(x9,y5)); +% draw subpath (0,t) of tmp_path; draw z1..z2; draw z9..z10; +% pickup square.nib; draw z2..z3; +% penlabels(1,2,3,4,5,6,7,8,9,10); +% math_fit(0,0); +%endchar; + +iff known bbsampi: +beginchar(bbsampi,10u#+2appr#,asc_height#,0); + "Lowercase Ionian sampi"; + % no italic correction + x1=apprl; x5=w-apprr; + y2=y3=max(x_height,2h/3)-thin; y1=y4=y5=0; y6=y7=h; + numeric a,x,y; a=(abs(x5-x1)-2y2*slant)/(2y2); y=thick/(2y2); + x=thick*(-a*y+sqrt(1+(a**2)-(y**2)))/(1-(y**2)); + x3-x2=x5-x4=x7-x6=x; x2-x1=x4-x2; z6=whatever[z4,z2]; + a:=diag_width(thin,z2-z4); + penpos1(diag_width(thin,z2-z1),0); + penpos4(a,0); penpos5(a,0); penpos6(a,0); penpos7(a,0); + y6-y6a=thin; z6-z6a=z7-z7a=z4a-z4=z5a-z5=whatever*(z6-z4); + z8=0.5[z1,z4]; z9=0.5[z2,z4]; penpos8(diag_width(thin,z9-z8),0); + forsuffixes $=l,r: + z2$-z1$=whatever*(z2-z1); z2$=whatever[z2,z4]; + z9$=whatever[z4,z6]; z9$-z8$=whatever*(z9-z8); + endfor + penstroke z1e..z2e; penstroke z4e..z6e; penstroke z5e..z7e; + penstroke z8e..z9e; + fill z4--z5--z5a--z4a--cycle; fill z6--z7--z7a--z6a--cycle; + penlabels(1,2,3,4,5,6,7,8,9); labels(4a,5a,6a,7a); + math_fit(0,0); +endchar; + +iff known bbvardigamma: +beginchar(bbvardigamma,7.5u#+2appr#,x_height#,desc_depth#); + "Lowercase Ionian variant digamma"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; rt x1=w-apprr; lft x2=lft x3=apprl; + x4=x5=x3+hthick; lft x6=x4; rt x7=w-apprr-hround u; + top y1=top y2=top y5=h; bot y3=bot y4=-d; + bot y6=bot y7=vround 0.5(h-d); pickup square.nib; + draw z1--z2--z3--z4--z5; draw z6..z7; + labels(1,2,3,4,5,6,7); + math_fit(0,0); +endchar; + +iff known bbvarkoppa: +beginchar(bbvarkoppa,8u#+2appr#,asc_height#,desc_depth#); + "Lowercase Ionian variant koppa"; + italcorr 0.4[asc_height#,-desc_depth#]*slant-.5u#; + pickup circle.nib; + y4r=vround 0.4[-d,h]; y5l+d=h-y4r; + bot y1=bot y4=y4r; top y2=top y3=h; + top y5=top y6=y5l; bot y7=bot y8=-d; + lft x1=lft x2=apprl; rt x6=rt x7=w-apprr; + x4-x1=x3-x2=x6-x5=x7-x8=hthick; x4r=rt x4; x5l=lft x5; + adjust_slanted_bar(4r,5l,4l,5r)(thin,1); + penstroke z4e..z5e; pickup square.nib; + draw z1--z2--z3--z4--cycle; draw z5--z6--z7--z8--cycle; + labels(1,2,3,6,7,8); penlabels(4,5); + math_fit(0,0); +endchar; + +iff known bbslash_lambda: +beginchar(bbslash_lambda,9u#+2appr#,asc_height#,0); + "Slashed lowercase Greek lambda"; + italcorr x_height#*slant-.5u#; + x1=x8=apprl; x5=x11=w-apprr; + y2+0.5thin=y3+0.5thin=y8r=y11r=max(x_height,0.6h); + y1=y4=y5=0; y6=y7=h; + numeric a,x,y; a=(abs(x5-x1)-2y2*slant)/(2y2); y=thick/(2y2); + x=thick*(-a*y+sqrt(1+(a**2)-(y**2)))/(1-(y**2)); + x3-x2=x5-x4=x7-x6=x; x2-x1=x4-x2; z6=whatever[z4,z2]; + a:=diag_width(thin,z2-z4); + penpos1(diag_width(thin,z2-z1),0); + penpos4(a,0); penpos5(a,0); penpos6(a,0); penpos7(a,0); + forsuffixes $=r,l: + z2$-z1$=whatever*(z2-z1); z2$=whatever[z2,z4]; + endfor + y6-y6a=thin; z6-z6a=z7-z7a=z4a-z4=z5a-z5=whatever*(z6-z4); + penpos8(thin,90); penpos11(thin,90); + forsuffixes $=,r,l: + y8$=y9$=y10$; z9$=whatever[z4,z6]; z10$=whatever[z5,z7]; + endfor + penstroke z1e..z2e; penstroke z4e..z6e; penstroke z5e..z7e; + penstroke z8e..z9e; penstroke z10e..z11e; + fill z4--z5--z5a--z4a--cycle; fill z6--z7--z7a--z6a--cycle; + penlabels(1,2,3,4,5,6,7,8,9,10,11); labels(4a,5a,6a,7a); + math_fit(0,0); +endchar;
\ No newline at end of file diff --git a/fonts/mbboard/source/mbbgrkup.mf b/fonts/mbboard/source/mbbgrkup.mf new file mode 100644 index 0000000000..c1c9ceb4f1 --- /dev/null +++ b/fonts/mbboard/source/mbbgrkup.mf @@ -0,0 +1,599 @@ +% 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 x4a<x6: z4=z4a; else: x4=x6; z4=whatever[z3,z4a]; fi + ortho_penpos4(thin,z4-z3); ortho_penpos8(thin,z8-z7); + z8r-z7r=whatever*(z8-z7); z8l-z7l=whatever*(z8-z7); + z4r-z3r=whatever*(z4-z3); z4l-z3l=whatever*(z4-z3); + penstroke z2e--z3e--z4e; penstroke z6e--z7e--z8e; + pickup square.nib; draw z1..z2; draw z5..z6; + labels(1,5,4a,8a); penlabels(2,3,4,6,7,8); + math_fit(0,0.5ic#); +endchar; + +iff known bbOmicron: +beginchar(bbOmicron,13u#+2appr#,cap_height#,0); + "Uppercase Greek Omicron"; + 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; + bbbowl(z1b,z1c,z1d,hThick) last_path; + math_fit(-0.4cap_height#*slant,ic#); +endchar; + +beginchar(bbPi,11u#+2Appr#,cap_height#,0); + "Uppercase Greek Pi"; + 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 z1--z2--z3--z4--z5--z6--z7--z8; + labels(1,2,3,4,5,6,7,8); + math_fit(0,0.5ic#); +endchar; + +iff known bbRho: +beginchar(bbRho,10.15u#+Appr#+appr#,cap_height#,0); + "Uppercase Greek Rho"; + italcorr 0.8cap_height#*slant-0.5u#; + pickup circle.nib; + lft x1=lft x3=Apprl; rt x6=w-apprr; x2-x1=x4-x3=hthick; + x5=0.50[x1,x6]; x7=0.50[x1,x6]; x8=x2; + bot y1=bot y2=0; top y3=top y4=top y5=h; + bot y7=bot y8=vround 0.4h; y6=0.5[y5,y7]; + tmp_path:=z3..z5 right_to_down z6 down_to_left z7..z8; + draw tmp_path; + bbbowl(z5,z6,z7,hThick) tmp_path; + pickup square.nib; draw z4--z2--z1--z3; + labels(1,2,3,4,5,6,7,8); + math_fit(0,0.4cap_height#*slant-u#); +endchar; + +beginchar(bbXi,11u#+2appr#,cap_height#,0); + "Uppercase Greek Xi"; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + lft x1=apprl; top y1=h; rt x2=w-apprr; y2=y1; bot y3=0; x3=x1; + x4=x2; y4=y3; bot y5=bot y6=floor 0.5h; + lft x5-apprl=w-apprr-rt x6=hround u; + pickup square.nib; draw z1..z2; draw z3..z4; draw z5..z6; + labels(1,2,3,4,5,6); + math_fit(0,0); +endchar; + +beginchar(bbSigma,11.5u#+2appr#,cap_height#,0); + "Uppercase Greek Sigma"; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + x1=x3=w-apprr; top y1=h; y2=y1; x2=x4=apprl; bot y3=0; y4=y3; + penpos1(thin,90); penpos2(thin,90); + penpos3(thin,90); penpos4(thin,90); + z0=(floor(2/3[x2,x1])+0.5,floor(h/2)+0.5); + z5l=z4r; z6r=z0; adjust_slanted_bar(5l,6r,5r,7)(thin,-1); + z8l=z2l; z11r=z0; adjust_slanted_bar(8l,11r,9r,12)(thin+thick,1); + z6l=whatever[z5l,z7]; z6l=whatever[z9r,z11r]; + a:=diag_width(thin,z9r-z11r); + penpos8(a,0); penpos9(a,0); + z10l=whatever[z8l,z12]; z10l=whatever[0.5[z5l,z5r],0.5[z6l,z6r]]; + z10r=z8r+whatever*(z8l-z12); z10r=whatever[0.5[z5l,z5r],0.5[z6l,z6r]]; + z11l=z9l+whatever*(z8l-z12); z11l=whatever[z5r,z6r]; + penstroke z1e..z2e; penstroke z3e..z4e; penstroke z5e..z6e; + penstroke z8e..z10e; penstroke z9e..z11e; + penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); + math_fit(0,0); +endchar; + +iff known bbTau: +beginchar(bbTau,10.2u#+2appr#,cap_height#,0); + "Uppercase Greek Tau"; + italcorr cap_height#*slant; + center_bar(1,2); bot y1=bot y2=0; top y5=top y6=h; + lft x5=apprl-hround 0.5u; rt x6=w-apprr+hround 0.5u; + z3=(x1,y5); z4=(x2,y5); pickup square.nib; + draw z5..z6; draw z3--z1--z2--z4; labels(1,2,3,4,5,6); + math_fit(-0.5cap_height#*slant, + cap_height#*slant-2.5u#); +endchar; + +iff known bbUpsilon: +beginchar(bbUpsilon,11u#+2appr#,cap_height#,0); + "Uppercase Greek Upsilon"; + italcorr cap_height#*slant; + center_bar(6,3); x3=x4; x5=x6; + lft x1=apprl-hround 0.5u; rt x9=w-apprr+hround 0.5u; + x7=0.15[x1,x6]; x8=0.15[x9,x3]; x3-x2=x5-x7; + bot y4=bot y5=0; y3=y6=0.6h; top y1=h; + y1=y2=y7=y8=y9; + draw z1..z2 right_to_down z3..z4; + draw z1..z7 right_to_down z6..z5; + draw z9..z8 left_to_down z3; + pickup square.nib; draw z4..z5; + square_end1(left); + square_end9(right); + labels(1,2,3,4,5,6,7,8,9); + math_fit(-0.5cap_height#*slant+0.5u#,cap_height#*slant-2.5u#); +endchar; + +% a modifier +iff known bbvarUpsilon: +beginchar(bbvarUpsilon,10.2u#+2appr#,cap_height#,0); + "Uppercase Greek variant Upsilon"; + italcorr cap_height#*slant-0.5u#; + center_bar(3,4); bot y3=bot y4=-d; + x3l=apprl+hround(0.5(w-apprr-apprl-hthick-thin*(1++slant))); + x4l-x3l=hround(hthick+thin*(1++slant)); + x3r-x3l=x4l-x4r=thin*(1++slant); + y4l=y3l=-d; y3r-y3l=y4r-y4l=thin; + y1=y6=y7r=h; x1=apprl; x7r=w-apprr; + x2=x3; y2=y5a=0.5h; x6-x1=x5a-x2=diag_width(thick,z1-z2); + a:=diag_width(thin,z1-z2); + penpos1(a,0); penpos6(a,180); z8=z5; + forsuffixes $=,r,l: x5$=x4$; z5$-z6$=whatever*(z2-z1); endfor + forsuffixes $=r,l: x2$=x3$; z2$-z1$=whatever*(z2-z1); endfor + y1-y1a=y6-y6a=thin; z1a=whatever[z1,z2]; z6a=whatever[z6,z5a]; + adjust_slanted_bar(7r,8,7,8a)(0.5thin,-1); z7-z7l=z7r-z7; + ortho_penpos8(thin,z7-z8); + penstroke z1e--z2e--z3e--z4e--z5e--z6e; + fill z1--z6--z6a--z1a--cycle; penstroke z7e..z8e; + penlabels(1,2,3,4,5,6,7,8,9,10); labels(1a,5a,6a,8a); + math_fit(0,0); +endchar; + +beginchar(bbPhi,13u#+2appr#,cap_height#,0); + "Uppercase Greek Phi"; + italcorr 0.6cap_height#*slant-0.5u#; + center_bar(1,2); x1=x3; x2=x4; + lft x6=apprl; rt x9=w-apprr; x5=x7=x1; x8=x10=x2; + bot y1=bot y2=0; top y3=top y4=h; y6=y9=0.5[y5,y7]; + top y7=top y10=vround(0.85h); bot y5=bot y8=vround(0.15h); + tmp_path:=z5 left_to_up z6 up_to_right z7; + tmpp_path:=z8 right_to_up z9 up_to_left z10; + draw tmp_path; draw tmpp_path; + bbbowl(z7,z6,z5,hThick) tmp_path; + bbbowl(z10,z9,z8,hThick) tmpp_path; + pickup square.nib; draw z1--z2--z4--z3--cycle; + labels(1,2,3,4,5,6,7,8,9,10); + math_fit(0,0); +endchar; + +iff known bbChi: +beginchar(bbChi,12u#+2appr#,cap_height#,0); + "Uppercase Greek Chi"; + italcorr cap_height#*slant-0.5u#; + complete_X(0.375u); + math_fit(0,0); +endchar; + +beginchar(bbPsi,12u#+2appr#,cap_height#,0); + "Uppercase Greek Psi"; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + center_bar(1,2); x5=x3=x1; x9=x4=x2; + lft x6=lft x7=apprl; rt x10=rt x11=w-apprr; + bot y1=bot y2=0; top y3=h; y3=y4=y7=y11; + bot y5=bot y9=vround 0.3h; y6=y10=0.5[y5,y7]; + tmp_path:=z5 left_to_up z6..z7; + tmpp_path:=z9 right_to_up z10..z11; + draw tmp_path; draw tmpp_path; + hbbowl(z5,z6,z7,hthick) tmp_path; z8=z.bowl.bot; + hbbowl(z9,z10,z11,hthick) tmpp_path; z12=z.bowl.bot; + pickup square.nib; draw z1--z2--z4--z3--cycle; + draw z7..z8; draw z11..z12; + labels(1,2,3,4,5,6,7,8,9,10,11,12); + math_fit(0,0); +endchar; + +beginchar(bbOmega,13u#+2appr#,cap_height#,0); + "Uppercase Greek Omega"; + italcorr 0.6cap_height#*slant-0.5u#; + pickup circle.nib; + z0=(-20u,h); + y1l=y2l=y11l=y10l=0; + 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]; + top y6=h+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 up_to_right z6 + right_to_down 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<x8: z14=whatever[z8,z9]; + else: z14=tmp_path intersectionpoint ((x14,y11)..(x14,y7)); fi + z13=tmp_path intersectionpoint ((x12,y5)..(x12,y6)); + z15=tmp_path intersectionpoint ((x14,y7)..(x14,y6)); + draw tmp_path; draw z12..z13; draw z14..z15; + penstroke z1e..z2e; penstroke z3e..z4e; + penstroke z8e..z9e; penstroke z10e..z11e; + penlabels(1,2,3,4,8,9,10,11); labels(5,6,,7,12,13,14,15); + math_fit(0,0); +endchar; + +% Ionian extension +% (Carl B. Boyer, ``A History of Mathematics''; +% Yannis Haralambous and Claus Thull, +% ``Typesetting Modern Greek with 128 Character Codes''.) + +iff known bbDigamma: +beginchar(bbDigamma,7.5u#+Appr#+appr#,cap_height#,0); + "Uppercase Ionian Digamma"; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; rt x1=w-apprr; lft x2=lft x3=Apprl; + x4=x5=x3+hthick; lft x6=x4; rt x7=w-apprr-hround 0.7u; + top y1=top y2=top y5=h; bot y3=bot y4=0; + y6=y7=good.y 0.5h; pickup square.nib; + draw z1--z2--z3--z4--z5; draw z6..z7; + labels(1,2,3,4,5,6,7); + math_fit(0,max(0.5cap_height#*slant-0.7u#,0)); +endchar; + +iff known bbKoppa: +beginchar(bbKoppa,10.15u#+Appr#+appr#,cap_height#,0); + "Uppercase Ionian Koppa"; + italcorr cap_height#*slant-u#; + pickup circle.nib; + rt x1=rt x3=w-Apprr; lft x6=apprl; x2-x1=x4-x3=-hthick; + x5=0.5[x1,x6]; x7=0.5[x1,x6]; x8=x2; + bot y1=bot y2=0; top y3=top y4=top y5=h; + bot y7=bot y8=vround 0.4h; y6=0.5[y5,y7]; + tmp_path:=z3..z5 right_to_down z6 down_to_left z7..z8; + draw tmp_path; + bbbowl(z5,z6,z7,hThick) tmp_path; + pickup square.nib; + draw z4--z2--z1--z3; labels(1,2,3,4,5,6,7,8); + math_fit(-0.5cap_height#*slant,0.5ic#); +endchar; + +iff known bbSampi: +beginchar(bbSampi,13u#+2appr#,cap_height#,0); + "Uppercase Ionian Sampi"; + % no italic correction + complete_AV(1,apprl-0.5u,w-apprr+0.5u); + z7=0.5[z5,z2]; z8=0.5[z5,z1]; + penpos8(diag_width(thin,z7-z8),0); + z7l=whatever[z2,z5]; z7r=whatever[z2,z5]; + z7l-z8l=whatever*(z7-z8); z7r-z8r=whatever*(z7-z8); + penstroke z7e..z8e; penlabels(7,8); + math_fit(0,0); +endchar; + +% Esoteric characters based on Greek designs. + +% I've meet the following character in: +% Rogers (L. C. G.), Williams (D.), +% "Diffusions, Markov Processes and Martingales", +% Vol. 1, 2nd Edition, Wiley (1994), p. 74--77 +% (very good book), +% where it appears in Times roman or Times greek. +% I suppose it's the Greek version of the dollar sign. + +iff known bbslash_Sigma: +beginchar(bbslash_Sigma,11.5u#+2appr#, + cap_height#+0.5desc_depth#,0.5desc_depth#); + "The slashed letter Sigma"; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + x1=x3=w-apprr; top y1=cap_height; y2=y1; + x2=x4=apprl; bot y3=0; y4=y3; + penpos1(thin,90); penpos2(thin,90); + penpos3(thin,90); penpos4(thin,90); + z0=(floor(2/3[x2,x1])+0.5,floor(0.5cap_height)+0.5); + z5l=z4r; z6r=z0; adjust_slanted_bar(5l,6r,5r,7)(thin,-1); + z8l=z2l; z11r=z0; adjust_slanted_bar(8l,11r,9r,12)(thin+thick,1); + z6l=whatever[z5l,z7]; z6l=whatever[z9r,z11r]; + z5=0.5[z5l,z5r]; + a:=diag_width(thin,z9r-z11r); + penpos8(a,0); penpos9(a,0); + z10l=whatever[z8l,z12]; z10l=whatever[0.5[z5l,z5r],0.5[z6l,z6r]]; + z10r=z8r+whatever*(z8l-z12); z10r=whatever[0.5[z5l,z5r],0.5[z6l,z6r]]; + z11l=z9l+whatever*(z8l-z12); z11l=whatever[z5r,z6r]; + penstroke z1e..z2e; penstroke z3e..z4e; penstroke z5e..z6e; + penstroke z8e..z10e; penstroke z9e..z11e; + x13=x14=x15=x16=good.x 0.5[x1,x2]; + top y13=h; bot y16=-d; z15=whatever[z5,0.5[z0,z6l]]; + if x9>x14: 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<x8: z14=whatever[z8,z9]; + else: z14=tmp_path intersectionpoint ((x14,y11)..(x14,y7)); fi + z13=tmp_path intersectionpoint ((x12,y5)..(x12,y6)); + z15=tmp_path intersectionpoint ((x14,y7)..(x14,y6)); + draw tmp_path; draw z12..z13; draw z14..z15; + penstroke z1e..z2e; penstroke z3e..z4e; + penstroke z8e..z9e; penstroke z10e..z11e; + penlabels(1,2,3,4,8,9,10,11); labels(5,6,,7,12,13,14,15); + math_fit(-0.4cap_height#*slant,ic#); +endchar; diff --git a/fonts/mbboard/source/mbbheb10.mf b/fonts/mbboard/source/mbbheb10.mf new file mode 100644 index 0000000000..192eaca1e6 --- /dev/null +++ b/fonts/mbboard/source/mbbheb10.mf @@ -0,0 +1,27 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbheb10.mf (parameters' file for 10 points Hebrew fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbbheb"; font_size 10pt#; + +slant:=0; +square_dots:=false; +math_fitting:=false; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=true; square_hebrew:=false; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +input mbbhebdr; + + + + + + + + diff --git a/fonts/mbboard/source/mbbhebdr.mf b/fonts/mbboard/source/mbbhebdr.mf new file mode 100644 index 0000000000..d182e26324 --- /dev/null +++ b/fonts/mbboard/source/mbbhebdr.mf @@ -0,0 +1,79 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbhebdr.mf (Hebrew driver file) +% last modification: 25.10.2001. + +mode_setup; font_setup; +font_coding_scheme:="mbb Hebrew font"; +% well... or not well at all + +% Activate to allow characters with undefined code. +% (for proof mode compilation) + +%let iff=always_iff; + +% hebrew encoding + +numeric bbhebr[],bbhebvow[],bbhebmas[]; +for i=0 upto 26: bbhebr[i]=hex"50"+i; endfor +for i=27 upto 31: bbhebr[i]=hex"70"+i-27; endfor +% go up to 29 to add ligatures +% ligtable bbhebr[5]: bbhebr[5]=:bbhebr[27]; +% ligtable bbhebr[9]:bbhebr[5]=:bbhebr[28],bbhebr[9]=:bbhebr[29]; +for i=0 upto 31: bbhebmas[i]=hex"10"+i; endfor +for i=0 upto 20: bbhebvow[i]=hex"30"+i; endfor +% symbols encoding + +bbshereq:=hex"6F"; + +% let the show begin : + +dagesh_accent:=hex"10"; +ligtable dagesh_accent: +bbhebr[0]=:bbhebr[0]+48, +bbhebr[1]=:bbhebr[1]+48, +bbhebr[2]=:bbhebr[2]+48, +bbhebr[3]=:bbhebr[3]+48, +bbhebr[4]=:bbhebr[4]+48, +bbhebr[5]=:bbhebr[5]+48, +bbhebr[6]=:bbhebr[6]+48, +bbhebr[7]=:bbhebr[7]+48, +bbhebr[8]=:bbhebr[8]+48, +bbhebr[9]=:bbhebr[9]+48, +bbhebr[10]=:bbhebr[10]+48, +bbhebr[11]=:bbhebr[11]+48, +bbhebr[12]=:bbhebr[12]+48, +bbhebr[13]=:bbhebr[13]+48, +bbhebr[14]=:bbhebr[14]+48, +bbhebr[15]=:bbhebr[15]+48, +bbhebr[16]=:bbhebr[16]+48, +bbhebr[17]=:bbhebr[17]+48, +bbhebr[18]=:bbhebr[18]+48, +bbhebr[19]=:bbhebr[19]+48, +bbhebr[20]=:bbhebr[20]+48, +bbhebr[21]=:bbhebr[21]+48, +bbhebr[22]=:bbhebr[22]+48, +bbhebr[23]=:bbhebr[23]+48, +bbhebr[24]=:bbhebr[24]+48, +bbhebr[25]=:bbhebr[25]+48, +bbhebr[26]=:bbhebr[26]+48; + +input mbbsymbl; +input mbbhebrw; +dagesh_mark:=true; +for i=0 upto 26: bbhebr[i]:=hex"80"+i; endfor +input mbbhebrw; +input mbbhebvw; +input mbbhebma; +%input mbbextra; + +% parameters for TFM files. + +font_slant=slant; +font_x_height=x_height#; +font_normal_stretch=3u#; +font_normal_shrink=2u#; +font_quad=18u#+4letter_fit#; +font_extra_space=2u#; +font_normal_space=6u#+2letter_fit#; + +end. diff --git a/fonts/mbboard/source/mbbhebma.mf b/fonts/mbboard/source/mbbhebma.mf new file mode 100644 index 0000000000..8da46c5770 --- /dev/null +++ b/fonts/mbboard/source/mbbhebma.mf @@ -0,0 +1,349 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbhebma.mf (Hebrew masoteric accents) +% last modification: 25.10.2001. + +diacritics_proofing;% changes extra_endchar for proof mode. + +def horizontal_rules_list= + -body_depth,-paren_depth,-desc_depth, + x_height,cap_height,asc_height,body_height +enddef; + +use_rule1; + +beginchar(bbhebmas[1],8u#+2appr#,0,bot_skip#+ + if square_dots: heb_size1# else: heb_size2# fi); + "Hebrew accent etnahta"; + if square_dots: + if not(odd(w-apprl-apprr)): change_width; fi + x2r=0.5[apprl,w-apprr]; x3r-x1r=hround 6u; 0.5[x3r,x1r]=x2r; + y2r=-bot_skip+0.5; y1r=y3r=-d; + z1l-z1r=(diag_width(thin,z2r-z1r),0); + z3l-z3r=(-diag_width(thin,z2r-z3r),0); + z2l-z1l=whatever*(z2r-z1r); z2l-z3l=whatever*(z2r-z3r); + penstroke z1e--z2e--z3e; penlabels(1,2,3); + else: center_stem(2,4); top y4=-bot_skip; bot y1=bot y3=-d; + y2=good.y 0.5[y4,y1]; x2-x1=x3-x2=hround 3u; + draw z1 up_to_right z2 right_to_down z3; draw z2..z4; + square_end1(down); square_end3(down); + square_end4(up); labels(1,2,3,4); + fi +endchar; + +beginchar(bbhebmas[2],8u#+2appr#,x_height#+top_skip#+heb_size2#,0); + "Hebrew accent segol"; + center_bar(3,3'); + lft x1-apprl=w-apprr-rt x2'=hround 0.5u; x1'-x1=x2'-x2=hthick; + bot y1=top y3'-heb_size2=x_height+top_skip; y2=y1; + top y1'-bot y1=top y2'-bot y2=top y3'-bot y3=dot_size; + dot(1,1'); dot(2,2'); dot(3,3'); +endchar; + +beginchar(bbhebmas[3],8u#+2appr#,x_height#+top_skip#+heb_size2#,0); + "Hebrew accent shalshelet"; + numeric a,b; a=vround 0.2(heb_size2-2thin); + b=hround max(3thin,4u); + x1l=x1r=x3l=x5l=hround(0.5[apprl,w-apprr]-0.5b); + x2r=x4r=x6r=x6l=x1l+b; x7l=x7r=x6r+hround 0.5u; + y2r-y1l=y3l-y2r=y4r-y3l=y5l-y4r=y6r-y5l=a; + y1l=x_height+top_skip+thin+0.5; + adjust_slanted_bar(1l,2r,1a,2b)(thin,-1); + adjust_slanted_bar(2r,3l,2a,3b)(thin,1); + adjust_slanted_bar(3l,4r,3a,4b)(thin,-1); + adjust_slanted_bar(4r,5l,4a,5b)(thin,1); + adjust_slanted_bar(5l,6r,5a,6b)(thin,-1); + z1r=whatever[z1a,z2r]; + z2l=whatever[z1l,z2b]; z2l=whatever[z3l,z2a]; + z3r=whatever[z2r,z3b]; z3r=whatever[z4r,z3a]; + z4l=whatever[z3l,z4b]; z4l=whatever[z5l,z4a]; + z5r=whatever[z4r,z5b]; z5r=whatever[z6r,z5a]; + z6l=whatever[z5l,z6b]; + z7r=whatever[z5r,z6r]; z7l=whatever[z5l,z6l]; + penstroke z1e--z2e--z3e--z4e--z5e--z7e; + penlabels(1,2,3,4,5,6,7); + labels(1a,2a,2b,3a,3b,4a,4b,5a,5b,6b); +endchar; + +beginchar(bbhebmas[4],8u#+2appr#,x_height#+top_skip#+heb_size2#,0); + "Hebrew accent zaqef qatan"; + center_bar(1,1'); x2=x1; x2'=x1'; + bot y1=top y2'-heb_size2=x_height+top_skip; + top y1'-bot y1=top y2'-bot y2=dot_size; + dot(1,1'); dot(2,2'); +endchar; + +beginchar(bbhebmas[5],8u#+2appr#,x_height#+top_skip#+heb_size2#,0); + "Hebrew accent zaqef gadol"; + pickup circle.nib; a:=max(u,1.5thin,0.5(hthick+thin)); + lft x1=lft x2=vround(0.5[apprl,w-apprr]+a-0.5(hthick+thin)); + x3=x4=good.x(0.5[apprl,w-apprr]-a); x1'-x1=x2'-x2=hthick; + bot y1=top y4-heb_size2=x_height+top_skip; y1=y3; y2'=y4; + top y1'-bot y1=top y2'-bot y2=dot_size; dot(1,1'); dot(2,2'); + pickup square.nib; draw z3..z4; labels(3,4); +endchar; + +beginchar(bbhebmas[6],8u#+2appr#,0,top_skip#+heb_size1#); + "Hebrew accent tipeha"; + complete_hebrew_club(0.5[apprl,w-apprr],-bot_skip,-d,1); +endchar; + +% okay sauf la hauteur. +beginchar(bbhebmas[7],8u#+2appr#,x_height#+top_skip#+dot_size#,0); + "Hebrew accent revia"; + if not(odd(w-apprl-apprr)): change_width; fi + x0=0.5[apprl,w-apprr]; + y0=x_height+top_skip+vround 0.5dot_size+0.5; + x3r-x1r=sqrt 2*(thick+thin)*(1++slant); + y2r-y4r=sqrt2*dot_size; + x0=x2r=x4r=0.5[x3r,x1r]; y0=y1r=y3r=0.5[y2r,y4r]; + z1a-z1r=(diag_width(thin,z2r-z1r),0); + z1b-z1r=(diag_width(thin,z4r-z1r),0); + z3a-z3r=(-diag_width(thin,z2r-z3r),0); + z3b-z3r=(-diag_width(thin,z4r-z3r),0); + z2l-z1a=whatever*(z2r-z1r); z2l-z3a=whatever*(z2r-z3r); + z4l-z1b=whatever*(z4r-z1r); z4l-z3b=whatever*(z4r-z3r); + z2l-z1l=whatever*(z2r-z1r); z4l-z1l=whatever*(z4r-z1r); + z2l-z3l=whatever*(z2r-z3r); z4l-z3l=whatever*(z4r-z3r); + penstroke z1e--z2e--z3e--z4e--cycle; + penlabels(1,2,3,4,1',2',3',4'); labels(1a,1b,2a,2b); +endchar; + +beginchar(bbhebmas[8],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent zarqa"; + pickup circle.nib; + a:=max(6u,5thin); + bot y1=x_height+top_skip; y1=y6; top y8=h; y8=y3; + y0=y2=y7=0.5[y1,y8]; rt x7=hround(0.5[apprl,w-apprr]-0.5a); + rt x7-lft x2=hround a; x0=0.5[x2,x7]; slope:=-heb_size1/2u; + hellipse_set(2,3,4,0); hellipse_set(7,6,5,0); + x1=good.x x3; x8=good.x x6; + draw z1 left_to_up z2 up_to_right z3...z4---z5 + ...z6 right_to_up z7 up_to_left z8; + square_end1(right); square_end8(left); + labels(0,1,2,3,4,5,6,7,8); +endchar; + +beginchar(bbhebmas[9],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent pashta"; + complete_hebrew_club(apprl,x_height+top_skip,h,-1); +endchar; + +% almost okay +beginchar(bbhebmas[10],8u#+2appr#,0,bot_skip#+heb_size1#); + "Hebrew accent yetiv"; + y2r=0.5[y1,y3]=-vround(0.5[bot_skip,d])-0.5; y1-y3=heb_size1; + x1=w-apprr+hround u; x1-x2r=hround 6u; x1=x1r=x3=x3r; + adjust_slanted_bar(2r,1,2a,1a)(0.5(thin),-1); + adjust_slanted_bar(2r,3,2b,3b)(0.5(thin),1); + z1r=whatever[z2r,z1a]; z3r=whatever[z2r,z3b]; + z1r-z1=z1-z1l; z3r-z3=z3-z3l; + z2l-z1l=whatever*(z2r-z1r); z2l-z3l=whatever*(z2r-z3r); + penstroke z1e--z2e--z3e; + penlabels(1,2,3); labels(1a,2a,2b,3b); +endchar; + +beginchar(bbhebmas[11],8u#+2appr#,0,bot_skip#+heb_size1#); + "Hebrew accent tevir"; + pickup circle.nib; + complete_hebrew_club(0.5[apprl,w-apprr], + -bot_skip,-bot_skip-heb_size1,-1); + top y4'=-bot_skip; top y4'-bot y4=dot_size; + lft x4=x1l; x4'-x4=hthick; dot(4,4'); +endchar; + +beginchar(bbhebmas[12],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent geresh"; + complete_hebrew_club(0.5[apprl,w-apprr],x_height+top_skip,h,1); +endchar; + +beginchar(bbhebmas[13],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent geresh muqdam"; + complete_hebrew_club(w-apprr,x_height+top_skip,h,1); +endchar; + +beginchar(bbhebmas[14],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent gershayim"; + a:=0.5max(5u,1.5hthick+thin,3thin)+1.5u; + complete_hebrew_club(0.5[apprl,w-apprr]-0.5a,x_height+top_skip,h,1); + complete_hebrew_club'(0.5[apprl,w-apprr]+0.5a,x_height+top_skip,h,1); +endchar; + +beginchar(bbhebmas[15],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent qarney para"; + pickup circle.nib; + a:=hround max(5u,hthick*sqrt 2+thin+dot_skip); + x2=hround(0.5[apprl,w-apprr]+0.5a); x2-x8=a; + 0.5[x1,x3]=x2=x4; 0.5[x7,x9]=x8=x10; + x1-x3=x7-x9=2hround(hthick/sqrt 2)+2eps; + top y2=h+o; 0.5[y2,y4]=y1=y3=y7=y9; y8=y2; y10=y4; + top y2-bot y4=2vround(dot_size/sqrt 2)+2eps; + tmp_path:=superellipse(z1,z2,z3,z4,superness); + tmpp_path:=superellipse(z7,z8,z9,z10,superness); + y6=x_height+top_skip; x6=0.5[x2,x8]; + z5=tmp_path intersectionpoint ((x2,y1)..z6); + z11=tmpp_path intersectionpoint ((x8,y7)..z6); + ortho_penpos5(thin,z6-z5); ortho_penpos11(thin,z11-z6); + z6r-z5r=whatever*(z6-z5); z6r-z11r=whatever*(z6-z11); + z6l-z5l=whatever*(z6-z5); z6l-z11l=whatever*(z6-z11); + draw tmp_path; draw tmpp_path; penstroke z5e--z6e--z11e; + labels(1,2,3,4,7,8,9,10); penlabels(5,6,11); +endchar; + +beginchar(bbhebmas[16],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent telisha gedola"; + pickup circle.nib; + 0.5[x1,x3]=x2=x4=w-apprr; x1-x3=2hround(hthick/sqrt 2)+2eps; + top y2=h+o; 0.5[y2,y4]=y1=y3; + top y2-bot y4=2vround(dot_size/sqrt 2)+2eps; + tmp_path:=superellipse(z1,z2,z3,z4,superness); + y6=x_height+top_skip; rt x1-x6=5u; + z5=tmp_path intersectionpoint ((x2,y1)..z6); + ortho_penpos5(thin,z6-z5); + z6r-z6=z6-z6l=whatever*((z6-z5)rotated 90); + z6r-z5r=whatever*(z6-z5); + draw tmp_path; penstroke z5e..z6e; + labels(1,2,3,4); penlabels(5,6); +endchar; + +beginchar(bbhebmas[17],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent pazer"; + a:=hround max(3thin,4u); + lft x2=hround(0.5[apprl,w-apprr]-0.5a); x2=x3=x4; rt x1-lft x2=a; + bot y3=x_height+top_skip; y4-y1=y1-y3; + y1=y2=good.y(x_height+top_skip+0.5heb_size1); + pickup square.nib; draw z1..z2; draw z3..z4; labels(1,2,3,4); +endchar; + +beginchar(bbhebmas[19],8u#+2appr#,0,bot_skip#+heb_size1#); + "Hebrew accent munah"; + pickup circle.nib; + a:=hround max(3thin,4u); + rt x2=rt x3=hround(0.5[apprl,w-apprr]+0.5a); rt x2-lft x1=a; + top y3=-bot_skip; bot y1=bot y2=-d; + pickup square.nib; draw z1--z2--z3; labels(1,2,3); +endchar; + +beginchar(bbhebmas[20],8u#+2appr#,0,bot_skip#+heb_size1#); + "Hebrew accent mahapakh"; + y2r=0.5[y1,y3]=-vround(0.5[bot_skip,d])-0.5; y1-y3=heb_size1; + x1=hround(0.5[apprl,w-apprr]+3u); x1-x2r=hround 6u; x1=x1r=x3=x3r; + adjust_slanted_bar(2r,1,2a,1a)(0.5(thin),-1); + adjust_slanted_bar(2r,3,2b,3b)(0.5(thin),1); + z1r=whatever[z2r,z1a]; z3r=whatever[z2r,z3b]; + z1r-z1=z1-z1l; z3r-z3=z3-z3l; + z2l-z1l=whatever*(z2r-z1r); z2l-z3l=whatever*(z2r-z3r); + penstroke z1e--z2e--z3e; + penlabels(1,2,3); labels(1a,2a,2b,3b); +endchar; + +beginchar(bbhebmas[21],8u#+2appr#,0,bot_skip#+heb_size1#); + "Hebrew accent merkha"; + complete_hebrew_club(0.5[apprl,w-apprr],-bot_skip,-d,-1); +endchar; + +beginchar(bbhebmas[22],8u#+2appr#,0,bot_skip#+heb_size1#); + "Hebrew accent kefula"; + a:=0.5max(5u,1.5hthick+thin,3thin)+1.5u; + complete_hebrew_club(0.5[apprl,w-apprr]-0.5a,-bot_skip,-d,-1); + complete_hebrew_club'(0.5[apprl,w-apprr]+0.5a,-bot_skip,-d,-1); +endchar; + +beginchar(bbhebmas[23],8u#+2appr#,0,bot_skip#+heb_size2#); + "Hebrew accent darga"; + a:=hround max(6u,1.5hthick+1.5thin); + x2l=x4r=hround(0.5[apprl,w-apprr]-0.5a); x1l=x3r=x2l+a; + y1l=y2l=-d; y3r=y4r=-bot_skip; + 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); +endchar; + +beginchar(bbhebmas[24],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent qadma"; + complete_hebrew_club(0.5[apprl,w-apprr],x_height+top_skip,h,-1); +endchar; + +beginchar(bbhebmas[25],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent telisha qetana"; + complete_hebrew_club(apprl,h,x_height+top_skip,1); +endchar; + +beginchar(bbhebmas[26],8u#+2appr#,0,bot_skip#+ + if square_dots: heb_size1# else: heb_size2# fi); + "Hebrew accent yera ben yomo"; + if square_dots: + if not(odd(w-apprl-apprr)): change_width; fi + x2r=0.5[apprl,w-apprr]; x3r-x1r=hround 6u; 0.5[x3r,x1r]=x2r; + y2r=-d-0.5; y1r=y3r=-bot_skip; + z1l-z1r=(diag_width(thin,z2r-z1r),0); + z3l-z3r=(-diag_width(thin,z2r-z3r),0); + z2l-z1l=whatever*(z2r-z1r); z2l-z3l=whatever*(z2r-z3r); + penstroke z1e--z2e--z3e; penlabels(1,2,3); + else: center_stem(2,4); top y1=top y3=-bot_skip; bot y4=-d; + y2=good.y 0.5[y4,y1]; x2-x1=x3-x2=hround 3u; + draw z1 down_to_right z2 right_to_up z3; draw z2..z4; + square_end1(up); square_end3(up); + square_end4(down); labels(1,2,3,4); + fi +endchar; + +beginchar(bbhebmas[27],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent ole"; + y2r=0.5[y1,y3]=vround(0.5[x_height+top_skip,h])+0.5; y1-y3=heb_size1; + x1=hround(0.5[apprl,w-apprr]+3u); x1-x2r=hround 6u; x1=x1r=x3=x3r; + adjust_slanted_bar(2r,1,2a,1a)(0.5(thin),-1); + adjust_slanted_bar(2r,3,2b,3b)(0.5(thin),1); + z1r=whatever[z2r,z1a]; z3r=whatever[z2r,z3b]; + z1r-z1=z1-z1l; z3r-z3=z3-z3l; + z2l-z1l=whatever*(z2r-z1r); z2l-z3l=whatever*(z2r-z3r); + penstroke z1e--z2e--z3e; + penlabels(1,2,3); labels(1a,2a,2b,3b); +endchar; + +beginchar(bbhebmas[28],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent iluy"; + pickup circle.nib; + a:=hround max(3thin,4u); + rt x2=rt x3=hround(0.5[apprl,w-apprr]+0.5a); rt x2-lft x1=a; + top y3=h; bot y1=bot y2=x_height+top_skip; + pickup square.nib; draw z1--z2--z3; labels(1,2,3); +endchar; + +beginchar(bbhebmas[29],8u#+2appr#,0,bot_skip#+heb_size1#); + "Hebrew accent dehi"; + complete_hebrew_club(w-apprr,-bot_skip,-d,1); +endchar; + +beginchar(bbhebmas[30],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew accent zinor"; + pickup circle.nib; + a:=max(6u,5thin); + bot y1=x_height+top_skip; y1=y6; top y8=h; y8=y3; + y0=y2=y7=0.5[y1,y8]; lft x2=hround(0.5[apprl,w-apprr]-0.5a); + rt x7-lft x2=hround a; x0=0.5[x2,x7]; slope:=-heb_size1/2u; + hellipse_set(2,3,4,0); hellipse_set(7,6,5,0); + x1=good.x x3; x8=good.x x6; + draw z1 left_to_up z2 up_to_right z3...z4---z5 + ...z6 right_to_up z7 up_to_left z8; + square_end1(right); square_end8(left); + labels(0,1,2,3,4,5,6,7,8); +endchar; + +beginchar(bbhebmas[31],8u#+2appr#,x_height#+top_skip#+heb_size1#,0); + "Hebrew mark masora circle"; + pickup circle.nib; + if odd(w-apprl-apprr): change_width; fi + 0.5[x1,x3]=x2=x4=0.5[apprl,w-apprr]; + x1-x3=2hround(hthick/sqrt 2)+2eps; + 0.5[y2,y4]=y1=y3=x_height+top_skip+vround 0.5dot_size; + top y2-bot y4=2vround(dot_size/sqrt 2)+2eps; + draw superellipse(z1,z2,z3,z4,superness); labels(1,2,3,4); +endchar; + +standard_proofing;% restore extra_endchar.
\ No newline at end of file diff --git a/fonts/mbboard/source/mbbhebrw.mf b/fonts/mbboard/source/mbbhebrw.mf new file mode 100644 index 0000000000..30ce8fc3e9 --- /dev/null +++ b/fonts/mbboard/source/mbbhebrw.mf @@ -0,0 +1,795 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbhebrw.mf (Hebrew letters) +% last modification: 25.10.2001. + +% Originally, this file was intented to generate only +% usual Hebrew letters together with their final forms. +% Designs with dagesh diacritic mark appeared to be +% necessary for three reasons (the two firsts are not +% good reasons but the last one is truly a good one): +% Yannis Haralambous in his quadratic Hebrew font +% did so. In the book of Fraenkel on set theory, such +% symbols are used. And last, no correct placement of +% the dagesh can be done by TeX mechanism. So it deserves +% a particular treatment. +% Furthermore, nobody can imagine placing an accent in the middle +% of a lead plate... +% A last remark: dagesh can overlap the underlying glyph, +% especially when dots are squares. But I don't care too much +% of that. + +def horizontal_rules_list=0.4h,0.5h,0.6h, + -body_depth,-desc_depth,cap_height,asc_height,body_height +enddef; + +use_rule2; + +% special parameters + +hebrew_flare#:=1/3cap_height#; +hebrew_jut#:=2u#; yod_jut#:=0.75u#; +define_whole_vertical_pixels(hebrew_flare); +define_whole_pixels(hebrew_jut,yod_jut); + +top_skip#:=bot_skip#:=0.1cap_height#; +define_whole_vertical_pixels(top_skip,bot_skip); +heb_size1#:=max(asc_height#-top_skip#-x_height#,dot_size#+dot_skip#+thin#); +heb_size2#:=max(body_height#-top_skip#-x_height#,2dot_size#+dot_skip#); +heb_size1:=max(asc_height-top_skip-x_height,dot_size+dot_skip+thin); +heb_size2:=max(body_height-top_skip-x_height,2dot_size+dot_skip); + +% special macros + +vardef complete_hebrew_curve@#(expr lshift,rshift,$,squared_end)= + pickup circle.nib; + top y1@#=top y2@#=h; lft x1@#=apprl+hround lshift; + rt x3@#=rt x4@#=w-apprr-hround rshift; + x2@#=max(0.25[x1@#,x3@#],rt x3@#-6u); + y3@#=$[max(0,-d),h]; bot y4@#=-d; + tmp_path:=z1@#..z2@# right_to_down z3@#..z4@#; + draw tmp_path; hbbowl(z2@#,z3@#,z4@#,hthick) tmp_path; + pickup square.nib; draw z4@#--z.bowl.bot; + if squared_end: square_end1@#(left); fi + labels(1@#,2@#,3@#,4@#); +enddef; + +vardef complete_dagesh@#(expr x_mid,y_mid)= + if dagesh_mark: + pickup circle.nib; x@#=good.x(x_mid-0.5hthick); + x@#'-x@#=hthick; bot y@#=vround(y_mid-0.5dot_size); + top y@#'-bot y@#=dot_size; dot(@#,@#'); + fi +enddef; + +if dagesh_mark: tmp_string:=" with dagesh"; +else: tmp_string:=""; fi + +vardef complete_hebrew_club@#(expr x_mid,y_top,y_bot,$)= + save a; a=hround max(5u,1.5hthick+thin,3thin); + y1@#l=y2@#l=y_bot; y2@#r=y1@#r; y3@#l=y_top; + penpos1@#(thin,if y_top<y_bot: - fi 90); + x1@#l-x3@#l=if $<0: - fi a; + x1@#l=hround(x_mid if $<0: - else: + fi 0.5a); + x2@#r=0.5[x1@#r,x3@#l]; + adjust_slanted_bar(3@#l,2@#r,3@#r,2@#a) + (thin,if y_top<y_bot: - fi $); + z2@#l=whatever[z3@#l,z2@#a]; penstroke z1@#e--z2@#e--z3@#e; + penlabels(1@#,2@#,3@#); +enddef; + +% Hebrew letters + +iff known dagesh_accent: +beginchar(dagesh_accent,appr#+hthick#+thin#+dot_skip#-appr#,cap_height#,0); + "Hebrew dagesh accent"; + italcorr 0.5(cap_height#+dot_size#)*slant-dot_skip#+0.5u#; + complete_dagesh1(apprl+0.5(hthick+thin),0.5h); +endchar; + +beginchar(bbhebr0,12u#+2appr#,cap_height#,0); + "Hebrew letter alef (0)"& tmp_string; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + x1l=apprl-0.4u; x4r=w-apprr+0.4u; y1l=h; y4r=-d; + adjust_slanted_bar(1l,4r,2r,3l)(thick+thin,1); + numeric a,t; a=diag_width(thin,z1l-z3l); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + y1-y1a=thin; z1-z1a=z2-z2a=z3a-z3=z4a-z4=whatever*(z1-z3); + penstroke z1e..z3e; penstroke z2e..z4e; + fill z1--z2--z2a--z1a--cycle; fill z3--z4--z4a--z3a--cycle; + lft x5=apprl; rt x10=w-apprr; x8-x5=x10-x13=hThick; + bot y5=bot y8=0; top y10=top y13=h; + x6=0.5[x3,x3a]; x11=0.5[x2,x2a]; + h-top y6=bot y11=hebrew_flare; + z6=z5 upright z6; z12=z10 downleft z11; + tmp_path:=z5 up_to_right z6; + tmpp_path:=z10 down_to_left z11; + t=xpart(tmp_path intersectiontimes (z1..z3)); + z7=point t of tmp_path; + z12=point t of tmpp_path; + if x7>x8: z9=tmp_path intersectionpoint (z8..(x8,y6)); + else: x9=x8; z9=whatever[z1,z3]; fi + x14=w+apprl-apprr-x9; y14=h-y9; + draw subpath (0,t) of tmp_path; draw z8..z9; + draw subpath (0,t) of tmpp_path; draw z13..z14; + z5a=lft z5; z8a=rt z8; z10a=rt z10; z13a=lft z13; + z5r=top z5; z8r=top z8; z10r=bot z10; z13r=bot z13; + y5l=y8l=0; y10l=y13l=h; x5l=x5a; x8l=x8a; x10l=x10a; x13l=x13a; + fill z5l--z8l--z8a--z8r--z5r--z5a--cycle; + fill z10l--z13l--z13a--z13r--z10r--z10a--cycle; + labels(1a,2a,3a,4a,5a,6,6,7,8a,10a,11,12,13a,14); + penlabels(1,2,3,4,5,8,10,13); + complete_dagesh15(0.5[x8,x3+0.5dot_size*(x1-x3)/h],0.5dot_size); + math_fit(0,0); +endchar; + +beginchar(bbhebr1,10u#+hebrew_jut#+2appr#,cap_height#,0); + "Hebrew letter bet (1)"& tmp_string; + italcorr 0.6cap_height#*slant-hebrew_jut#; + complete_hebrew_curve(0,hebrew_jut-0.5u,0.5,true); + pickup circle.nib; + apprl-lft x7=rt x8-(w-apprr)=hround 0.5u; + bot y7=bot y8=0; + pickup square.nib; draw z7..z8; labels(7,8); + complete_dagesh9(0.5[x1,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr2,8u#+2appr#,cap_height#,0); + "Hebrew letter gimel (2)& tmp_string"; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(0.5u,0,0.5,true); + numeric t; pickup circle.nib; + x7=x4; lft x8=apprl; x9-x8=hThick; + y7=0.4[y4,y1]; y8=y9=y4; tmp_path:=z7 left_to_down z8; + t=xpart(tmp_path intersectiontimes bowl_path); + z10=tmp_path intersectionpoint (z9..(x9,y7)); + z8a=lft z8; z9a=rt z9; + z8r=top z8; z9r=top z9; + y8l=y9l=0; x8l=x8a; x9l=x9a; + fill z8l--z9l--z9a--z9r--z8r--z8a--cycle; + draw subpath (t,2) of tmp_path; draw z9..z10; + labels(7,8,8a,8r,8l,9,9a,9r,9l,10); + complete_dagesh13(min(x1+0.5hthick,0.5[x1,x.bowl.mid]),0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr3,9u#+hebrew_jut#+2appr#,cap_height#,0); + "Hebrew letter dalet (3)"& tmp_string; + italcorr cap_height#*slant; + pickup circle.nib; + top y1=top y2=h; apprl-lft x1=rt x2-(w-apprr)=hround 0.5u; + y3=y6=y1; x2-x3=x2-x4=hebrew_jut; + x3-x6=x4-x5=hthick; bot y4=bot y5=0; + pickup square.nib; draw z1..z2; + draw z3--z4--z5--z6; labels(1,2,3,4,5,6); + complete_dagesh7(0.5[x1,x5],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr4,12u#+Appr#+appr#,cap_height#,0); + "Hebrew letter he (4)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(Apprl-apprl,0,0.5,true); + y7=y8=y4; x7=x9=x1; x8-x7=x10-x9=hthick; + top y9=top y10=h-hebrew_flare; + draw z7--z8--z10--z9--cycle; + labels(7,8,9,10); + complete_dagesh11(0.5[x.bowl.mid,x8],0.5h); + math_fit(0,0); +endchar; + +iff square_hebrew and not dagesh_mark: +beginchar(bbhebr5,hthick#+thin#+2Appr#,cap_height#,0); + "Hebrew letter vav (5)"; + italcorr cap_height#*slant-u#; + center_bar(1,2); x3=x1; x4=x2; bot y1=bot y2=-d; top y3=top y4=h; + pickup square.nib; draw z1--z2--z4--z3--cycle; + labels(1,2,3,4); + math_fit(0,0); +endchar; + +iff square_hebrew and dagesh_mark: +beginchar(bbhebr5,2hthick#+2thin#+dot_skip#+appr#+Appr#,cap_height#,0); + "Hebrew letter vav (5) with dagesh"; + italcorr cap_height#*slant-u#; + pickup circle.nib; rt x2=rt x4=w-Apprr; x2-x1=x5'-x5=hthick; + x3=x1; x1-x5'=thin+dot_skip; bot y5=vround(0.5h-0.5dot_size); + top y5'-bot y5=dot_size; bot y1=bot y2=-d; top y3=top y4=h; + pickup square.nib; draw z1--z2--z4--z3--cycle; dot(5,5'); + labels(1,2,3,4); + math_fit(0,0); +endchar; + +iff not square_hebrew and not dagesh_mark: +beginchar(bbhebr5,hthick#+thin#+yod_jut#+2appr#,cap_height#,0); + "Hebrew letter vav (5)"; + italcorr 0.8cap_height#*slant-0.5u#; + complete_hebrew_curve(-0.5u,0,0.75,true); + math_fit(0,0); +endchar; + +iff not square_hebrew and dagesh_mark: +beginchar(bbhebr5,hthick#+thin# + +max(hthick#+thin#+dot_skip#,yod_jut#)+2appr#,cap_height#,0); + "Hebrew letter vav (5) with dagesh"; + italcorr 0.8cap_height#*slant-0.5u#; + complete_hebrew_curve(w-apprr-hthick-thin-yod_jut-apprl-0.5u,0,0.75,true); + pickup circle.nib; lft x7=min(apprl,lft x.bowl.mid-hthick-thin-dot_skip); + x7'-x7=hthick; bot y7=vround(0.5h-0.5dot_size); + top y7'-bot y7=dot_size; dot(7,7'); + math_fit(0,0); +endchar; + +iff not dagesh_mark: +beginchar(bbhebr6,hthick#+thin#+2hebrew_jut#-u#+2appr#,cap_height#,0); + "Hebrew letter zayin (6)"; + italcorr cap_height#*slant; + center_bar(5,6); x4=x5; + apprl-lft x1=rt x2-(w-apprr)=hround 0.5u; + top y1=top y2=top y3=h; bot y5=bot y6=0; + if not square_hebrew: x3=0.25[x2,x6]; y4=0.6[y5,y1]; + tmp_path:=z3 left_to_down z4..z5; + draw tmp_path; hbbowl(z3,z4,z5,x6-x5) tmp_path; + pickup square.nib; + draw z1--z2; draw z5..z6; labels(1,2,3,4,5,6); + else: y4=y3; x3=x6; pickup square.nib; draw z1--z2; + draw z3--z6--z5--z4; labels(1,2,3,4,5,6); + fi + math_fit(0,0); +endchar; + +iff dagesh_mark: +beginchar(bbhebr6,hthick#+thin#+hebrew_jut#-0.5u# + +max(hthick#+thin#+dot_skip#,hebrew_jut#)+2appr#,cap_height#,0); + "Hebrew letter zayin (6) with dagesh"; + italcorr cap_height#*slant; + pickup circle.nib; rt x2=w-apprr+hround 0.5u; + x2-x6=x5-x1=hebrew_jut; x6-x5=x7'-x7=hthick; x4=x5; + lft x7=min(apprl,lft x5-hthick-thin-dot_skip); + top y1=top y2=top y3=h; bot y5=bot y6=0; + bot y7=vround(0.5h-0.5dot_size); top y7'-bot y7=dot_size; + if not square_hebrew: x3=0.25[x2,x6]; y4=0.6[y5,y1]; + tmp_path:=z3 left_to_down z4..z5; + draw tmp_path; hbbowl(z3,z4,z5,x6-x5) tmp_path; + pickup square.nib; + draw z1--z2; draw z5..z6; labels(1,2,3,4,5,6); + else: y4=y3; x3=x6; pickup square.nib; draw z1--z2; + draw z3--z6--z5--z4; labels(1,2,3,4,5,6); + fi + dot(7,7'); + math_fit(0,0); +endchar; + +beginchar(bbhebr7,12u#+Appr#+appr#,cap_height#,0); + "Hebrew letter het (7)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(Apprl-apprr,0,0.5,false); + x7=x1; x8=x9=x7+hthick; y7=y8=y4; y9=y1; + draw z1--z7--z8--z9; labels(7,8,9); + complete_dagesh10(0.5[x.bowl.mid,x8],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr8,12.25u#+2appr#,cap_height#,0); + "Hebrew letter tet (8)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + pickup circle.nib; + lft x2=lft x3=apprl; x4=x6=0.5[x2,x5]; rt x5=w-apprr; + x1=x2+hthick; lft x7=hround max(0.3[apprl,w-apprr],rt x1+u); + top y2=h; y1=y2=y6=y7; y3=y5=0.5[y2,y4]; bot y4=0; + tmp_path:=z2..z3 down_to_right z4 right_to_up z5 up_to_left z6..z7; + draw tmp_path; hbbowl(z4,z3,z2,x1-x2) tmp_path; + bbbowl(z6,z5,z4,hThick) tmp_path; + pickup square.nib; draw z1..z2; square_end7(left); + labels(1,2,3,4,5,6,7); + complete_dagesh11(0.5[x1,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +iff square_hebrew and not dagesh_mark: +beginchar(bbhebr9,hthick#+thin#+2Appr#,cap_height#,0); + "Hebrew letter yod (9)"; + italcorr cap_height#*slant-u#; + center_bar(1,2); x1=x3; x2=x4; + bot y1=bot y2=vround 0.5h; top y3=top y4=h; pickup square.nib; + draw z1--z2--z4--z3--cycle; labels(1,2,3,4); + math_fit(0,0); +endchar; + +iff square_hebrew and dagesh_mark: +beginchar(bbhebr9,2hthick#+2thin#+dot_skip#+appr#+Appr#,cap_height#,0); + "Hebrew letter yod (9) with dagesh"; + italcorr cap_height#*slant-u#; + pickup circle.nib; rt x2=rt x4=w-Apprr; x2-x1=x5'-x5=hthick; + x3=x1; x1-x5'=thin+dot_skip; bot y5=vround(0.5h-0.5dot_size); + top y5'-bot y5=dot_size; bot y1=bot y2=vround 0.5h; top y3=top y4=h; + pickup square.nib; draw z1--z2--z4--z3--cycle; dot(5,5'); + labels(1,2,3,4); + math_fit(0,0); +endchar; + +iff not square_hebrew and not dagesh_mark: +beginchar(bbhebr9,hthick#+thin#+yod_jut#+2appr#,cap_height#,0); + "Hebrew letter yod (9)"; + italcorr 0.8cap_height#*slant-0.5u#; + begingroup save d; d=-vround 0.5h; + complete_hebrew_curve(-0.5u,0,0.5,true); + endgroup; + math_fit(0,0); +endchar; + +iff not square_hebrew and dagesh_mark: +beginchar(bbhebr9,hthick#+thin#+ + +max(hthick#+thin#+dot_skip#,yod_jut#)+2appr#,cap_height#,0); + "Hebrew letter yod (9) with dagesh"; + italcorr 0.8cap_height#*slant-0.5u#; + begingroup save d; d=-vround 0.5h; + complete_hebrew_curve(w-apprr-hthick-thin-yod_jut-apprl-0.5u,0,0.5,true); + endgroup; + pickup circle.nib; + lft x7=min(apprl,lft x.bowl.mid-hthick-thin-dot_skip); + x7'-x7=hthick; bot y7=vround(0.5h-0.5dot_size); + top y7'-bot y7=dot_size; dot(7,7'); + math_fit(0,0); +endchar; + +beginchar(bbhebr10,10u#+2appr#,cap_height#,desc_depth#); + "Hebrew letter final kaf (10)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(0,0,0.5,true); + complete_dagesh7(0.5[x1,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr11,12u#+2appr#,cap_height#,0); + "Hebrew letter kaf (11)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(0,0,0.5,true); + z7=(x1,y4); draw z7..z4; labels(7); + complete_dagesh8(0.5[x1,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr12,12u#+2appr#,cap_height#,0); + "Hebrew letter lamed (12)"& tmp_string; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + rt x2=rt x3=w-apprr; bot y1=0; top y3=top y4=h; y2=h/2; + top y5-bot y4=hebrew_flare; y5=y6; lft x4=lft x5=apprl; y7=y4; + x7=x6=x5+hthick; lft x1=hround(0.4[apprl,w-apprr]); + tmp_path:=z1 right_to_up z2..z3; + draw tmp_path; hbbowl(z1,z2,z3,hthick) tmp_path; + pickup square.nib; draw z3--z4--z5--z6--z7; + square_end1(left); labels(1,2,3,4,5,6,7); + complete_dagesh10(0.5[x4,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr13,12u#+Appr#+appr#,cap_height#,0); + "Hebrew letter final mem (13)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(Apprl-apprl,0,0.5,false); + y9=y1; y7=y8=y4; x7=x1; x8=x9=x7+hthick; + draw z1--z7--z4; draw z8..z9; + labels(7,8,9); + complete_dagesh10(0.5[x8,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr14,12u#+Appr#+appr#,cap_height#,0); + "Hebrew letter mem (14)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + pickup circle.nib; numeric t; + lft x1=lft x3=lft x6=Apprl; x2=x4=x1+hthick; rt x8=rt x9=w-apprr; + x7=0.5[x6,x8]; + lft x10=hround max(0.4[apprl,w-apprr],rt x2+u); + top y3=top y4=h; top y7=h; bot y1=0; y1=y2=y9=y10; + y6=y8=0.5[y1,y7]; + tmp_path:=z6 up_to_right z7 right_to_down z8..z9; + t=xpart(tmp_path intersectiontimes(z2..(x2,y7))); + z5=point t of tmp_path; + draw z4..z5&subpath(t,5) of tmp_path; hbbowl(z7,z8,z9,hthick) tmp_path; + pickup square.nib; draw z9..z10; draw z1--z2--z4--z3--cycle; + labels(1,2,3,4,5,6,7,8,9,10); + complete_dagesh15(0.5[x2,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +iff square_hebrew and not dagesh_mark: +beginchar(bbhebr15,hthick#+thin#+2Appr#,cap_height#,desc_depth#); + "Hebrew letter final nun (15)"; + italcorr cap_height#*slant-u#; + center_bar(1,2); x3=x1; x4=x2; bot y1=bot y2=-d; top y3=top y4=h; + pickup square.nib; draw z1--z2--z4--z3--cycle; + labels(1,2,3,4); + math_fit(0,0); +endchar; + +iff square_hebrew and dagesh_mark: +beginchar(bbhebr15,2hthick#+2thin#+dot_skip#+appr#+Appr#, + cap_height#,desc_depth#); + "Hebrew letter final nun (15) with dagesh"; + italcorr cap_height#*slant-u#; + pickup circle.nib; rt x2=rt x4=w-Apprr; x2-x1=x5'-x5=hthick; + x3=x1; x1-x5'=thin+dot_skip; bot y5=vround(0.5h-0.5dot_size); + top y5'-bot y5=dot_size; bot y1=bot y2=-d; top y3=top y4=h; + pickup square.nib; draw z1--z2--z4--z3--cycle; dot(5,5'); + labels(1,2,3,4); + math_fit(0,0); +endchar; + +iff not square_hebrew and not dagesh_mark: +beginchar(bbhebr15,hthick#+thin#+yod_jut#+2appr#, + cap_height#,desc_depth#); + "Hebrew letter final nun (15)"; + italcorr 0.8cap_height#*slant-0.5u#; + complete_hebrew_curve(-0.5u,0,0.75,true); + math_fit(0,0); +endchar; + +iff not square_hebrew and dagesh_mark: +beginchar(bbhebr15,hthick#+thin#+ + +max(hthick#+thin#+dot_skip#,yod_jut#) + +2appr#,cap_height#,desc_depth#); + "Hebrew letter final nun (15) with dagesh"; + italcorr 0.8cap_height#*slant-0.5u#; + complete_hebrew_curve(w-apprr-hthick-thin-yod_jut-apprl-0.5u,0,0.75,true); + pickup circle.nib; lft x7=min(apprl,lft x.bowl.mid-hthick-thin-dot_skip); + x7'-x7=hthick; bot y7=vround(0.5h-0.5dot_size); + top y7'-bot y7=dot_size; dot(7,7'); + math_fit(0,0); +endchar; + +%beginchar(bbhebr15,hthick#+thin#+2appr#,cap_height#,desc_depth#); +% "Hebrew letter final nun (15)"; +% italcorr cap_height#*slant-0.5u#; +% center_bar(1,2); x3=x1; x4=x2; bot y1=bot y2=-d; top y3=top y4=h; +% pickup square.nib; draw z1--z2--z4--z3--cycle; +% labels(1,2,3,4); +% math_fit(0,0); +%endchar; + +beginchar(bbhebr16,7.5u#+2appr#,cap_height#,0); + "Hebrew letter nun (16)"& tmp_string; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + rt x3=rt x4=w-apprr; lft x1=apprl-hround 0.5u; + x2=max(0.25[x1,x3],rt x3-6u); + bot y1=bot y2=0; top y4=h; y3=0.5[y1,y4]; + tmp_path:=z1..z2 right_to_up z3..z4; + draw tmp_path; hbbowl(z2,z3,z4,hthick) tmp_path; + pickup square.nib; draw z4..z.bowl.bot; + square_end1(left); labels(1,2,3,4); + complete_dagesh7(0.5[x1,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr17,12.25u#+2appr#,cap_height#,0); + "Hebrew letter samekh (17)"& tmp_string; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + lft x1=apprl; rt x5=w-apprr; x2=x1; x4=x5; x3=0.5[x1,x5]; + top y1=h; y5=y1; bot y3=0; y2=y4=0.5[y1,y3]; + tmp_path:=z1..z2 down_to_right z3 right_to_up z4..z5; + draw tmp_path; hbbowl(z3,z2,z1,hthick) tmp_path; + hbbowl(z3,z4,z5,hthick) tmp_path; + pickup square.nib; draw z1..z5; + labels(1,2,3,4,5); + complete_dagesh10(0.5[x1,x5],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr18,11.5u#+hebrew_jut#+2appr#,cap_height#,0); + "Hebrew letter ayin (18)"& tmp_string; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + rt x3=rt x4=w-apprr; lft x1=apprl-hround 0.5u; x2=w-apprr-6u; + x5=x6=good.x(x1+hebrew_jut+u); x7=x8=x5+hthick; + bot y1=0; y2=y5=y8=y1; top y4=h; y4=y6=y7; y3=h/2; + tmp_path:=z1..z2 right_to_up z3..z4; + draw tmp_path; hbbowl(z2,z3,z4,hthick) tmp_path; + pickup square.nib; draw z4..z.bowl.bot; draw z5--z6--z7--z8; + square_end1(left); labels(1,2,3,4,5,6,7,8); + complete_dagesh11(0.5[x7,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr19,12u#+2appr#,cap_height#,desc_depth#); + "Hebrew letter final pe (19)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(0,0,0.5,false); + bot y7=bot y8=h-hebrew_flare; x7=x1; + y9=y1; x9-x1=x8-x7=hthick; + draw z1--z7--z8--z9; labels(7,8,9); + complete_dagesh10(0.5[0.5[x7,x8],x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr20,12u#+2appr#,cap_height#,0); + "Hebrew letter pe (20)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(0,0,0.5,false); + bot y7=bot y8=h-hebrew_flare; x7=x10=x1; y9=y1; y10=y4; + x9-x1=x8-x7=hthick; draw z1--z7--z8--z9; draw z10..z4; + labels(7,8,9,10); + complete_dagesh11(0.5[0.5[x7,x8],x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr21,12u#+Appr#+appr#,cap_height#,desc_depth#); + "Hebrew letter final tzadi (21)"& tmp_string; + italcorr cap_height#*slant-0.5u#; + numeric t; pickup circle.nib; + bot y1=bot y2=-d; top y3=h; y3=y4=y6=y8=y9; + bot y7=hebrew_flare; + lft x1=lft x4=lft x6=Apprl; rt x8=w-apprr; + x2=x3=x1+hthick; x7=0.5[x1,x8]; + tmp_path:=z6 down_to_right z7 right_to_up z8; + t=xpart(tmp_path intersectiontimes (z2..z3)); + hbbowl(z7,z8,z8,hThick) tmp_path; z9=z.bowl.bot; + z5=point t of tmp_path; + z9a=lft z9; z8a=rt z8; z9l=bot z9; z8l=bot z8; + z9r=(x9a,h); z8r=(x8a,h); + fill z8a--z8r--z9r--z9a--z9l--z8l--cycle; + draw subpath (t,4) of tmp_path; + pickup square.nib; + draw z1--z2--z3--z4--cycle; + labels(1,2,3,4,5,6,7,8,9,8a,9a,10,12); penlabels(8,9); + complete_dagesh13(0.5[x2,x9],0.5[y3,y7]); + math_fit(0,0); +endchar; + +beginchar(bbhebr22,12u#+2appr#,cap_height#,0#); + "Hebrew letter tzadi (22)"& tmp_string; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + numeric t; + x1l+0.4u=x5l=apprl; x6l=w-apprr; y1l=h; y5l=y6l=-d; + penpos5(thin,90); penpos6(thin,90); z4r=z6r; + adjust_slanted_bar(1l,4r,2r,3l)(thick+thin,1); + a:=diag_width(thin,z1l-z3l); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + y1-y1a=thin; z1-z1a=z2-z2a=whatever*(z1-z3); + penstroke z1e..z3e; penstroke z2e..z4e; penstroke z5e..z6e; + fill z1--z2--z2a--z1a--cycle; + rt x7=w-apprr; x7-x10=hThick; top y7=top y10=h; + x8=0.5[x2,x2a]; bot y8=hebrew_flare; + tmp_path:=z7 down_to_left z8; + t=xpart(tmp_path intersectiontimes (z2..z4)); + z9=point t of tmp_path; + if x9<x10: z11=tmp_path intersectionpoint (z10..(x10,y8)); + else: x11=x10; z11=whatever[z2,z4]; fi + draw subpath (0,t) of tmp_path; draw z10..z11; + z7a=rt z7; z10a=lft z10; + z7r=bot z7; z10r=bot z10; + y7l=y10l=h; x7l=x7a; x10l=x10a; + fill z7l--z10l--z10a--z10r--z7r--z7a--cycle; + labels(1a,2a,4a,7a,8,9,10a,11); + penlabels(1,2,3,4,5,6,7,10); + complete_dagesh12( + max( + min( + 0.25[x1,x3], + 0.5[x1,x3]+0.5dot_size*(x1-x3)/(y1-y3)-0.5(hthick+thin)-dot_skip + ), + apprl+0.5(hthick+thin) + ),0.5h); + math_fit(0,0); +endchar; + +% Comments about the placement of the dagesh mark: +% the right x position is `0.25[x1,x3]', +% but upper right corner of the square dot should not +% lie beyond the line `z1..z3', so this +% position may be the minimum of the previous coordinate and +% `0.5[x1,x3]+0.5dot_size*(x1-x3)/(y1-y3)-0.5(hthick+thin)-dot_skip'; +% at last the dot mustn't go beyond the left limit, +% so we finally take the maximum of the previous quantity +% and `apprl+0.5(hthick+thin)' to be the right x coordinate. + +beginchar(bbhebr23,12u#+Appr#+appr#,cap_height#,desc_depth#); + "Hebrew letter qof (23)"& tmp_string; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; + rt x2=rt x3=w-apprr; bot y1=0; top y3=top y4=h; y2=h/2; + top y5=top y6=h-hebrew_flare; + lft x4=lft x5=lft x8=Apprl; x6=x7=x5+hthick; bot y8=bot y7=-d; + lft x1=hround max(0.4[apprl,w-apprr],rt x6+u); + tmp_path:=z1 right_to_up z2..z3; + draw tmp_path; hbbowl(z1,z2,z3,hthick) tmp_path; + pickup square.nib; draw z3--z4; draw z5--z6--z7--z8--cycle; + square_end1(left); labels(1,2,3,4,5,6,7,8); + complete_dagesh11(0.5[x.bowl.mid,x6],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr24,10.5u#+2appr#,cap_height#,0); + "Hebrew letter resh (24)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(-0.5u,0,0.5,true); + complete_dagesh7(0.5[x1,x.bowl.mid],0.5h); + math_fit(0,0); +endchar; + +beginchar(bbhebr25,14u#+2appr#,cap_height#,0); + "Hebrew letter shin (25)"& tmp_string; + italcorr cap_height#*slant-0.5u#; + numeric t; + center_bar(10',11'); + lft x3=apprl; rt x7=w-apprr; x7-x8=x2-x3=hthick; + if not dagesh_mark: x10=x10'; x11=x11'; + else: x11-x10=x14'-x14=hthick; + x8-x14'=x14-x11=max(dot_skip+thin,hround 0.5(x8-x11'-hthick)); + top y14'-bot y14=dot_size; bot y14=vround 0.5(h-dot_size); + dot(14,14'); pickup circle.nib; + fi + x12=x11; x4=x3; x6=x7; top y3=h; y7=y8=y2=y3=y10=y11; + y4=y6=0.5[y5,y3]; x5=0.5[x3,x7]; bot y5=0; + tmp_path:=z3..z4 down_to_right z5 right_to_up z6..z7; + t=xpart(tmp_path intersectiontimes (z2..(x2,y5))); + z1=point t of tmp_path; + draw tmp_path; + hbbowl(z5,z6,z7,hthick) tmp_path; + if not square_hebrew: + y12=y4; y9=y1; x9=x10; + z13-z12=(point 0.5(1+t) of tmp_path-z4) xscaled -1; + tmpp_path:=z11---z12...z13{(direction 0.5(1+t) of tmp_path) xscaled -1} + ...z9{(direction t of tmp_path) xscaled -1} + ...z1{-direction t of tmp_path}; + draw tmpp_path; draw z1..z2; + hbbowl(point 3.5 of tmpp_path,z12,z11,hthick) tmpp_path; + pickup square.nib; draw z10..z11; labels(13); + else: hbbowl(z5,z4,z3,hthick) tmp_path; + x9=x10; bot y9=bot y12=vround 0.25h; + pickup square.nib; draw z9--z10--z11--z12--cycle; + fi + draw z2..z3; draw z7..z8; + labels(1,2,3,4,5,6,7,8,9,10,11,12); + math_fit(0,0); +endchar; + +beginchar(bbhebr26,11.5u#+hebrew_jut#+2appr#,cap_height#,0); + "Hebrew letter tav (26)"& tmp_string; + italcorr 0.6cap_height#*slant-0.5u#; + complete_hebrew_curve(hebrew_jut-0.5u,0,0.5,false); + pickup circle.nib; y7=y8=y9=y4; lft x8=apprl-hround 0.5u; + x7=x1; x9-x7=hthick; x10=x9; y10=y1; + pickup square.nib; draw z1..z7; draw z8--z9--z10; + labels(7,8,9,10); + complete_dagesh11(0.5[x.bowl.mid,x9],0.5h); + math_fit(0,0); +endchar; + +% ligatures. + +iff known bbhebr27 and square_hebrew: +beginchar(bbhebr27,2hthick#+2thin#+2Appr#+2appr#,cap_height#,0); + "Hebrew ligature vav-vav (27)"; + italcorr cap_height#*slant-u#; + pickup circle.nib; + bot y1=0; y1=y2=y5=y6; top y3=h; y3=y4=y7=y8; + lft x1=lft x4=Apprl; rt x6=rt x7=w-Apprr; + x2-x1=x3-x4=x6-x5=x7-x8=hthick; + pickup square.nib; draw z1--z2--z3--z4--cycle; + draw z5--z6--z7--z8--cycle; + labels(1,2,3,4,5,6,7,8); + math_fit(0,0); +endchar; + +iff known bbhebr27 and not square_hebrew: +beginchar(bbhebr27,2hthick#+2thin#+yod_jut#+4appr#,cap_height#,0); + "Hebrew ligature vav-vav (27)"; + italcorr 0.8cap_height#*slant-0.5u#; + a:=w-apprl-apprr-(thin+hthick+yod_jut); + complete_hebrew_curve(0-0.5u,a,0.75,true); + complete_hebrew_curve'(a-0.5u,0,0.75,true); + math_fit(0,0); +endchar; + +iff known bbhebr28 and square_hebrew: +beginchar(bbhebr28,2hthick#+2thin#+2Appr#+2appr#,cap_height#,0); + "Hebrew ligature yod-vav (28)"; + italcorr cap_height#*slant-u#; + pickup circle.nib; + bot y1=bot y2=vround 0.5h; + bot y5=bot y6=0; top y3=h; y3=y4=y7=y8; + lft x1=lft x4=Apprl; rt x6=rt x7=w-Apprr; + x2-x1=x3-x4=x6-x5=x7-x8=hthick; + pickup square.nib; draw z1--z2--z3--z4--cycle; + draw z5--z6--z7--z8--cycle; + labels(1,2,3,4,5,6,7,8); + math_fit(0,0); +endchar; + +iff known bbhebr28 and not square_hebrew: +beginchar(bbhebr28,2hthick#+2thin#+yod_jut#+4appr#,cap_height#,0); + "Hebrew ligature yod-vav (28)"; + italcorr 0.8cap_height#*slant-0.5u#; + a:=w-apprl-apprr-(thin+hthick+yod_jut); + begingroup save d; d=-vround 0.5h; + complete_hebrew_curve(-0.5u,a,0.5,true); + endgroup; + complete_hebrew_curve'(a-0.5u,0,0.75,true); + math_fit(0,0); +endchar; + +iff known bbhebr29 and square_hebrew: +beginchar(bbhebr29,2hthick#+2thin#+2Appr#+2appr#,cap_height#,0); + "Hebrew ligature yod-yod (29)"; + italcorr cap_height#*slant-u#; + pickup circle.nib; + bot y1=vround 0.5h; y1=y2=y5=y6; top y3=h; y3=y4=y7=y8; + lft x1=lft x4=Apprl; rt x6=rt x7=w-Apprr; + x2-x1=x3-x4=x6-x5=x7-x8=hthick; + pickup square.nib; draw z1--z2--z3--z4--cycle; + draw z5--z6--z7--z8--cycle; labels(1,2,3,4,5,6,7,8); + math_fit(0,0); +endchar; + +iff known bbhebr29 and not square_hebrew: +beginchar(bbhebr29,2hthick#+2thin#+yod_jut#+4appr#,cap_height#,0); + "Hebrew ligature vav-vav (29)"; + italcorr 0.8cap_height#*slant-0.5u#; + a:=w-apprl-apprr-(thin+hthick+yod_jut); + begingroup save d; d=-vround 0.5h; + complete_hebrew_curve(-0.5u,a,0.5,true); + complete_hebrew_curve'(a-0.5u,0,0.5,true); + endgroup; + math_fit(0,0); +endchar; + +iff known bbhebr30: +beginchar(bbhebr30,5u#+2appr#,body_height#,0); + "Hebrew punctuation geresh (apostrophe)"; + if square_hebrew: + italcorr body_height#*slant; + x1l=apprl-0.5u; x4r=w-apprr+0.5u; + y4r=h; y1l=vround 0.7h; + adjust_slanted_bar(1l,4r,2r,3l)(thick+thin,-1); + numeric a,b; b=x4r-x1l;% it will be usefull for the next character. + a=diag_width(thin,z3l-z1l); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + y1a-y1=thin; z1a=whatever[z1,z3]; z1a-z1=z2a-z2=z3-z3a=z4-z4a; + penstroke z1e..z3e; penstroke z2e..z4e; + fill z1a--z2a--z2--z1--cycle; fill z3--z4--z4a--z3a--cycle; + labels(1a,2a,3a,4a); penlabels(1,2,3,4); + else: + italcorr (body_height#-0.4dot_size#)*slant-0.5u#; + numeric b; b=x2-x1; pickup circle.nib; + x2=w-apprr-dot_size/2-hround 0.5u; + x1=apprl+dot_size/4+hround 0.5u; + y1=vround 0.7h+dot_size/4; + y2=h-dot_size/2; long_dot(1,2); + fi + math_fit(0,0); +endchar; + +iff known bbhebr31: +beginchar(bbhebr31,10u#+2appr#,body_height#,0); + "Hebrew punctuation gershayim (double apostrophe)"; + if square_hebrew: + italcorr body_height#*slant; + x1l=apprl-0.5u; x4r-x1l=b; y4r=h; y1l=vround 0.7h; + adjust_slanted_bar(1l,4r,2r,3l)(thick+thin,-1); + a:=diag_width(thin,z3l-z1l); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + y1a-y1=thin; z1a=whatever[z1,z3]; z1a-z1=z2a-z2=z3-z3a=z4-z4a; + for i=1 upto 4: forsuffixes $=,r,l,a: + z[i+4]$-z[i]$=(w-apprr-x4,0); endfor endfor + penstroke z1e..z3e; penstroke z2e..z4e; + penstroke z5e..z7e; penstroke z6e..z8e; + fill z1a--z2a--z2--z1--cycle; fill z3--z4--z4a--z3a--cycle; + fill z5a--z6a--z6--z5--cycle; fill z7--z8--z8a--z7a--cycle; + labels(1a,2a,3a,4a,5a,6a,7a,8a); penlabels(1,2,3,4,5,6,7,8); + else: + italcorr (body_height#-0.4dot_size#)*slant-0.5u#; + pickup circle.nib; + x4=w-apprr-dot_size/2-hround 0.5u; + x1=apprl+dot_size/4+hround 0.5u; + y1=y3=vround 0.7h+dot_size/4; + y2=y4=h-dot_size/2; x2-x1=x4-x3=b; + long_dot(1,2); long_dot(3,4); + fi + math_fit(0,0); +endchar; diff --git a/fonts/mbboard/source/mbbhebvw.mf b/fonts/mbboard/source/mbbhebvw.mf new file mode 100644 index 0000000000..baf4c034cc --- /dev/null +++ b/fonts/mbboard/source/mbbhebvw.mf @@ -0,0 +1,210 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbhebvw.mf (Hebrew points and punctuation) +% last modification: 25.10.2001. + +diacritics_proofing;% changes extra_endchar for proof mode. + +def horizontal_rules_list= + -body_depth,-paren_depth,-desc_depth, + x_height,cap_height,asc_height,body_height +enddef; + +use_rule1; + +beginchar(bbhebvow[0],8u#+2appr#,0,bot_skip#+heb_size2#); + "Hebrew point sheva"; + center_bar(1,1'); x2=x1; x2'=x1'; + top y1'=bot y2+heb_size2=-bot_skip; + top y1'-bot y1=top y2'-bot y2=dot_size; + dot(1,1'); dot(2,2'); +endchar; + +beginchar(bbhebvow[1],8u#+2appr#,0,bot_skip#+heb_size2#); + "Hebrew point hataf-segol"; + center_bar(2,2'); + lft x1-apprl=w-apprr-rt x3'=w-apprr-rt x5' + =hround min(0,(w-apprl-apprr)/3-hthick-thin-2dot_skip/3); + x1'-x1=x3'-x3=x4'-x4=x5'-x5=hthick; x4=good.x 0.5[x1,x2]; + top y1'=bot y4+heb_size2=-bot_skip; + top y1'-bot y1=top y4'-bot y4=dot_size; + y1=y2=y3; y1'=y2'=y3'; y4=y5; y4'=y5'; + dot(1,1'); dot(2,2'); dot(3,3'); dot(4,4'); dot(5,5'); +endchar; + +beginchar(bbhebvow[2],8u#+2appr#,0,bot_skip#+dot_size#); + "Hebrew point hataf-patah"; + pickup circle.nib; + rt x1'=w-apprr; x1'-x1=hthick; top y1'=-bot_skip; + lft x2=apprl; x3-x2=2hround u+hthick; + top y1'-bot y1=dot_size; y1'=y2=y3; + dot(1,1'); pickup square.nib; draw z2..z3; + labels(2,3); +endchar; + +% humm +beginchar(bbhebvow[3],8u#+2appr#,0,bot_skip#+heb_size2#); + "Hebrew point hataf-qamats"; + pickup circle.nib; + rt x2=rt x10=w-apprr; x2-x1=x8-x5=x7-x6=x10-x9=hthick; + lft x3=apprl; x4-x3=2hround u+hthick; + x5=x6=x3+hround u; + top y2=bot y9+heb_size2=-bot_skip; top y2-bot y1=top y10-bot y9=dot_size; + bot y6=bot y7=-bot_skip-heb_size1; y2=y3=y4=y5=y8; + dot(1,2); dot(9,10); pickup square.nib; draw z3..z4; + draw z5--z6--z7--z8; labels(3,4,5,6,7,8); +endchar; + +beginchar(bbhebvow[4],8u#+2appr#,0,bot_skip#+dot_size#); + "Hebrew point hiriq"; + center_bar(1,1'); + top y1'=-bot_skip; top y1'-bot y1=dot_size; dot(1,1'); +endchar; + +beginchar(bbhebvow[5],8u#+2appr#,0,bot_skip#+dot_size#); + "Hebrew point tsere"; + pickup circle.nib; + lft x1-apprl=w-apprr-rt x2' + =hround min(0.5u,0.5(w-apprl-apprr)-hthick-thin-dot_skip); + x1'-x1=x2'-x2=hthick; + top y1'=top y2'=-bot_skip; top y1'-bot y1=top y2'-bot y2=dot_size; + dot(1,1'); dot(2,2'); +endchar; + +beginchar(bbhebvow[6],8u#+2appr#,0,bot_skip#+heb_size2#); + "Hebrew point segol"; + center_bar(3,3'); + lft x1-apprl=w-apprr-rt x2'=hround 0.5u; x1'-x1=x2'-x2=hthick; + top y1'=bot y3+heb_size2=-bot_skip; y2=y1; + top y1'-bot y1=top y2'-bot y2=top y3'-bot y3=dot_size; + dot(1,1'); dot(2,2'); dot(3,3'); +endchar; + +beginchar(bbhebvow[7],8u#+2appr#,0,bot_skip#+thin#); + "Hebrew point patah"; + center_bar(3,4); x3-x1=x2-x4=hround u; + top y1=top y2=-bot_skip; pickup square.nib; + draw z1..z2; labels(1,2); +endchar; + +beginchar(bbhebvow[8],8u#+2appr#,0,bot_skip#+heb_size1#); + "Hebrew point qamats"; + center_bar(4,5); x3=x4; x5=x6; x2-x5=x4-x1=hround u; + bot y4=bot y5=-d; top y1=-bot_skip; y1=y2=y3=y6; + pickup square.nib; draw z1..z2; draw z3--z4--z5--z6; + labels(1,2,3,4,5,6); +endchar; + +beginchar(bbhebvow[9],8u#+2appr#,x_height#+top_skip#+dot_size#,0); + "Hebrew point holam"; + italcorr asc_height#*slant-0.5u#; + pickup circle.nib; lft x1=apprl-hround u; x1'-x1=hthick; + top y1'=h; bot y1=h-dot_size; dot(1,1'); +endchar; + +beginchar(bbhebvow[11],8u#+2appr#,0,bot_skip#+heb_size2#); + "Hebrew point qubuts"; + center_bar(2,2'); lft x1-apprl=w-apprr-rt x3' + =hround min(0,(w-apprl-apprr)/3-hthick-thin-0.5u); + x1'-x1=x3'-x3=hthick; top y1'=bot y3+heb_size2=-bot_skip; + top y1'-bot y1=top y2'-bot y2=top y3'-bot y3=dot_size; + y2=good.y 0.5[y1,y3]; dot(1,1'); dot(2,2'); dot(3,3'); +endchar; + +beginchar(bbhebvow[12],8u#+2appr#, + 0.5(-cap_height#+dot_size#)+x_height#,0); + "Hebrew point dagesh or mapiq"; + pickup circle.nib; + top y3=top y4=h; top y3-bot y1=dot_size; y1=y2; + lft x1=lft x4=apprl; x2-x1=x3-x4=hthick; + pickup square.nib; draw z1--z2--z3--z4--cycle; + labels(1,2,3,4); +endchar; + +beginchar(bbhebvow[13],8u#+2appr#,0,bot_skip#+heb_size1#); + "Hebrew point meteg"; + center_bar(1,2); x1=x4; x2=x3; + bot y1=bot y2=-d; top y3=top y4=-bot_skip; + pickup square.nib; draw z1--z2--z3--z4--cycle; + labels(1,2,3,4); +endchar; + +beginchar(bbhebvow[14],6u#,cap_height#,0); + "Hebrew punctuation maqaf (hyphen dash)"; + italcorr .5x_height#*slant-.5u#; + penpos1(rule_thickness,90); penpos2(rule_thickness,90); + top y1r=top y2r=vround(.5h+.5rule_thickness); rt x2=hround(w-u); + lft x1=hround .2u; penstroke z1e--z2e; penlabels(1,2); +endchar; + +% humm +beginchar(bbhebvow[15],8u#+2appr#,x_height#+top_skip#+thin#,0); + "Hebrew point rafe"; + italcorr charht*slant-1.5u#; + center_bar(3,4); x3-x1=x2-x4=hround u; top y1=top y2=h; + pickup square.nib; draw z1..z2; labels(1,2); +endchar; + +beginchar(bbhebvow[16],5u#+2appr#,cap_height#,0); + "Hebrew punctuation paseq (vertical)"; + italcorr .5x_height#*slant-.5u#; + penpos1(rule_thickness,0); penpos2(rule_thickness,0); + top y1=h; bot y2=0; x1l=x2l=hround(.5w-.5rule_thickness); + penstroke z1e--z2e; penlabels(1,2); +endchar; + +beginchar(bbhebvow[17],8u#+2appr#,x_height#+top_skip#+dot_size#,0); + "Hebrew point shin dot"; + italcorr charht*slant+0.5u#; + pickup circle.nib; rt x1'=w-apprr+hround u; x1'-x1=hthick; + bot y1'=x_height+top_skip; top y1'-bot y1=dot_size; dot(1,1'); +endchar; + +beginchar(bbhebvow[18],8u#+2appr#,x_height#+top_skip#+dot_size#,0); + "Hebrew point sin dot"; + pickup circle.nib; lft x1=apprl-hround u; x1'-x1=hthick; + bot y1'=x_height+top_skip; top y1'-bot y1=dot_size; dot(1,1'); +endchar; + +beginchar(bbhebvow[19],5u#+2appr#,cap_height#,0); + "Hebrew punctuation sof pasuq (colon)"; + if not(odd(w-apprl-apprr)): change_width; fi + x0=x0'=0.5[apprl,w-apprr]; y0=floor(h-dot_size/sqrt 2)+0.5; + h-y0=y0'; + x3r-x1r=sqrt 2*(thick+thin)*(1++slant); + y2r-y4r=sqrt2*dot_size; + x0=x2r=x4r=0.5[x3r,x1r]; y0=y1r=y3r=0.5[y2r,y4r]; + z1a-z1r=(diag_width(thin,z2r-z1r),0); + z1b-z1r=(diag_width(thin,z4r-z1r),0); + z3a-z3r=(-diag_width(thin,z2r-z3r),0); + z3b-z3r=(-diag_width(thin,z4r-z3r),0); + z2l-z1a=whatever*(z2r-z1r); z2l-z3a=whatever*(z2r-z3r); + z4l-z1b=whatever*(z4r-z1r); z4l-z3b=whatever*(z4r-z3r); + z2l-z1l=whatever*(z2r-z1r); z4l-z1l=whatever*(z4r-z1r); + z2l-z3l=whatever*(z2r-z3r); z4l-z3l=whatever*(z4r-z3r); + forsuffixes $=1,2,3,4: + z$'.r-z0'=z$.r-z0; z$'.l-z0'=z$.l-z0; endfor + penstroke z1e--z2e--z3e--z4e--cycle; + penstroke z1'.e--z2'.e--z3'.e--z4'.e--cycle; + penlabels(1,2,3,4,1',2',3',4'); labels(1a,1b,2a,2b); +endchar; + +beginchar(bbhebvow[20],8u#+2appr#,x_height#+top_skip#+dot_size#,0); + "Hebrew mark upper dot"; + pickup circle.nib; center_bar(1,1'); + bot y1'=x_height+top_skip; top y1'-bot y1=dot_size; dot(1,1'); +endchar; + +standard_proofing;% restore extra_endchar. + +endinput; + +% from Bigelow and Holmes Unicode's Lucida + +beginchar(bbhebvow[23],8u#+2appr#,x_height#+top_skip#+dot_size#,0); + "Hebrew point breve"; + center_bar(4,5); x4-x1=x3-x5=hround u; x2=0.5[x1,x3]; + bot y2=x_height+top_skip; top y1-bot y2=dot_size; y1=y3=y4=y5; + draw z1 down_to_right z2 right_to_up z3; + square_end1(up); square_end3(up); + labels(1,2,3,4,5); +endchar; diff --git a/fonts/mbboard/source/mbbi10.mf b/fonts/mbboard/source/mbbi10.mf new file mode 100644 index 0000000000..18155ce69c --- /dev/null +++ b/fonts/mbboard/source/mbbi10.mf @@ -0,0 +1,18 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbi10.mf (parameters' file for 10 points italic fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbbi"; font_size 10pt#; + +slant:=0.25; +square_dots:=false; +variant_a:=false; variant_f:=true; +variant_g:=false; variant_y:=false; +old_digits:=true; square_hebrew:=false; +ab_up_factor:=0.05; ab_down_factor:=0.15; +hmn_factor:=0.15; uy_factor:=0.15; + +input mbblight; +input mbbdrivr;
\ No newline at end of file diff --git a/fonts/mbboard/source/mbblight.mf b/fonts/mbboard/source/mbblight.mf new file mode 100644 index 0000000000..8986ed8680 --- /dev/null +++ b/fonts/mbboard/source/mbblight.mf @@ -0,0 +1,100 @@ +% blackboard typefaces by Anthony Phan. +% file: mbblight.mf (parameters' file for all light fonts) +% last modification: 25.10.2001. + +numeric gen_; gen_=0; +for $=17pt#,12pt#,10pt#,9pt#,8pt#,7pt#,6pt#,5pt#: + if designsize<$: gen_:=gen_+1; fi +endfor; + +vardef gen(expr unit)(text t)= + save a,b; a=0; for $=t: + if gen_>=a: b:=$; fi + a:=a+1; endfor; b*unit +enddef; + +dh#:=0.6designsize; +superness:=(9/256)[sqrt 0.5,1]; +superbowl:=(25/256)[sqrt 0.5,1]; +math_spread:=gen(1)(-0.4,-0.2,0.2,0.4,0.6,0.8,1); + +% +% Specific parameters +% + +thin1# :=gen(1/36pt#)(18,14,12,11.5,11,10.5,10,9.5); + +thick1# :=gen(1/36pt#)(43.5*(32.5/20),43.5*(23.5/20),43.5,0.8[30,43.5], + 0.6[30,43.5],0.4[30,43.5],0.2[30,43.5],0.0[30,43.5]); + +Thick1# :=gen(1/36pt#)(47.25*(32.5/20),43.5*(23.5/20),47.25,0.8[33.5,47.25], + 0.6[33.5,47.25],0.4[33.5,47.25],0.2[33.5,47.25],0.0[33.5,47.25]); + +thin2# :=gen(1/36pt#)(18,14,12,11.5,11,10.5,10,9.5); + +thick2# :=gen(1/36pt#)(44.75*(32.5/20),43.5*(23.5/20),44.75,0.8[31,44.75], + 0.6[31,44.75],0.4[31,44.75],0.2[31,44.75],0.0[31,44.75]); + +Thick2# :=gen(1/36pt#)(48.75*(32.5/20),43.5*(23.5/20),48.75,0.8[34.5,48.75], + 0.6[34.5,48.75],0.4[34.5,48.75],0.2[34.5,48.75],0.0[34.5,48.75]); + +ess# :=gen(1/36pt#)(45*(32.5/20),43.5*(23.5/20),45,0.8[31,45], + 0.6[31,45],0.4[31,45],0.2[31,45],0.0[31,45]); + +cap_ess# :=gen(1/36pt#)(49*(32.5/20),43.5*(23.5/20),49,0.8[35,49], + 0.6[35,49],0.4[35,49],0.8[35,49],0.2[35,49],0.0[35,49]); + +dot_size#:=gen(1/36pt#)(66*(32.5/20),43.5*(23.5/20),55,49.5, + 44,38.5,33,27.5); + +% +% Relative (to Computer Modern) parameters +% + +u#:=gen(1/36pt#)( 32.5, 23.5, 20, 18.5, 17, 15.5, 14, 12.5); +letter_fit#:=gen(1/36pt#)( -0.1, 0, 0, 0, 0, 2, 3, 5); + +body_height# :=gen(1/36pt#)(466, 324, 270, 243, 216, 189, 162, 135); +asc_height# :=gen(1/36pt#)(432, 300, 250, 225, 200, 175, 150, 125); +cap_height# :=gen(1/36pt#)(425, 295.2, 246, 221.4, 196.8, 172.2, 147.6, 123); +fig_height# :=gen(1/36pt#)(401, 278.4, 232, 208.8, 185.6, 162.4, 139.2, 116); +x_height# :=gen(1/36pt#)(267.5, 186, 155, 139.5, 124, 108.5, 93, 77.5); +math_axis# :=gen(1/36pt#)(155.5, 108, 90, 81, 72, 63, 54, 45); +desc_depth# :=gen(1/36pt#)(121, 84, 70, 63, 56, 49, 42, 35); +o# :=gen(1/36pt#)(10, 9, 8, 7, 6, 5, 4.5, 4); +ho# :=gen(1/36pt#)(10, 9, 8, 7, 6, 5, 4.5, 4); + +rule_thickness#:=gen(1pt#)(0.60,0.44,0.4,0.38,0.36,0.34,0.31,0.28); + +endinput; + +% +% Extra parameters (not usefull and wrong) +% + +subs:=gen(1)(8/12,7/10,6/9,6/8,5/7,5/6,5/5); +rth'#:=0.4pt#; +fontdimen8: +math_axis#+3.51rth'#+36/36pt#+subs*desc_depth#, % num1 +math_axis#+1.51rth'#+gen(1/36pt#)(30,30,30,24,12,9,3), % num2 +math_axis#+1.51rth'#+gen(1/36pt#)(48,48,43,38,34,29,24), % num3 +-(math_axis#-3.51rth'#-subs*fig_height# + -gen(1/36pt#)(124,124,111,98,86,74,63)), % denom1 +-(math_axis#-1.51rth'#-subs*fig_height# + -gen(1/36pt#)(30,30,30,24,12,9,3)), % denom2 +gen(1pt#)(8.99,8.99,8.49,7.49,6.99,6.49,5.99)-subs*asc_height#,% sup1 +gen(1pt#)(8.49,8.49,7.99,7.99,6.49,5.99,5.49)-subs*asc_height#,% sup2 +gen(1/36pt#)(104,104,), % sup3 +gen(1/36pt#)(54,54,36,36,36,36,,36), % sub1 +-(if gen_<3:if gen_<2: 8.49pt# else: 7.99pt# fi + -2subs*asc_height#-0.31rth'# + else: gen(1/36pt#)(0,0,72,72,72,72) fi), % sub2 +subs*asc_height#-36/36pt#, % sup_drop +18/36pt#, % sub_drop +gen(1pt#)( 23.9, 23.9, 23.9, 11.9, 11.9, 11.9, 9.9), % delim1 +gen(1pt#)( 10.1, 10.1, 9.1, 9.1, 8.1, 8.1, 7.1), % delim2 +math_axis#; + + + + diff --git a/fonts/mbboard/source/mbbpunct.mf b/fonts/mbboard/source/mbbpunct.mf new file mode 100644 index 0000000000..66a939f8fe --- /dev/null +++ b/fonts/mbboard/source/mbbpunct.mf @@ -0,0 +1,549 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbpunct.mf (punctuation) +% last modification: 25.10.2001. + +def horizontal_rules_list= + -body_depth,-desc_depth,x_height,cap_height,asc_height,body_height +enddef; + +use_rule1; + +iff known bbnormal_space: +beginchar(bbnormal_space,6u#+2letter_fit#,0,0); + "Normal space"; +endchar; + +iff known bbcompound_word_mark: +beginchar(bbcompound_word_mark,0,x_height#,0); + "Compound word mark"; +endchar; + +beginchar(bbexclamation_point,hthick#+thin#+2appr#, + asc_height#,0); + "Exclamation point"; + italcorr (asc_height# + if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + center_bar(1,1'); bot y1=0; top y1'=dot_size; dot(1,1'); + if square_dots: bot y2=vround 0.25[top y1',x_height]; + y5=y2; x2=x3=x1; x4=x5=x1'; top y3=top y4=h; + pickup square.nib; draw z2--z3--z4--z5--cycle; + labels(2,3,4,5); + else: top y7=h+o; bot y2=vround 0.25[top y1',x_height]; + y4-y2=0.25dot_size; y7-y6=0.5dot_size; + x2=x3=x4=x5=x6=x7=0.5[x1,x1']; + numeric a,r,R; + R=0.5max(dot_size-thin,0); + r=0.5max(0.5dot_size-thin,0); + a=(R-r)/(y6-y4); + y6-y5=R*a; y4-y3=r*a; + penpos6(hthick,0); penpos5(hthick*(1+-+a),0); + penpos3(0.5hthick*(1+-+a),0); + draw z2...z3r---z5r...z6r up_to_left z7 + left_to_down z6l...z5l---z3l...cycle; + labels(2,4,6); penlabels(3,5,6); fi +endchar; + +beginchar(bbspanish_shriek,hthick#+thin#+2appr#, + asc_height#-desc_depth#,desc_depth#); + "Spanish open exclamation point"; + italcorr (asc_height#-desc_depth# + if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + center_bar(1,1'); top y1=h; top y1-bot y1'=dot_size; + dot(1,1'); + if square_dots: top y2=vround 0.25[bot y1',h-x_height]; + y5=y2; x2=x3=x1; x4=x5=x1'; bot y3=bot y4=-d; + pickup square.nib; draw z2--z3--z4--z5--cycle; + labels(2,3,4,5); + else: bot y7=-d-o; top y2=vround 0.25[bot y1',h-x_height]; + y4-y2=-0.25dot_size; y7-y6=-0.5dot_size; + x2=x3=x4=x5=x6=x7=0.5[x1,x1']; + numeric a,r,R; + R=0.5max(dot_size-thin,0); + r=0.5max(0.5dot_size-thin,0); + a=(R-r)/(y6-y4); + y6-y5=R*a; y4-y3=r*a; + penpos6(hthick,0); penpos5(hthick*(1+-+a),0); + penpos3(0.5hthick*(1+-+a),0); + draw z2...z3r---z5r...z6r up_to_left z7 + left_to_down z6l...z5l---z3l...cycle; + labels(2,4,6); penlabels(3,5,6); fi +endchar; + +beginchar(bbquestion_mark,8u#+2appr#,asc_height#,0); + "Question mark"; + italcorr 0.9asc_height#*slant-0.5u#; + center_bar(1,2); bot y1=0; top y2=dot_size; + x5=x2; bot y3=vround 0.25[top y2,x_height]; + x9=0.5[x1,x2]; top y9=h+o; rt x7=w-apprr+ho; + lft x11=apprl; slope:=2(y9-y3)/24u; + y5-y3=slope*(x5-x1); ellipse_set(9,7,6,5); + if square_dots: y4=y3; x12=x3=x1; x4=x2; + y5+y0-y12=slope*(x5+x0-x12); + else: x3=0.5[x1,x2]; x3a=0.25[x1,x2]; + x4=0.75[x1,x2]; y4=y3a=0.5[y3,y5]; z12=z5+z0; fi + z0=(thick*unitvector((z6-z5)slanted slant) + rotated 90)slanted -slant; + x14=x7+x0; ellipse_set(9,14,13,12); bot y11=vround y7; + if square_dots: + y3l-y3=y3-y3r=y4l-y4=y4-y4r=0.5thin; + x3l-x3=x3-x3r=x4r-x4=x4-x4l=0.5thin*(1++slant); + x12l=x3l; x12r=x3r; x5r=x4r; x5l=x4l; + ortho_penpos6(thin,z6-z5); ortho_penpos13(thin,z12-z13); + z12l-z13l=whatever*(z12-z13); z12r-z13r=whatever*(z12-z13); + z5l-z6l=whatever*(z5-z6); z5r-z6r=whatever*(z5-z6); + penstroke z13e--z12e--z3e--z4e--z5e--z6e; + draw z9 right_to_down z14...{z12-z13}z13; + draw z6{z6-z5}...z7 up_to_left z9 left_to_down z11; + else: draw z9 right_to_down z14...z13---z12...z3a + ...z3{right}...z4...z5---z6...z7 up_to_left z9 + left_to_down z11; + fi + dot(1,2); square_end11(down); + labels(3a,7,8,9,10,11,14,15); penlabels(3,4,5,6,12,13); +endchar; + +beginchar(bbspanish_query,8u#+2appr#, + asc_height#-desc_depth#,desc_depth#); + "Spanish open question mark"; +% no italic correction + center_bar(2,1); top y1=h; bot y2=h-dot_size; + x5=x2; top y3=vround 0.25[bot y2,h-x_height]; + x9=0.5[x1,x2]; bot y9=-d-o; lft x7=apprl-ho; rt x11=w-apprr; + slope:=-2(y9-y3)/24u; + y5-y3=slope*(x5-x1); ellipse_set(9,7,6,5); + if square_dots: y4=y3; x12=x3=x1; x4=x2; + y5+y0-y12=slope*(x5+x0-x12); + else: x3=0.5[x1,x2]; x3a=0.25[x1,x2]; x4=0.75[x1,x2]; + y4=y3a=0.5[y3,y5]; z12=z5+z0; fi + z0=(thick*unitvector((z6-z5)slanted slant) + rotated 90)slanted -slant; + x14=x7+x0; ellipse_set(9,14,13,12); top y11=vround y7; + if square_dots: + y3l-y3=y3-y3r=y4l-y4=y4-y4r=-0.5thin; + x3l-x3=x3-x3r=x4r-x4=x4-x4l=-0.5thin*(1++slant); + x12l=x3l; x12r=x3r; x5r=x4r; x5l=x4l; + ortho_penpos6(thin,z6-z5); ortho_penpos13(thin,z12-z13); + z12l-z13l=whatever*(z12-z13); z12r-z13r=whatever*(z12-z13); + z5l-z6l=whatever*(z5-z6); z5r-z6r=whatever*(z5-z6); + penstroke z13e--z12e--z3e--z4e--z5e--z6e; + draw z9 left_to_up z14{up}...{z12-z13}z13; + draw z6{z6-z5}...z7 down_to_right z9 right_to_up z11; + else: draw z9 left_to_up z14{up}...z13---z12...z3a + ...z3{left}...z4...z5---z6...z7 down_to_right z9 + right_to_up z11; + fi + dot(1,2); square_end11(up); + labels(3a,7,8,9,10,11,14,15); penlabels(3,4,5,6,12,13); +endchar; + +beginchar(bbasterisk,7u#+2appr#,body_height#,0); + "Asterisk"; + italcorr body_height#*slant-.5u#; + numeric a,b; a=round(x_height/(1+cosd 36)); b=vround 0.85thin; + x0=floor(w/2)+0.5; y0=h-a; x1r=x0; y1r=h+0.5; + y3r=y9r=vround(y0+a*cosd 72); x3r-x0=x0-x9r=round(a*sind 72); + y5r=y7r=vround(y0+a*cosd 144)-0.5; x5r-x0=x0-x7r=hround(a*sind 144); + for i=0 upto 4: z[1+2i]l=z[1+2i]r + +unitvector((z[1+(2i+4)mod 10]r-z[1+2i]r)slanted slant) + rotated -90 scaled b slanted -slant + +whatever*(z[1+(2i+4)mod 10]r-z[1+2i]r); + z[1+2i]l=z[1+2i]r + +unitvector((z[1+(2i-4)mod 10]r-z[1+2i]r)slanted slant) + rotated 90 scaled b slanted -slant + +whatever*(z[1+(2i-4)mod 10]r-z[1+2i]r); + endfor + for i=0 upto 4: + z[2i+2]r=whatever[z[2i+1]r,z[(2i+5)mod 10]r]; + z[2i+2]r=whatever[z[(2i-1)mod 10]r,z[(2i+3)mod 10]r]; + z[2+2i]l=whatever[z[1+2i]l,z[1+(2i+4)mod 10]l]; + z[2+2i]l=whatever[z[1+(2i-2)mod 10]l,z[1+(2i+2)mod 10]l]; + endfor + penstroke for i=0 upto 4: z[1+2i]e--z[2+2i]e-- endfor cycle; + penlabels(0,1,2,3,4,5,6,7,8,9,10); +endchar; + +beginchar(bbperiod,hthick#+thin#+2appr#,dot_size#,0); + "Period"; + italcorr (dot_size# if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + center_bar(1,1'); bot y1=0; top y1'=dot_size; dot(1,1'); +endchar; + +beginchar(bbcomma,hthick#+thin#+2appr#, + dot_size#,comma_size#-dot_size#); + "Comma"; + italcorr (dot_size# if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + center_bar(5,3); top y4=dot_size; lft x1=apprl-hround u; + top y4-bot y1=comma_size; complete_comma; +endchar; + +beginchar(bbsemicolon,hthick#+thin#+2appr#, + x_height#,comma_size#-dot_size#); + "Semicolon"; + italcorr (x_height# if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + center_bar(5,3); top y4=dot_size; lft x1=apprl-hround u; + top y4-bot y1=comma_size; complete_comma; + pickup circle.nib; x7=x5; x7'=x3; top y7'=h; + bot y7=h-dot_size; dot(7,7'); +endchar; + +beginchar(bbcolon,hthick#+thin#+2appr#,x_height#,0); + "Colon"; + italcorr (x_height# if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + center_bar(1,1'); x2=x1; x2'=x1'; bot y1=0; top y2'=h; + top y1'-bot y1=top y2'-bot y2=dot_size; dot(1,1'); dot(2,2'); +endchar; + +iff known bbhyphenchar: +beginchar(bbhyphenchar,4u#+2appr#,x_height#,0); + "hyphenchar"; + italcorr .5x_height#*slant-.5u#; + penpos1(rule_thickness,90); penpos2(rule_thickness,90); + top y1r=top y2r=vround(.5h+.5rule_thickness); + rt x2=w-apprr; lft x1=apprl-hround .8u; + penstroke z1e--z2e; penlabels(1,2); +endchar; + +iff known bbdash: +beginchar(bbdash,4u#+2appr#,x_height#,0); + "dash"; + italcorr .5x_height#*slant-.1u#; + penpos1(rule_thickness,90); penpos2(rule_thickness,90); + top y1r=top y2r=vround(.5h+.5rule_thickness); + rt x2=w-apprr+hround 0.4u; lft x1=apprl-hround .4u; + penstroke z1e--z2e; penlabels(1,2); +endchar; + +beginchar(bben_dash,9u#+2letter_fit#,x_height#,0); + "En dash"; + italcorr 0.61803x_height#*slant+0.5u#; + penpos1(thin,90); penpos2(thin,90); + y1r=y2r=good.y(y1r+0.61803h-y1); + x1=w-x2=hround 0.5(w-9u); + penstroke z1e..z2e; penlabels(1,2); +endchar; + +beginchar(bbem_dash,18u#+4letter_fit#,x_height#,0); + "Em dash"; + italcorr 0.61803x_height#*slant+0.5u#; + penpos1(thin,90); penpos2(thin,90); + y1r=y2r=good.y(y1r+0.61803h-y1); + x1=w-x2=hround 0.5(w-18u); + penstroke z1e..z2e; penlabels(1,2); +endchar; + +iff known bbunderscore: +beginchar(bbunderscore,18u#+4letter_fit#,0,paren_depth#); + "Underscore"; + % no italic correction + penpos1(thin,90); penpos2(thin,90); + y1l=y2l=-d; x1=w-x2=hround 0.5(w-18u); + penstroke z1e..z2e; penlabels(1,2); +endchar; + +beginchar(bbapostrophe,hthick#+thin#+2appr#,asc_height#,0); + "Apostrophe"; + italcorr (asc_height# if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + center_bar(5,3); top y4=h; lft x1=apprl-hround u; + top y4-bot y1=comma_size; complete_comma; +endchar; + +beginchar(bbreverse_apostrophe,hthick#+thin#+2appr#,asc_height#,0); + "Reverse apostrophe"; + italcorr asc_height#*slant+0.5u#; + center_bar(3,5); top y1=h; rt x1=w-apprr+hround u; + top y1-bot y4=comma_size; complete_comma; +endchar; + +beginchar(bbopening_quotes,7u#+2appr#,asc_height#,0); + "Opening quotes"; + italcorr asc_height#*slant+0.5u#; + pickup circle.nib; + rt x5=w-apprr; x5-x3=hthick; top y1=h; rt x1=hround(w-apprr+u); + top y1-bot y4=comma_size; complete_comma; + addto currentpicture + also currentpicture shifted (apprl-lft x3,0); +endchar; + +beginchar(bbclosing_quotes,7u#+2appr#,asc_height#,0); + "Closing quotes"; + italcorr (asc_height# if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + pickup circle.nib; + lft x5=apprl; x3-x5=hthick; top y4=h; lft x1=hround(apprl-u); + top y4-bot y1=comma_size; complete_comma; + addto currentpicture + also currentpicture shifted (w-apprr-rt x3,0); +endchar; + +iff known bbgerman_opening_comma: +beginchar(bbgerman_opening_comma, + hthick#+thin#+2appr#,dot_size#,comma_size#-dot_size#); + italcorr (dot_size# if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + "German opening comma"; + center_bar(5,3); top y4=dot_size; lft x1=apprl-hround u; + top y4-bot y1=comma_size; complete_comma; +endchar; + +iff known bbgerman_opening_quotes: +beginchar(bbgerman_opening_quotes,7u#+2appr#,dot_size#, + comma_size#-dot_size#); + "German opening quotes"; + italcorr (dot_size# if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + pickup circle.nib; + lft x5=apprl; x3-x5=hthick; top y4=h; + lft x1=hround(apprl-u); top y4-bot y1=comma_size; + complete_comma; + addto currentpicture + also currentpicture shifted (w-apprr-rt x3,0); +endchar; + +iff known bbstraight_quotes: +beginchar(bbstraight_quotes,7u#+2appr#,asc_height#,0); + "Straight quotes"; + italcorr (asc_height# if not square_dots: -0.4dot_size# fi)*slant-0.5u#; + pickup circle.nib; + if square_dots: + lft x1-apprl=w-apprr-rt x6=0; x1=x4; x6=x7; + x2-x1=x3-x4=x6-x5=x7-x8=hthick; + top y3=h; y3=y4=y7=y8; top y1=x_height; y1=y2=y5=y6; + pickup square.nib; draw z1--z2--z3--z4--cycle; + draw z5--z6--z7--z8--cycle; labels(1,2,3,4,5,6,7,8); + else: + y1=y3=x_height-thin+0.25dot_size; y2=y4=h-0.5dot_size; + x1=x2=apprl+0.5(thin+hthick); x3=x4=w-apprr-0.5(thin+hthick); + long_dot(1,2); long_dot(3,4); + fi +endchar; + +if (known bbfso_quotes)or(known bbfsc_quotes) + or(known bbfdo_quotes)or(known bbfdc_quotes): + def complete_quote(expr $,$$,$$$)= + h-y[$]r=y[$+2]r=hround 0.06h; y[$+1]l=0.5[y[$]r,y[$+2]r]; + x[$]r=x[$+2]r=x[$+1]l if $$$>0: + else:- fi(hround 4u+2eps)=$$; + adjust_slanted_bar([$+1]l,[$]r,[$+1]a,[$]l) + (thin,if $$$>0: -1 else: 1 fi); + adjust_slanted_bar([$+1]l,[$+2]r,[$+1]b,[$+2]l) + (thin,if $$$>0:1 else: -1 fi); + z[$+1]r-z[$]r=whatever*(z[$+1]l-z[$]l); + z[$+1]r-z[$+2]r=whatever*(z[$+1]l-z[$+2]l); + penstroke z[$]e--z[$+1]e--z[$+2]e; + penlabels([$],[$+1],[$+2]); labels([$+1]a,[$+1]b); + enddef; +fi + +iff known bbfso_quotes: +beginchar(bbfso_quotes,6u#+2appr#,x_height#,0); + "French single opening quote"; + italcorr x_height#*slant-0.5u#; + complete_quote(1,w-apprr-hround u+eps,1); +endchar; + +iff known bbfsc_quotes: +beginchar(bbfsc_quotes,6u#+2appr#,x_height#,0); + "French single closing quote"; +% no italic correction + complete_quote(1,apprl+hround u-eps,-1); +endchar; + +iff known bbfdo_quotes: +beginchar(bbfdo_quotes,8u#+2appr#,x_height#,0); + "French double opening quote"; + italcorr x_height#*slant-0.5u#; + complete_quote(1,w-apprr+eps,1); + complete_quote(4,w-apprr-hround 3u+eps,1); +endchar; + +iff known bbfdc_quotes: +beginchar(bbfdc_quotes,8u#+2appr#,x_height#,0); + "French double closing quote"; +% no italic correction + complete_quote(1,apprl-eps,-1); + complete_quote(4,apprl+hround 3u-eps,-1); +endchar; + +% +% delimiters (see bbbigdel.mf if it still exists) +% + +iff known parenthesis_left: +beginchar(parenthesis_left,5.5u#+2appr#,body_height#,paren_depth#); + "Left parenthesis"; + pickup circle.nib; + top y1=h; bot y3=-d; y2=0.5[y1,y3]; + rt x1=rt x3=w-apprr; x4-x2=hthick; + lft x2=min(apprl+hround u-ho, + hround 0.5(w+apprl-apprr-thin-hthick)-eps); + tmp_path:=z1{3(x2-x1),y2-y1}...z2{down}...z3{3(x3-x2),y3-y2}; + z4=tmp_path intersectionpoint ((x4,y1)..(x4,y2)); + z5=tmp_path intersectionpoint ((x4,y3)..(x4,y2)); + draw tmp_path; draw z4..z5; + square_end1((3(x1-x2),y1-y2)); + square_end3((3(x3-x2),y3-y2)); + labels(1,2,3,4,5); +endchar; + +iff known parenthesis_right: +beginchar(parenthesis_right,5.5u#+2appr#,body_height#,paren_depth#); + "Right parenthesis"; + pickup circle.nib; + top y1=h; bot y3=-d; y2=0.5[y1,y3]; + lft x1=lft x3=apprl; x4-x2=-hthick; + rt x2=max(w-apprr-hround u+ho, + hround 0.5(w+apprl-apprr+thin+hthick)+eps); + tmp_path:=z1{3(x2-x1),y2-y1}...z2{down}...z3{3(x3-x2),y3-y2}; + z4=tmp_path intersectionpoint ((x4,y1)..(x4,y2)); + z5=tmp_path intersectionpoint ((x4,y3)..(x4,y2)); + draw tmp_path; draw z4..z5; + square_end1((3(x1-x2),y1-y2)); + square_end3((3(x3-x2),y3-y2)); + labels(1,2,3,4,5); +endchar; + +def tmp_program(expr orientation,top_f,bot_f)= + save a; + a=hround(thin*(1++slant)); + y6r=h; y8r=-d-1; y5r=top_f[y6r,y8r]; y7r=bot_f[y8r,y6r]; + if orientation=left: + forsuffixes @#=1,2,3,4: x@#r-x@#=x@#-x@#l=-0.5a; endfor + x1r=x2r=x5r=x7r=min(apprl+hround u, + hround 0.5(w+apprl-apprr-a-hthick)); + x1-x3=x2-x4=-hthick; x6r=x8r=w-apprr+hround 0.5u; + else: + forsuffixes @#=1,2,3,4: x@#r-x@#=x@#-x@#l=0.5a; endfor + x1r=x2r=x5r=x7r=max(w-apprr-hround u, + hround 0.5(w+apprl-apprr+a+hthick)); + x1-x3=x2-x4=hthick; x6r=x8r=apprl-hround 0.5u; + fi + forsuffixes @=1,1r,1l,3,3r,3l: z@=whatever[z5r,z6r]; endfor + forsuffixes @=2,2r,2l,4,4r,4l: z@=whatever[z7r,z8r]; endfor + penpos5(thin/abs cosd angle((z6r-z5r)slanted slant),90); + penpos6(thin/abs cosd angle((z6r-z5r)slanted slant),90); + penpos7(thin/abs cosd angle((z8r-z7r)slanted slant),-90); + penpos8(thin/abs cosd angle((z8r-z7r)slanted slant),-90); + penstroke z1e..z2e; penstroke z3e..z4e; + penstroke z5e..z6e; penstroke z7e..z8e; + penlabels(1,2,3,4,5,6,7,8); +enddef; + +iff known bracket_left: +beginchar(bracket_left,5.5u#+2appr#,body_height#,paren_depth#); + "Left bracket"; + tmp_program(left,0,0); +endchar; + +iff known bracket_right: +beginchar(bracket_right,5.5u#+2appr#,body_height#,paren_depth#); + "Right bracket"; + tmp_program(right,0,0); +endchar; + +iff known angle_left: +beginchar(angle_left,5.5u#+2appr#,body_height#,paren_depth#); + "Left angle bracket"; + tmp_program(left,.15,.15); +endchar; + +iff known angle_right: +beginchar(angle_right,5.5u#+2appr#,body_height#,paren_depth#); + "Right angle angle"; + tmp_program(right,.15,.15); +endchar; + +vardef tmp_program(expr orientation)= + path tmppp_path,tmpppp_path; + pickup circle.nib; + if orientation=left: + lft x1=apprl-hround 0.5u; + rt x4r=w-apprr+hround 0.5u; + x6r=good.x 0.5(x1+x4r-hthick); x3r-x6r=hthick; + else: + rt x1=w-apprr+hround 0.5u; + lft x4r=apprl-hround 0.5u; + x6r=good.x 0.5(x1+x4r+hthick); x3r-x6r=-hthick; + fi + x2-x1=x4r-x5r=0.25(x6r-x1); + x3r=x3l; x4l=x4r; x5r=x5l; x6r=x6l; + y1=y2=good.y 0.5[-d,h]; + top y4r=top y5r=h; y1-y4l=y1-y5l=y4r-y1; + y5r-y6r=y3r-y1=y6l-y5l=y1-y3l=min(0.4(y5r-y1),0.75dh); + tmp_path:=z1..z2 right_to_up z3r; + tmpp_path:=z4r..z5r left_to_down z6r; + tmppp_path=z2 right_to_down z3l; + tmpppp_path=z4l..z5l left_to_up z6l; + draw tmp_path; draw tmpp_path; + draw tmppp_path; draw tmpppp_path; + hbbowl(z2,z3r,(x3r,y6r),abs(x3r-x6r)) tmp_path; + hbbowl(z2,z3l,(x3l,y6l),abs(x3l-x6l)) tmppp_path; + hbbowl(z5r,z6r,(x6r,y3r),abs(x3r-x6r)) tmpp_path; + hbbowl(z5l,z6l,(x6l,y3l),abs(x3l-x6l)) tmpppp_path; + square_end1((x1-x4r,0)); + square_end4r((x4r-x1,0)); + square_end4l((x4l-x1,0)); + penlabels(1,2,3,4,5,6); +enddef; + +iff known brace_left: +beginchar(brace_left,5.5u#+2appr#,body_height#,paren_depth#); + "Left brace"; + tmp_program(left); +endchar; + +iff known brace_right: +beginchar(brace_right,5.5u#+2appr#,body_height#,paren_depth#); + "Right brace"; + tmp_program(right); +endchar; + +% the widths of the two next characters are calculated +% to fit computer modern corresponding ones. + +iff known vertical: +beginchar(vertical,3u#+2appr#,body_height#,paren_depth#); + "Vertical"; + save a; a=hround(thin*(1++slant)); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + penpos5(thin,90); penpos6(thin,90); penpos7(thin,90); penpos8(thin,90); + x1l=x2l=x5r=x7l=hround 0.5(w+apprl-apprr-hthick-a); + x3r=x4r=x6r=x8l=x1l+hthick+a; + y1=y3=y5r=y6r=h+1; y2=y4=y7l=y8l=-d-1; + penstroke z1e..z2e; penstroke z3e..z4e; + penstroke z5e..z6e; penstroke z7e..z8e; + penlabels(1,2,3,4,5,6,7,8); +endchar; + +numeric slash_width#; +slash_width#=(7u#-rule_thickness#) +*((body_height#+paren_depth#)/(body_height#+paren_depth#-rule_thickness#)) ++diag_width(thick#, + (7u#-rule_thickness#,body_height#+paren_depth#-rule_thickness#)); + +beginchar(bbslash,slash_width#+2appr#, + body_height#,paren_depth#); + "Slash"; + italcorr body_height#*slant-.5u#; + x1r=w-apprr+0.5u; x4l=apprl-0.5u; y1r=h; y4l=-d; + adjust_slanted_bar(1r,4l,2l,3r)(thick+thin,-1); + a:=diag_width(thin,z1r-z3r); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + y1-y1a=thin; z1a=whatever[z1,z3]; z1-z1a=z2-z2a=z3a-z3=z4a-z4; + penstroke z1e..z3e; penstroke z2e..z4e; fill z1--z2--z2a--z1a--cycle; + fill z3--z4--z4a--z3a--cycle; penlabels(1,2,3,4); labels(1a,2a,3a,4a); +endchar; + +numeric slash_width#; +slash_width#=(7u#-rule_thickness#) +*((body_height#+paren_depth#)/(body_height#+paren_depth#-rule_thickness#)) ++diag_width(thick#, + (-7u#+rule_thickness#,body_height#+paren_depth#-rule_thickness#)); + +beginchar(bbback_slash,slash_width#+2appr#, + body_height#,paren_depth#); + "Backlash"; + italcorr body_height#*slant-.5u#; + x1l=apprl-0.5u; x4r=w-apprr+0.5u; y1l=h; y4r=-d; + adjust_slanted_bar(1l,4r,2r,3l)(thick+thin,1); + a:=diag_width(thin,z1l-z3l); + penpos1(a,0); penpos2(a,0); penpos3(a,0); penpos4(a,0); + y1-y1a=thin; z1a=whatever[z1,z3]; z1-z1a=z2-z2a=z3a-z3=z4a-z4; + penstroke z1e..z3e; penstroke z2e..z4e; fill z1--z2--z2a--z1a--cycle; + fill z3--z4--z4a--z3a--cycle; penlabels(1,2,3,4); labels(1a,2a,3a,4a); +endchar; diff --git a/fonts/mbboard/source/mbbr10.mf b/fonts/mbboard/source/mbbr10.mf new file mode 100644 index 0000000000..4969e7c2f1 --- /dev/null +++ b/fonts/mbboard/source/mbbr10.mf @@ -0,0 +1,23 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbr10.mf (parameters' file for 10 points roman fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 10pt#; + +slant:=0; +square_dots:=false; +straight_bowl:=false; +%numeric bowl_max_height; +math_fitting:=false; +variant_a:=true; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0.05; ab_down_factor:=0.15; +hmn_factor:=0.3; +uy_factor:=0.15; +def extra_font_setup=bowl_max_height:=x_height-thin enddef; + +input mbblight; +input mbbdrivr;
\ No newline at end of file diff --git a/fonts/mbboard/source/mbbrbx10.mf b/fonts/mbboard/source/mbbrbx10.mf new file mode 100644 index 0000000000..a5c9da5476 --- /dev/null +++ b/fonts/mbboard/source/mbbrbx10.mf @@ -0,0 +1,23 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbrbx10.mf (parameters' file for 10 points roman fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 10pt#; + +slant:=0; +square_dots:=false; +straight_bowl:=false; +%numeric bowl_max_height; +math_fitting:=false; +variant_a:=true; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0.05; ab_down_factor:=0.15; +hmn_factor:=0.3; +uy_factor:=0.15; +def extra_font_setup=bowl_max_height:=x_height-thin enddef; + +input mbbxbold; +input mbbdrivr;
\ No newline at end of file diff --git a/fonts/mbboard/source/mbbromlg.mf b/fonts/mbboard/source/mbbromlg.mf new file mode 100644 index 0000000000..16c326d35b --- /dev/null +++ b/fonts/mbboard/source/mbbromlg.mf @@ -0,0 +1,191 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbromlg.mf (truly ligatured letters) +% last modification: 25.10.2001. + +def horizontal_rules_list= + -body_depth,-desc_depth,0.5x_height,x_height,cap_height, + asc_height,body_height +enddef; + +use_rule1; + +% Special rules govern `f'-ligatures. First `f'-width is +% hthick#+thin#+u#+2appr#, the middle bar is 2u# large. +% For `ff' or `fi' or `fl', the two vertical stems should +% be as distant as in `n'. Furthermore, those stems should +% be as distant as two adjacent `i', so the letter_fit# +% as to be taken into account. Then, I take the maximum. +% Alas, those rules are not very stable at low resolution. + +beginchar(bblig_ff,max(9u#+2appr#,2hthick#+2thin#+u#+4appr#), + asc_height#,if variant_f: desc_depth# else: 0 fi); + "The ligature ff"; + italcorr asc_height#*slant+1.5u#; + pickup circle.nib; lft x1=apprl; rt x4=w-apprr-hround u; + x2-x1=x4-x3=hthick; x5=x2; x6=x3; x7=x4; x8-x7=hround 2u; + top y5=x_height; y5=y6=y7=y8; draw z5..z6; draw z7..z8; + complete_f_stroke(1,2,hround 3u,true); + complete_f_stroke(3,4,hround 3u,true); + square_end8(right); + labels(5,6,7,8); +endchar; + +beginchar(bblig_fi,max(8u#+2appr#,2hthick#+2thin#+4appr#), + asc_height#,if variant_f: desc_depth# else: 0 fi); + "The ligature f_i"; + if square_dots: italcorr asc_height#*slant-.5u#; + else: italcorr (asc_height#-0.4dot_size#)*slant-.5u#; fi + pickup circle.nib; + lft x1=apprl; rt x4=w-apprr; x2-x1=x4-x6=hthick; + x3=x2; x4=x5=x8; x6=x7=x9; + top y3=x_height; y3=y4=y7; bot y5=bot y6=0; + top y8=h; top y8-bot y9=dot_size; + draw z3..z4; draw z6..z7; + complete_f_stroke(1,2,x9-x2,false); + pickup square.nib; draw z4--z5--z6--z7; + if square_dots: z8.a=(x8,y9); + draw z1.a--z8--z8.a--z9--cycle; + else: pickup circle.nib; x8.a=x9.a=0.5[x8,x9]; + y8.b=y9.b=0.5[y9,y8]; y8=y8.a; x8=x8.b; y9=y9.a; x9=x9.b; + draw z1.a..z8.a right_to_down z8.b down_to_left z9.a + left_to_up z9.b..z1.a; labels(8.b,9.a,9.b); + fi + labels(3,4,5,6,7,8,8.a,9); +endchar; + +beginchar(bblig_fl,max(8u#+2appr#,2hthick#+2thin#+4appr#), + asc_height#,if variant_f: desc_depth# else: 0 fi); + "The ligature fl"; + italcorr asc_height#*slant-0.5u#; + pickup circle.nib; lft x1=apprl; rt x3=rt x4=w-apprr; + x2-x1=x4-x5=hthick; x6=x2; x7=x5; + top y6=top y7=x_height; top y3=h; bot y4=bot y5=0; + draw (x5,y3)..z3; draw z6..z7; + complete_f_stroke(1,2,x5-x2,false); + pickup square.nib; draw z3--z4--z5--z1.a; + labels(3,4,5,6,7); +endchar; + +beginchar(bblig_ffl,max(16u#-hthick#-thin#+2appr#, + 3hthick#+3thin#+6appr#), + asc_height#,if variant_f: desc_depth# else: 0 fi); + "The ligature ffl"; + italcorr asc_height#*slant-0.5u#; + center_bar(3,4); lft x1=apprl; rt x5=rt x6=w-apprr; + x2-x1=x6-x7=hthick; x8=x2; x9=x3; x10=x4; x11=x7; + top y8=x_height; y8=y9=y10=y11; top y5=h; bot y6=bot y7=0; + draw (x7,y5)..z5; draw z8..z9; draw z10..z11; + complete_f_stroke(1,2,hround 3u,true); + complete_f_stroke(3,4,x7-x4,false); + pickup square.nib; draw z5--z6--z7--z3.a; + labels(5,6,7,6,7,8,9,10,11); +endchar; + +beginchar(bblig_ffi,max(16u#-hthick#-thin#+2appr#, + 3hthick#+3thin#+6appr#), + asc_height#,if variant_f: desc_depth# else: 0 fi); + "The ligature ffi"; + if square_dots: italcorr asc_height#*slant-.5u#; + else: italcorr (asc_height#-0.4dot_size#)*slant-.5u#; fi + center_bar(3,4); + lft x1=apprl; rt x8=w-apprr; x2-x1=x8-x10=hthick; + x5=x2; x6=x3; x7=x4; x8=x9=x12; x10=x11=x13; + top y5=x_height; y5=y6=y7=y8=y11; bot y9=bot y10=0; + top y12=h; top y12-bot y13=dot_size; + draw z5..z6; draw z7..z8; + complete_f_stroke(1,2,hround 3u,true); + complete_f_stroke(3,4,x13-x4,false); + pickup square.nib; draw z8--z9--z10--z11; + if square_dots: z12.a=(x12,y13); + draw z3.a--z12--z12.a--z13--cycle; + else: pickup circle.nib; x12.a=x13.a=0.5[x12,x13]; + y12.b=y13.b=0.5[y13,y12]; y12=y12.a; + x12=x12.b; y13=y13.a; x13=x13.b; + draw z3.a..z12.a right_to_down z12.b down_to_left z13.a + left_to_up z13.b..z3.a; labels(12.b,13.a,13.b); + fi + labels(5,6,7,8,9,10,11,12,12.a,13); +endchar; + +iff known bblig_ct: +beginchar(bblig_ct,13u#+4appr#,min(asc_height#,10/7x_height#),0); + "The ligature ct"; + italcorr x_height#*slant-0.5thin#-0.5u#; + pickup circle.nib; + numeric t_w; t_w=hround((2appr#+6u#)*hppp); +% the "t" part + rt x1=rt x2=w-apprr; x3=0.5[x2,x4]; + lft x4=lft x5=w-t_w+apprl; rt x8=floor x1; + top y7=top y8=x_height; bot y3=-oo; + top y5=h; y2=y4=0.3[y3,y8]; + top y1=max(vround 0.42x_height,top y2); + tmp_path:=z1..z2 down_to_left z3 left_to_up z4..z5; + % the "c" part + x11=x15=w-apprr-t_w; lft x13=apprl-ho; + top y12=x_height+uo; bot y14=-oo; y13=0.5[y14,y12]; + y11=0.707[y13,y12]; y15=0.707[y13,y14]; + tmpp_path:=reverse elliptic_arc(13,12,11)&elliptic_arc(13,14,15); + % the ligature part + top y20=top y23=h; z20=whatever[z11',z11]; + z22=0.5[z20,0.5[z11,z5]]; + z21=0.25[z11,z20]; z23=0.25[z5,z20]; + draw z11---z21...z22{z5-z11}...z23---z5; + draw tmp_path; draw tmpp_path; + bbbowl(z12,z13,z14,hThick) tmpp_path; + hbbowl(z3,z4,z5,hthick) tmp_path; + x7=rt x.bowl.mid; + pickup square.nib; + draw z7..z8; draw z5..z.bowl.bot; + square_end1(up); + square_end11(z11-z11'); + square_end15(z15-z15'); + labels(range 0 thru 23,11',15'); +endchar; + +iff known bblig_st: +beginchar(bblig_st,13u#+4appr#,min(asc_height#,10/7x_height#),0); + "The ligature st"; + italcorr x_height#*slant-0.5thin#-0.5u#; + numeric t_w; t_w=hround((2appr#+6u#)*hppp); + pickup circle.nib; +% the "s" part + slope:=-x_height/24u; y5=0.52[y8,y2]; + top y2=x_height+uo; bot y8=-oo; + y2-y1=vround 0.12x_height; y9-y8=vround 0.175x_height; + lft x3l=lft x9-(0.5thin*(sqrt2-1))=apprl-ho; + rt x7r=hround((7u#+2appr#)*hppp)-apprr+ho; + x7r-x1=hround 0.6u+(0.5thin*(sqrt2-1)); + x2=x5=x8=0.5[x3l,x7r]; + x3r-x3l=x7r-x7l=hround 0.5[thin,ess]; + ortho_penpos5(ess,(-1,-slope)); + forsuffixes $=r,l: + ellipse_set(2,3.$,4.$,5.$); ellipse_set(8,7.$,6.$,5.$); + endfor + z1'-z1=(z2-z1)xscaled 1/3; z9-z9'=(z9-z8)xscaled 0.3; + draw z1{z1'-z1}...z2 left_to_down z3l...z4l + ---z6l...z7l down_to_left z8; + draw z2 left_to_down z3r...z4r + ---z6r...z7r down_to_left z8...{z9-z9'}z9; + square_end1(z1-z1'); square_end9(z9-z9'); + labels(1,1',2,8,9,9'); penlabels(3,4,5,6,7); +% the "t" part + rt x10=rt x11=w-apprr; x12=0.5[x11,x13]; + lft x13=lft x14=w-t_w+apprl; rt x16=floor x10; + top y15=top y16=x_height; bot y12=-oo; + top y14=h; y11=y13=0.3[y12,y16]; + top y10=max(vround 0.42x_height,top y11); + tmp_path:=z10..z11 down_to_left z12 left_to_up z13..z14; +% the ligature part + top y17=top y20=h; z17=whatever[z1,z1']; + z19=0.5[z17,0.5[z1,z14]]; + z18=0.25[z1,z17]; z20=0.25[z14,z17]; + draw tmp_path; + draw z1---z18...z19{z14-z1}...z20---z14; + hbbowl(z12,z13,z14,hthick) tmp_path; + x15=rt x.bowl.mid; + pickup square.nib; draw z14..z.bowl.bot; + draw z15..z16; square_end10(up); + labels(10,11,12,13,14,15,16,17,18,19,20); +endchar; + + diff --git a/fonts/mbboard/source/mbbromlo.mf b/fonts/mbboard/source/mbbromlo.mf new file mode 100644 index 0000000000..eed0081e23 --- /dev/null +++ b/fonts/mbboard/source/mbbromlo.mf @@ -0,0 +1,443 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbromlo.mf (Roman lowercase) +% last modification: 25.10.2001. + +% It should be noticed that most of the work is contained +% in the last macros definitions of `mbbbase.mf'. This can +% be legitimated by the fact that lowercase letters must be quite +% homogeneous. Also, variants should be easily made by +% changing few parameters (just for `thorn': from `p' +% whose height is `x_height' to 'thorn whose height is +% èasc_height') or by adding new features (accents, bars...). + +def horizontal_rules_list= + -body_depth,-desc_depth,0.5x_height,x_height,cap_height, + asc_height,body_height +enddef; + +use_rule1; + +iff variant_a: +beginchar("a",8u#+2appr#,x_height#,0); "The letter a"; + italcorr 0.75x_height#*slant-.5u#; + pickup circle.nib; + lft x1=apprl+hround 0.2u; + rt x3=w-apprr; x3=x4; + top y2=h+uo; bot y4=0; y3=0.3[y2+oo-uo,y4]; + bot y1=vround max(0.72h,y3); + tmp_path:=z4..z3 & elliptic_arc(3,2,1); + hbbowl(z2,z3,z4,hthick) tmp_path; + x11=x7=x.bowl.mid; lft x9=apprl-ho; x8=0.5[x9,0.5[x.bowl.mid,x4]]; + if ab_down_factor>0: bot y8=-oo; y7=ab_down_factor[y4,bot h]; + else: y8=y7=y4; fi + top y11=min(vround 0.7h,top y3); slope:=(y11-y4)/16u; + ellipse_set(8,9,10,11); + tmpp_path:=z7 if ab_down_factor>0: down_to_left else: .. fi + z8 left_to_up z9...z10---z11; + if straight_bowl: bbbowl(z11,z9,z8,hThick) tmpp_path; + else: begingroup interim superness:=superbowl; + draw 0.5[z10,z11]{z10-z11}...(x9+hThick,y9) down_to_right z8; + endgroup; fi + draw tmp_path; draw tmpp_path; + pickup square.nib; draw z4..z.bowl.bot; + square_end1(z1-z1'); labels(range 1 thru 11); + math_fit(0,0); +endchar; + +iff not variant_a: +beginchar("a",8u#+2appr#,x_height#,0); "The letter a"; + italcorr x_height#*slant-.5u#; + complete_left_lower(ab_down_factor,ab_up_factor); + math_fit(0,0); +endchar; + +beginchar("b",8u#+2appr#,asc_height#,0); "The letter b"; + italcorr 0.6x_height#*slant+ho#-.5u#; + complete_right_lower(ab_down_factor,ab_up_factor); + math_fit(0,0); +endchar; + +beginchar("c",7u#+2appr#,x_height#,0); + "The letter c"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; + x1=x5=w-apprr; lft x3=apprl-ho; + top y2=h+uo; bot y4=-oo; y3=0.5[y4,y2]; + y1=0.707[y3,y2]; y5=0.707[y3,y4]; + tmp_path:=reverse elliptic_arc(3,2,1)&elliptic_arc(3,4,5); + bbbowl(z2,z3,z4,hThick) tmp_path; draw tmp_path; + square_end1(z1-z1'); + square_end5(z5-z5'); + labels(1,1',2,3,4,5,5'); + math_fit(0,0); +endchar; + +beginchar("d",8u#+2appr#,asc_height#,0); "The letter d"; + italcorr asc_height#*slant-.5u#; + complete_left_lower(ab_down_factor,ab_up_factor); + math_fit(0,0); +endchar; + +beginchar("e",8u#+2appr#,x_height#,0); "The letter e"; + italcorr 0.6x_height#*slant+ho#-.5u#; + numeric t; pickup circle.nib; + rt x1=w-apprr+ho; lft x3=apprl-ho; x2=x4=0.5[x1,x3]; + top y2=h+uo; bot y4=-oo; y1=y3=good.y(0.5[y2,y4]); + tmp_path:=superellipse(z1,z2,z3,z4,superness); + t=xpart(tmp_path intersectiontimes + (bot(w/2,0.25[y4,y2])..bot(w,0.25[y4,y2]))); + draw subpath (0,t) of tmp_path; + z5=point t of tmp_path; + bbbowl(z2,z3,z4,hThick) tmp_path; + z6=(x.bowl.mid,y1); + hbbowl(z2,z1,z1,hThick) tmp_path; + x6r=x6l=x6; x1r=x1; x1m=x1l=rt x1; + y6r=y1r=top y1; y1m=y1; y1l=y6l=bot y1; + fill z1l--z1m--z1r--z6r--z6l--cycle; + square_end5(direction t of tmp_path); + labels(1,1r,1l,1m,2,3,4,5,6,6l,6r); + math_fit(0,0); +endchar; + +beginchar("f",hthick#+thin#+u#+2appr#,asc_height#, + if variant_f: desc_depth# else: 0 fi); + "The letter f"; + italcorr asc_height#*slant+1.5u#; + pickup circle.nib; lft x1=apprl; + x2-x1=hthick; x3=x2; x4-x3=hround 2u; + top y3=top y4=x_height; draw z3..z4; + complete_f_stroke(1,2,hround 3u,true); + square_end4(right); + labels(3,4); + math_fit(0,0); +endchar; + +beginchar("g",8u#+2appr#,x_height#,desc_depth#); "The letter g"; + italcorr x_height#*slant-.5u#; + if variant_g: + numeric t; + pickup circle.nib; + bbcircle1(apprl,w-apprr,x_height+uo,hround 0.25h); draw last_path; + bbbowl(z1b,z1a,z1d,hthick) last_path; + bbbowl(z1b,z1c,z1d,hthick) last_path; + rt x3=w-apprr+hround 0.5u; top y3=h; + y2=0.5[y1b,y3]; + t=xpart(last_path intersectiontimes ((x1b,y2)..(x1a,y2))); + z2=point t of last_path; slope:=-d/20u; + lft x4l=lft x10+ho=apprl; rt x8r=w-apprr+ho; + x4r-x4l=x8r-x8l=hround 0.5[thin,thick]; x6=x9=x1b; + y6=0; bot y9=-d-oo; ortho_penpos6(thick,(-1,-slope)); + forsuffixes $=l,r: + ellipse_set(bowl.bot,4$,5$,6$); ellipse_set(9,8$,7$,6$); + draw z.bowl.bot left_to_down z4$...z5$---z7$...z8$ down_to_left z9; + endfor; + y10=0.6[y9,y5l]; + draw z2{-direction t of last_path}...z3{right}; + draw z9 left_to_up z10 up_to_right z5l; + square_end3(right); + labels(2,3,9,10); penlabels(4,5,6,7,8); + else: + g_bar:=true; complete_left_lower(ab_down_factor,ab_up_factor); + fi + math_fit(0,0); +endchar; + +beginchar("h",8u#+2appr#,asc_height#,0); "The letter h"; + italcorr 0.75x_height#*slant-.5u#; + complete_n; + math_fit(0,0); +endchar; + +beginchar("i",hthick#+thin#+2appr#, + min(asc_height#,10/7x_height#+0.5dot_size#),0); + "The letter i"; + if square_dots: italcorr charht*slant-.5u#; + else: italcorr (charht-0.4dot_size#)*slant-.5u#; fi + center_bar(1,2); x1=x3=x5; x2=x4=x5'; + bot y1=bot y2=0; top y3=top y4=x_height; + top y5'=h; bot y5=h-dot_size; dot(5,5'); + pickup square.nib; draw z1--z2--z4--z3--cycle; + labels(1,2,3,4); + math_fit(0,0); +endchar; + +beginchar("j",hthick#+thin#+2appr#, + min(asc_height#,10/7x_height#+0.5dot_size#),desc_depth#); + "The letter j"; + if square_dots: italcorr charht*slant-.5u#; + else: italcorr (charht-0.4dot_size#)*slant-.5u#; fi + pickup circle.nib; + y1=0; top y2=top y3=x_height; + rt x1=rt x2=w-apprr; x2-x3=hthick; + x5'=x2; x3=x5; top y5'=h; bot y5=h-dot_size; + draw z2..j_curve1(4,x3,true); draw z3..z4; + dot(5,5'); pickup square.nib; draw z2..z3; + labels(1,2,3,4); + math_fit(0,0); +endchar; + +beginchar("k",9u#+2appr#,asc_height#,0); "The letter k"; + italcorr x_height#*slant-.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=x_height; y5=0.4*x_height; + 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=(1[x3,x4],x_height); + 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("l",hthick#+thin#+2appr#,asc_height#,0); "The letter l"; + italcorr asc_height#*slant-.5u#; + 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); +endchar; + +beginchar("m",16u#-hthick#-thin#+2appr#,x_height#,0); "The letter m"; + italcorr 0.75x_height#*slant-.5u#; + if hmn_factor > 0 : + center_bar(0,8); + bot y1=0; y0=y1=y2=y8=y12; top y3=top y4=h; + top y6=top y10=h+oo; y11=0.3[y10,y12]; + y5=y9=hmn_factor[y4,y2]; y7=max(y9,y11); + lft x1=lft x3=apprl; rt x11=rt x12=w-apprr; + x7=x8=x9; x2=x4=x5=x1+hthick; + x6=0.5[x5,x7]; x10=0.5[x9,x11]; + tmp_path:=z5 up_to_right z6 right_to_down z7..z8; + tmpp_path:=z9 up_to_right z10 right_to_down z11..z12; + draw tmp_path; draw tmpp_path; + hbbowl(z6,z7,z8,hthick) tmp_path; + hbbowl(z10,z11,z12,hthick) tmpp_path; + pickup square.nib; draw z1--z2--z4--z3--cycle; + draw z0..z8; draw z12..z.bowl.bot; + labels(1,2,3,4,5,6,7,8,9,10,11,12); + else: + center_bar(8,11); x8=x9; x10=x11; + bot y1=0; y1=y2=y7=y9=y10; top y3=h; + y3=y4=y5=y8=y11; y6=0.7[y7,y5]; + lft x1=lft x3=apprl; rt x6=rt x7=w-apprr; + x5=0.5[x11,x6]; x2-x1=x4-x3=hthick; + tmp_path:=z3..z5 right_to_down z6..z7; + draw tmp_path; + hbbowl(z5,z6,z7,hthick) tmp_path; + draw z8..z9; draw z10..z11; + pickup square.nib; draw z4--z2--z1--z3; draw z9..z10; + draw z7..z.bowl.bot; labels(1,2,3,4,5,6,7,8,9,10,11); + fi + math_fit(0,0); +endchar; + +beginchar("n",8u#+2appr#,x_height#,0); "The letter n"; + italcorr 0.75x_height#*slant-.5u#; + complete_n; + math_fit(0,0); +endchar; + +beginchar("o",8u#+2appr#,x_height#,0); "The letter o"; + italcorr 0.6x_height#*slant+ho#-.5u#; + pickup circle.nib; + bbcircle1(apprl-ho,w-apprr+ho,x_height+uo,-oo); draw last_path; + bbbowl(z1b,z1a,z1d,hThick) last_path; + bbbowl(z1b,z1c,z1d,hThick) last_path; + math_fit(0,0); +endchar; + +beginchar("p",8u#+2appr#,x_height#,desc_depth#); "The letter p"; + italcorr 0.6x_height#*slant+ho#-.5u#; + complete_right_lower(ab_down_factor,ab_up_factor); + math_fit(0,0); +endchar; + +beginchar("q",8u#+2appr#,x_height#,desc_depth#); "The letter q"; + italcorr x_height#*slant-.5u#; + complete_left_lower(ab_down_factor,ab_up_factor); + math_fit(0,0); +endchar; + +beginchar("r",5.5u#+2appr#,x_height#,0); "The letter r"; + italcorr x_height#*slant+.5u#; + pickup circle.nib; + lft x1=lft x3=apprl; x5=x2=x4=x1+hthick; + bot y1=bot y2=0; top y3=h; y3=y4=y6=y7; + rt x7=hround(w-apprr+u); + x6=0.15[x7,x2]; y5=0.3[y2,y4]; + draw z5 up_to_right z6..z7; + pickup square.nib; draw z1--z2--z4--z3--cycle; + square_end7(right); + labels(1,2,3,4,5,6,7); + math_fit(0,0); +endchar; + +beginchar("s",7u#+2appr#,x_height#,0); + "The letter s"; + italcorr x_height#*slant+ho#-1.1u#; + pickup circle.nib; + slope:=-h/24u; + y5=0.52[y8,y2]; top y2=h+uo; bot y8=-oo; + y2-y1=vround 0.12h; y9-y8=vround 0.175h; + lft x3l=lft x9-(0.5thin*(sqrt2-1))=apprl-ho; + rt x7r=w-apprr+ho; x7r-x1=hround 0.6u+(0.5thin*(sqrt2-1)); + x2=x5=x8=0.5[apprl,w-apprr]; + x3r-x3l=x7r-x7l=hround 0.5[thin,ess]; + ortho_penpos5(ess,(-1,-slope)); + forsuffixes $=r,l: + ellipse_set(2,3.$,4.$,5.$); ellipse_set(8,7.$,6.$,5.$); + endfor + z1'-z1=(z2-z1)xscaled 1/3; z9-z9'=(z9-z8)xscaled 0.3; + draw z1{z1'-z1}...z2 left_to_down z3l...z4l + ---z6l...z7l down_to_left z8; + draw z2 left_to_down z3r...z4r + ---z6r...z7r down_to_left z8...{z9-z9'}z9; + square_end1(z1-z1'); square_end9(z9-z9'); + labels(1,1',2,8,9,9'); penlabels(3,4,5,6,7); + math_fit(0,0); +endchar; + +beginchar("t",6u#+2appr#,min(asc_height#,10/7x_height#),0); + "The letter t"; + italcorr x_height#*slant-0.5thin#-.5u#; + pickup circle.nib; + % the "t" part + rt x1=rt x2=w-apprr; x3=0.5[x2,x4]; + lft x4=lft x5=apprl; rt x7=floor x1; + top y6=top y7=x_height; bot y3=-oo; + top y5=h; y2=y4=0.3[y3,y6]; + top y1=max(vround 0.42x_height,top y2); + tmp_path:=z1..z2 down_to_left z3 left_to_up z4..z5; + draw tmp_path; + hbbowl(z3,z4,z5,hthick) tmp_path; + x6=rt x.bowl.mid; + pickup square.nib; + draw z6..z7; draw z5..z.bowl.bot; + square_end1(up); + labels(1,2,3,4,5,6,7); + math_fit(0,0); +endchar; + +beginchar("u",8u#+2appr#,x_height#,0); "The letter u"; + italcorr x_height#*slant-.5u#; + complete_u(uy_factor); + math_fit(0,0); +endchar; + +beginchar("v",7.6u#+2appr#,x_height#,0); "The letter v"; + italcorr x_height#*slant; + complete_AV(-1,apprl-0.5u,w-apprr+0.5u); + math_fit(0,0); +endchar; + +beginchar("w",13u#+2appr#,x_height#,0); "The letter w"; + italcorr x_height#*slant-0.5u#;% not perfect... + pickup circle.nib; + x1=apprl; x12=w-apprr; x6=x7=0.5[x1,x12]; + x5-x2=hthick; x2-x1=x7-x5=x8-x7=x12-x11; + y1=y3=y6=y7=y9=y12=h; y2=y5=y8=y11=bot y4a=0; + a:=diag_width(1,z1-z2); + penpos1(thin*a,0); penpos2(thin*a,0); penpos3(thin*a,0); + penpos8(thin*a,0); penpos9(thin*a,0); + x3-x1=x9-x7=thick*a; + z4a-z3=z10a-z9=whatever*(z2-z1); + z4=whatever[z3,z4a]; z10=whatever[z9,z10a]; + if x4a>x5: z4=whatever[z5,z6]; z10=whatever[z11,z12]; + else: bot y4=bot y10=0; fi + ortho_penpos4(thin,z3-z4a); ortho_penpos10(thin,z9-z10a); + a:=diag_width(thin,z6-z5); + penpos5(a,0); penpos11(a,0); penpos12(a,0); + z6-z6l=z5-z5l; z7r-z7=z8r-z8; + z6r=whatever[z7,z8]; z6r-z5r=whatever*(z6-z5); + z7l=whatever[z5,z6]; z7l-z8l=whatever*(z7-z8); + y1-y1a=thin; z1a=whatever[z1,z2]; + z1-z1a=z2a-z2=z3-z3a=z7-z7a=z8a-z8=z9-z9a; + y5a-y5=thin; z5a=whatever[z5,z6]; + z5a-z5=z11a-z11; + penstroke z1e..z2e; penstroke z3e..z4e; + penstroke z9e..z10e; penstroke z11e..z12e; + fill z5r--z5l--z6l--z6--z6r--cycle; + fill z8r--z8l--z7l--z7--z7r--cycle; + fill z1--z3--z3a--z1a--cycle; fill z2--z5--z5a--z2a--cycle; + fill z7--z9--z9a--z7a--cycle; fill z8--z11--z11a--z8a--cycle; + penlabels(1,2,3,4,5,6,7,8,9,10,11,12); + labels(1a,2a,3a,4a,5a,8a,9a,10a,11a); + math_fit(0,0); +endchar; + +beginchar("x",8.8u#+2appr#,x_height#,0); "The letter x"; + italcorr x_height#*slant-0.5u#; + complete_X(0.3u); + math_fit(0,0); +endchar; + +beginchar("y",8u#+2appr#,x_height#,desc_depth#); "The letter y"; + italcorr x_height#*slant-.5u#; + if variant_y: y1=y3=y4=h; y5=0; y2=-d; + x3=apprl; x1=w-apprr; x5=0.5[x3,x1]; + z2=whatever[z1,z5]; + a:=diag_width(1,z3-z5); x4-x3=a*thick; + penpos3(thin*a,0); penpos4(thin*a,0); + penpos1(diag_width(thin,z1-z2),0); + penpos2(diag_width(thin,z1-z2),0); + z6=whatever[z1,z2]; z6-z4=whatever*(z5-z3); + y3-y3a=thin; z3a-z3=z4a-z4=whatever*(z5-z3); + z5l=whatever[z1,z2]; z5l-z3l=whatever*(z5-z3); + z6r-z6=z6-z6l=z5r-z5=z5-z5l; + penstroke z1e..z2e; penstroke z3e..z5e; penstroke z4e..z6e; + fill z3--z4--z4a--z3a--cycle; + penlabels(1,2,3,4,5,6); labels(3a,4a); + else: g_bar:=true; complete_u(uy_factor); + fi + math_fit(0,0); +endchar; + +beginchar("z",7.6u#+2appr#,x_height#,0); "The letter z"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; + z1l=(apprl-hround 0.15u,0); z2l=(w-apprr+hround 0.1u,0); + z3r=(apprl,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); +endchar; + +iff known bbdotless_i: +beginchar(bbdotless_i,max(hthick#+thin#,4u#)+2appr#,x_height#,0); + "The dotless i"; + italcorr x_height#*slant-.5u#;% to be corrected ? answer: no. + pickup circle.nib; 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); +endchar; + +iff known bbdotless_j: +beginchar(bbdotless_j,max(hthick#+thin#,4u#)+2appr#, + x_height#,desc_depth#); + "The dotless j"; + italcorr x_height#*slant-.5u#;% to be corrected ? answer: no. + pickup circle.nib; + center_bar(3,2); x1=x2; y1=0; top y2=top y3=h; + draw z2..j_curve1(4,x3,true); draw z3..z4; + pickup square.nib; draw z2..z3; + labels(1,2,3,4); + math_fit(0,0); +endchar;
\ No newline at end of file diff --git a/fonts/mbboard/source/mbbromup.mf b/fonts/mbboard/source/mbbromup.mf new file mode 100644 index 0000000000..b982ae6c83 --- /dev/null +++ b/fonts/mbboard/source/mbbromup.mf @@ -0,0 +1,465 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbromup.mf (Roman uppercase) +% last modification: 25.10.2001. + +def horizontal_rules_list=0.4h,0.5h,0.6h, + -body_depth,-desc_depth,cap_height,asc_height,body_height +enddef; + +use_rule2; + +beginchar("A",11.5u#+2appr#,cap_height#,0); + "The letter A"; +% 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; + +beginchar("B",10.15u#+Appr#+appr#,cap_height#,0); + "The letter B"; + 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("C",11u#+2appr#,cap_height#,0); + "The letter C"; + italcorr 0.8cap_height#*slant-0.5u#; + pickup circle.nib; + top y2=h+o; bot y4=-o; lft x3=apprl; + rt x1=w-apprr; x5-x1=hround 0.265u; + y1=0.223[y2,y4]; y5=0.223[y4,y2]; y3=0.5[y4,y2]; + tmp_path:=reverse elliptic_arc(3,2,1) + & elliptic_arc(3,4,5); + draw tmp_path; + bbbowl(z2,z3,z4,hThick) tmp_path; + square_end1(z1-z1'); + square_end5(z5-z5'); + labels(1,1',2,3,4,5,5'); + math_fit(-0.4cap_height#*slant,0.3cap_height#*slant); +endchar; + +beginchar("D",11.25u#+Appr#+appr#,cap_height#,0); + "The letter D"; + italcorr 0.6cap_height#*slant-0.5u#; + pickup circle.nib; + lft x1=lft x5=Apprl; rt x3=w-apprr; + x2=0.5[x1,x3]; x4=0.525[x1,x3]; x6=x7=x1+hthick; + top y1=top y2=top y7=h; bot y4=bot y5=bot y6=0; y3=h/2; + tmp_path:=z1..z2 right_to_down z3 down_to_left z4..z5; + draw tmp_path; draw z6..z7; + bbbowl(z2,z3,z4,hThick) tmp_path; + pickup square.nib; draw z1..z5; + labels(1,2,3,4,5,6,7); + math_fit(0,0.5cap_height#*slant); +endchar; + +beginchar("E",7.5u#+Appr#+appr#,cap_height#,0); + "The letter E"; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; rt x1=rt x4=w-apprr; lft x2=lft x3=Apprl; + x5=x6=x3+hthick; lft x7=x5; 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=vround(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; + +beginchar("F",7.5u#+Appr#+appr#,cap_height#,0); + "The letter F"; + italcorr cap_height#*slant-0.5u#; + pickup circle.nib; rt x1=w-apprr; lft x2=lft x3=Apprl; + x4=x5=x3+hthick; lft x6=x4; rt x7=w-apprr-hround 0.7u; + top y1=top y2=top y5=h; bot y3=bot y4=0; + y6=y7=good.y 0.5h; pickup square.nib; + draw z1--z2--z3--z4--z5; draw z6..z7; + labels(1,2,3,4,5,6,7); + math_fit(0,max(0.5cap_height#*slant-0.7u#,0)); +endchar; + +% The openness of the letter G depends on the width. + +beginchar("G",11.5u#+0.5thin#+2appr#,cap_height#,0); + "The letter G"; + italcorr 0.8cap_height#*slant-0.5u#; + numeric t[]; + pickup circle.nib; + top y2=h+o; bot y4=-o; y1=y3=0.5[y2,y4]; + rt x1=apprl+13u; lft x3=apprl; x2=x4=0.5[x3,x1]; + tmp_path:=superellipse(z1,z2,z3,z4,superness); + rt x5=w-apprr; + t1=xpart(tmp_path intersectiontimes ((x5,y1)..(x5,y2))); + t2=xpart(tmp_path intersectiontimes ((x5,y1)..(x5,y4))); + z5=point t1 of tmp_path; z6=point t2 of tmp_path; + top z7=(x6,vround(h/2)); y8=y9=y7; + lft x8=apprl+6u; + cutdraw subpath (t1,t2) of tmp_path; + draw z6..z7; + bbbowl(z2,z3,z4,hThick) tmp_path; + hbbowl(z4,z7,z7,hthick) tmp_path; + pickup square.nib; draw z7..z8; + penlabels(1,2,3,4,5,6,7,8); + math_fit(-0.4cap_height#*slant,0.5cap_height#*slant); +endchar; + +beginchar("H",11u#+2Appr#,cap_height#,0); + "The letter H"; + 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=vround 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("I",hthick#+thin#+2Appr#,cap_height#,0); + "The letter I"; + 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; + +beginchar("J",7.25u#+Appr#+appr#,cap_height#,0); + "The letter J"; + italcorr cap_height#*slant-u#; + pickup circle.nib; + lft x1=apprl; rt x3=rt x4=w-Apprr; x2=0.5[x1,x3]; + top y1=vround(0.3h); bot y2=-o; y3=y1; top y4=h; + tmp_path:=z1 down_to_right z2 right_to_up z3..z4; + draw tmp_path; + hbbowl(z2,z3,z4,hThick) tmp_path; + pickup square.nib; draw z4..z.bowl.bot; + square_end1(up); + labels(1,2,3,4); + math_fit(0,0.5ic#); +endchar; + +beginchar("K",11.5u#+Appr#+appr#,cap_height#,0); + "The letter K"; + 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("L",7.5u#+Appr#+appr#,cap_height#,0); "The letter L"; + % no italic correction + pickup circle.nib; rt x1=w-apprr; lft x2=lft x3=Apprl; + x4=x5=x3+hthick; bot y1=bot y2=bot y5=0; top y3=top y4=h; + pickup square.nib; draw z1--z2--z3--z4--z5; + labels(1,2,3,4,5); + math_fit(0,0); +endchar; + +beginchar("M",14u#+2Appr#,cap_height#,0); + "The letter M"; + 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; + +beginchar("N",10.7u#+2Appr#,cap_height#,0); + "The letter N"; + 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 x4a<x6: z4=z4a; else: x4=x6; z4=whatever[z3,z4a]; fi + ortho_penpos4(thin,z4-z3); ortho_penpos8(thin,z8-z7); + z8r-z7r=whatever*(z8-z7); z8l-z7l=whatever*(z8-z7); + z4r-z3r=whatever*(z4-z3); z4l-z3l=whatever*(z4-z3); + penstroke z2e--z3e--z4e; penstroke z6e--z7e--z8e; + pickup square.nib; draw z1..z2; draw z5..z6; + labels(1,5,4a,8a); penlabels(2,3,4,6,7,8); + math_fit(0,0.5ic#); +endchar; + +beginchar("O",13u#+2appr#,cap_height#,0); + "the letter O"; + 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; + bbbowl(z1b,z1c,z1d,hThick) last_path; + math_fit(-0.4cap_height#*slant,ic#); +endchar; + +beginchar("P",10.15u#+Appr#+appr#,cap_height#,0); + "The letter P"; + italcorr 0.75cap_height#*slant-0.5u#; + pickup circle.nib; + lft x1=lft x3=Apprl; rt x6=w-apprr; x2-x1=x4-x3=hthick; + x5=0.50[x1,x6]; x7=0.50[x1,x6]; x8=x2; + bot y1=bot y2=0; top y3=top y4=top y5=h; + bot y7=bot y8=vround 0.4h; y6=0.5[y5,y7]; + tmp_path:=z3..z5 right_to_down z6 down_to_left z7..z8; + draw tmp_path; + bbbowl(z5,z6,z7,hThick) tmp_path; + pickup square.nib; draw z4--z2--z1--z3; + labels(1,2,3,4,5,6,7,8); + math_fit(0,0.4cap_height#*slant-u#); +endchar; + +beginchar("Q",13u#+2appr#,cap_height#,0); + "the letter Q"; + 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; + bbbowl(z1b,z1c,z1d,hThick) last_path; + a:=75; x1e=x1c+hThick; + x2=0.60[x1d,x1e]; + z2=last_path intersectionpoint ((x2,y1d)..(x2,y1a)); + x3=0.00[x1d,x1e]; y3=good.y 0.18[y1d,y1b]; + y5l=y6l=-o; rt x6=w-apprr-hround 0.5u; + x6-x5=0.5thin/sind(angle(dir a slanted slant)); + penpos6(whatever,a); y6r=y5r; + ortho_penpos5(thin,right); + z4=0.5[z3,z5]; + penstroke z5e..z6e; + draw z2{(z3-z2) xscaled 1/16}...z3{right}... + z4{(z4-z3) xscaled 1/2}...z5{right}; + labels(2,3,4); penlabels(5,6); + math_fit(-0.4cap_height#*slant,ic#); +endchar; + +beginchar("R",10.15u#+Appr#+appr#,cap_height#,0); + "The letter R"; + italcorr 0.75cap_height#*slant-0.5u#; + pickup circle.nib; + lft x1=lft x3=Apprl; rt x6=w-apprr; x2-x1=x4-x3=hthick; + x9=x6-hThick; x5=0.55[x1,x6]; x7=0.50[x1,x6]; x8=x2; + bot y1=bot y2=0; top y3=top y4=top y5=h; + bot y7=bot y8=vround 0.4h; y6=0.5[y5,y7]; + tmp_path:=z3..z5 flat_right_to_down z6 down_to_left z7..z8; + draw tmp_path; + bbbowl(z5,z6,z7,hThick) tmp_path; + pickup square.nib; + draw z4--z2--z1--z3; + z9=z.bowl.bot; + z0'=(w-apprr+0.375u,0); + adjust_slanted_bar(9,0',0'',10)(0.5thin,1); + a:=diag_width(1,z9-z10); + z11=z10-(thick*a,0); + y0=y8; z0-z11=whatever*(z9-z10); + if x0>x2: z12=tmp_path intersectionpoint (z11..(z11+z9-z10)); + else: x12=x2; z12-z11=whatever*(z9-z10); fi + y10a=y11a=thin; z10a=whatever[z10,z9]; z11a=whatever[z11,z12]; + penpos10(thin*a,0); penpos11(thin*a,0); + ortho_penpos9(thin,z9-z10); ortho_penpos12(thin,z12-z11); + penstroke z9e..z10e; penstroke z11e..z12e; + fill z11--z10--z10a--z11a--cycle; + labels(1,2,3,4,5,6,7,8,9,10,0,0',0'',10a,11a); + penlabels(9,10,11,12); + math_fit(0,0); +endchar; + +beginchar("S",10.7u#+2appr#,cap_height#,0); + "The letter S"; + italcorr 0.8cap_height#*slant-1.1u#; + pickup circle.nib; + slope:=-h/73u; y5=0.52[y8,y2]; top y2=h+o; bot y8=-o; + y2-y1=vround 0.125h; y9-y8=vround 0.175h; + lft x3l=lft x9+0.05u=apprl; + rt x7r=w-apprr; x7r-x1=0.95u; + x5=x8=0.5[x3l,x7r]; x2=0.5[x5,0.5[x1,x3l]]; + x3r-x3l=x7r-x7l=hround 0.5[thin,cap_ess]; + ortho_penpos5(cap_ess,(-1,-slope)); + forsuffixes $=r,l: + ellipse_set(2,3.$,4.$,5.$); ellipse_set(8,7.$,6.$,5.$); + endfor + z1'-z1=(z2-z1)xscaled 1/3; z9-z9'=(z9-z8)xscaled 1/4; + draw z1{z1'-z1}...z2 left_to_down z3l...z4l + ---z6l...z7l down_to_left z8; + draw z2 left_to_down z3r...z4r + ---z6r...z7r down_to_left z8...{z9-z9'}z9; + square_end1(z1-z1'); square_end9(z9-z9'); + labels(1,1',2,8,9,9'); penlabels(3,4,5,6,7); + math_fit(-0.2cap_height#*slant,0.3cap_height#*slant); +endchar; + +beginchar("T",10.2u#+2appr#,cap_height#,0); "The letter T"; + italcorr cap_height#*slant; + center_bar(1,2); bot y1=bot y2=0; top y5=top y6=h; + lft x5=apprl-hround 0.5u; rt x6=w-apprr+hround 0.5u; + z3=(x1,y5); z4=(x2,y5); pickup square.nib; + draw z5..z6; draw z3--z1--z2--z4; labels(1,2,3,4,5,6); + math_fit(-0.5cap_height#*slant, + cap_height#*slant-2.5u#); +endchar; + +beginchar("U",11u#+2Appr#,cap_height#,0); + "The letter U"; + italcorr cap_height#*slant-u#; + pickup circle.nib; + rt x1=rt x2=w-Apprr; lft x4=lft x5=Apprl; x3=0.5[x2,x4]; + top y1=top y5=h; bot y3=-o; y2=y4=1/3[y3,y1]; + tmp_path:=z1..z2 down_to_left z3 left_to_up z4..z5; + draw tmp_path; + hbbowl(z3,z4,z5,hthick) tmp_path; + pickup square.nib; draw z5..z.bowl.bot; + square_end1(up); + labels(1,2,3,4,5); + math_fit(-0.4cap_height#*slant,0.5ic#); +endchar; + +beginchar("V",11.5u#+2appr#,cap_height#,0); + "The letter V"; + italcorr cap_height#*slant; + complete_AV(-1,apprl-0.5u,w-apprr+0.5u); + math_fit(-0.5cap_height#*slant,cap_height#*slant-2u#); +endchar; + +beginchar("W",16u#+2appr#,cap_height#,0); + "The letter W"; + italcorr cap_height#*slant; + pickup circle.nib; + x1=apprl; x12=w-apprr; x6=x7=0.5[x1,x12]; + x5-x2=hthick; x2-x1=x7-x5=x8-x7=x12-x11; + y1=y3=y6=y7=y9=y12=h; y2=y5=y8=y11=bot y4a=0; + a:=diag_width(1,z1-z2); + penpos1(thin*a,0); penpos2(thin*a,0); penpos3(thin*a,0); + penpos8(thin*a,0); penpos9(thin*a,0); + x3-x1=x9-x7=thick*a; + z4a-z3=z10a-z9=whatever*(z2-z1); + z4=whatever[z3,z4a]; z10=whatever[z9,z10a]; + if x4a>x5: z4=whatever[z5,z6]; z10=whatever[z11,z12]; + else: bot y4=bot y10=0; fi + ortho_penpos4(thin,z3-z4a); ortho_penpos10(thin,z9-z10a); + a:=diag_width(thin,z6-z5); + penpos5(a,0); penpos11(a,0); penpos12(a,0); + z6-z6l=z5-z5l; z7r-z7=z8r-z8; + z6r=whatever[z7,z8]; z6r-z5r=whatever*(z6-z5); + z7l=whatever[z5,z6]; z7l-z8l=whatever*(z7-z8); + y1-y1a=thin; z1a=whatever[z1,z2]; + z1-z1a=z2a-z2=z3-z3a=z7-z7a=z8a-z8=z9-z9a; + y5a-y5=thin; z5a=whatever[z5,z6]; + z5a-z5=z11a-z11; + penstroke z1e..z2e; penstroke z3e..z4e; + penstroke z9e..z10e; penstroke z11e..z12e; + fill z5r--z5l--z6l--z6--z6r--cycle; + fill z8r--z8l--z7l--z7--z7r--cycle; + fill z1--z3--z3a--z1a--cycle; fill z2--z5--z5a--z2a--cycle; + fill z7--z9--z9a--z7a--cycle; fill z8--z11--z11a--z8a--cycle; + penlabels(1,2,3,4,5,6,7,8,9,10,11,12); + labels(1a,2a,3a,4a,5a,8a,9a,10a,11a); + math_fit(-0.5cap_height#*slant,cap_height#*slant-1.5u#);% +endchar; + +beginchar("X",12u#+2appr#,cap_height#,0); "The letter X"; + italcorr cap_height#*slant-0.5u#; + complete_X(0.375u); + math_fit(0,0); +endchar; + +% a modifier +beginchar("Y",12u#+2appr#,cap_height#,0); "The letter Y"; + italcorr cap_height#*slant-0.5u#; + center_bar(3,4); bot y3=bot y4=-d; + x3l=apprl+hround(0.5(w-apprr-apprl-hthick-thin*(1++slant))); + x4l-x3l=hround(hthick+thin*(1++slant)); + x3r-x3l=x4l-x4r=thin*(1++slant); + y4l=y3l=-d; y3r-y3l=y4r-y4l=thin; + y1=y6=y7r=h; x1=apprl; x7r=w-apprr; + x2=x3; y2=y5a=0.4h; x6-x1=x5a-x2=diag_width(thick,z1-z2); + a:=diag_width(thin,z1-z2); + penpos1(a,0); penpos6(a,180); z8=z5; + forsuffixes $=,r,l: x5$=x4$; z5$-z6$=whatever*(z2-z1); endfor + forsuffixes $=r,l: x2$=x3$; z2$-z1$=whatever*(z2-z1); endfor + y1-y1a=y6-y6a=thin; z1a=whatever[z1,z2]; z6a=whatever[z6,z5a]; + adjust_slanted_bar(7r,8,7,8a)(0.5thin,-1); z7-z7l=z7r-z7; + ortho_penpos8(thin,z7-z8); + penstroke z1e--z2e--z3e--z4e--z5e--z6e; + fill z1--z6--z6a--z1a--cycle; penstroke z7e..z8e; + penlabels(1,2,3,4,5,6,7,8,9,10); labels(1a,5a,6a,8a); + math_fit(-0.5cap_height#*slant,cap_height#*slant-3u#); +endchar; + +beginchar("Z",10.15u#+2appr#,cap_height#,0); "The letter Z"; + 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; diff --git a/fonts/mbboard/source/mbbromxl.mf b/fonts/mbboard/source/mbbromxl.mf new file mode 100644 index 0000000000..591ef47671 --- /dev/null +++ b/fonts/mbboard/source/mbbromxl.mf @@ -0,0 +1,197 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbromxl.mf (extended roman lowercase) +% last modification: 25.10.2001. + +% Crossed letters are no more generated (except `bbcross_d'). +% They appear only with Cork encoding. + +def horizontal_rules_list= + -body_depth,-desc_depth,0.5x_height,x_height,cap_height, + asc_height,body_height +enddef; + +use_rule1; + +numeric slash_width; +slash_width=hround(3.8u+hthick+thin); + +beginchar(bbes_zet,8u#+2appr#,asc_height#,0); + "German letter es-zet"; + italcorr 0.5[x_height#,asc_height#]*slant-.5u#; + pickup circle.nib; + lft x1=lft x2=apprl; rt x4=w-apprr; + rt x6=w-apprr+ho; x3=x5=0.5[x1,x4]; x8-x1=hthick; + bot y1=0; top y3=h+oo; top y5=x_height; + y2=y4=0.5[y5,y3]; y6=0.5[y7,y5]; + if ab_down_factor>0: bot y7=-oo; + x7=ab_down_factor[(x1+x6)/2,(x1+x4+2x6)/4]; + y8=ab_down_factor[top 0,y5]; + else: bot y7=bot y8=0; x7=0.5[x1,x6]; fi + tmp_path:=z1..z2 up_to_right z3 right_to_down z4 + down_to_left z5 &z5 right_to_down z6 down_to_left z7 + if ab_down_factor>0: left_to_up else: .. fi z8; + draw tmp_path; + bbbowl(z5,z6,z7,hThick) tmp_path; + bbbowl(z3,z4,z5,max(0,x4-x.bowl.mid)) tmp_path; + hbbowl(z3,z2,z1,hthick) tmp_path; + pickup square.nib; draw z1..z.bowl.bot; + square_end5(left); + labels(1,2,3,4,5,6,7,8); +endchar; + +iff variant_a: +beginchar(bbae,16u#+ho#-thin#-hThick#+2appr#,x_height#,0); + "The letter ae"; + italcorr 0.6x_height#*slant+ho#-.5u#; + save tmp_path; path tmp_path[]; numeric t[]; + % `a' part + center_bar(5,4); x3=x4; + lft x1=apprl+hround 0.2u; + top y2=h+uo; bot y4=0; y3=0.3[y2+oo-uo,y4]; + bot y1=vround max(0.72h,y3); + tmp_path1:=z4..z3 & elliptic_arc(3,2,1); + hbbowl(z2,z3,z4,hthick) tmp_path1; z5=z.bowl.bot; + x11=x7=x5; lft x9=apprl-ho; x8=0.5[x9,0.5[x5,x4]]; + if ab_down_factor>0: bot y8=-oo; y7=ab_down_factor[y4,bot h]; + else: y8=y7=y4; fi + top y11=min(vround 0.7h,top y3); slope:=(y11-y4)/16u; + ellipse_set(8,9,10,11); + tmp_path2=z7 if ab_down_factor>0: down_to_left else: .. fi + z8 left_to_up z9...z10---z11; + if straight_bowl: bbbowl(z11,z9,z8,hThick) tmp_path2; + else: begingroup interim superness:=superbowl; + draw 0.5[z10,z11]{z10-z11}...(x9+hThick,y9) down_to_right z8; + endgroup; fi + draw tmp_path1; draw tmp_path2; + pickup square.nib; draw z4..z5; + square_end1(z1-z1'); + % `e' part + pickup circle.nib; + rt x14=w-apprr+ho; x5-x16=ho; x19=x4; + x15=x17=0.5[x14,x16]; + top y15=h+uo; bot y17=-oo; + y14=y16=y19=good.y(0.5[y15,y17]); + tmp_path3=superellipse(z14,z15,z16,z17,superness); + t1=xpart(tmp_path3 intersectiontimes tmp_path1); + t2=xpart(tmp_path3 intersectiontimes ((x4,y16)..(x4,y17))); + t3=xpart(tmp_path3 intersectiontimes + (bot(w/2,0.25[y17,y15])..bot(w,0.25[y17,y15]))); + z18=point t3 of tmp_path3; + draw subpath (0,t1) of tmp_path3; + draw z4--subpath (t2,t3) of tmp_path3; + hbbowl(z15,z14,z14,hThick) tmp_path3; + x19r=x19l=x19; x14r=x14; x14m=x14l=rt x14; + y19r=y14r=top y14; y14m=y14; y14l=y19l=bot y14; + fill z14l--z14m--z14r--z19r--z19l--cycle; + square_end18(direction t3 of tmp_path3); + labels(range 1 thru 19,14m,14l,14r,19l,19r); +endchar; + +iff not variant_a: +beginchar(bbae,16u#+ho#-thin#-hThick#+2appr#,x_height#,0); + "The letter ae"; + italcorr 0.6x_height#*slant+ho#-.5u#; + center_bar(17',17); + begingroup save apprr; apprr=w-rt x17; + complete_left_lower(ab_down_factor,ab_up_factor); + endgroup; + numeric t[]; + pickup circle.nib; + rt x12=w-apprr+ho; x17'-x14=ho; + x13=x15=0.5[x12,x14]; + top y13=h+uo; bot y15=-oo; + y12=y14=y17=y17'=good.y(0.5[y13,y15]); + tmp_path:=superellipse(z12,z13,z14,z15,superness); + t1=xpart(tmp_path intersectiontimes ((x1,y14)..(x1,y13))); + t2=xpart(tmp_path intersectiontimes ((x1,y14)..(x1,y15))); + t3=xpart(tmp_path intersectiontimes + (bot(w/2,0.25[y15,y13])..bot(w,0.25[y15,y13]))); + z16=point t3 of tmp_path; + draw subpath (0,t1) of tmp_path--z17; + draw z17--subpath (t2,t3) of tmp_path; + hbbowl(z13,z12,z12,hThick) tmp_path; + x17r=x17l=x17; x12r=x12; x12m=x12l=rt x12; + y17r=y12r=top y12; y12m=y12; y12l=y17l=bot y12; + fill z12l--z12m--z12r--z17r--z17l--cycle; + square_end16(direction t3 of tmp_path); + labels(12,12m,12l,12r,13,14,15,16,17,17',17l,17r,18,19); +endchar; + +beginchar(bboe,16u#+2ho#-thin#-hThick#+2appr#,x_height#,0); + "The letter oe"; + italcorr 0.6x_height#*slant+ho#-.5u#; + numeric t; + pickup circle.nib; + top y2=top y6=h+uo; bot y4=bot y8=-oo; + y1=y3=y5=y7=good.y(0.5[y2,y4]); + lft x3=apprl-ho; rt x5=w-apprr+ho; + x2=x4=0.5[x3,x1]; x6=x8=0.5[x7,x5]; x1-x3=x5-x7; + x1-x7=hThick; tmp_path:=superellipse(z1,z2,z3,z4,superness); + tmpp_path:=superellipse(z5,z6,z7,z8,superness); + bbbowl(z2,z3,z4,hThick) tmp_path; + t=xpart(tmpp_path intersectiontimes + (bot(x8,0.25[y8,y6])..bot(w,0.25[y8,y6]))); + z13=point t of tmpp_path; + draw tmp_path; + draw subpath (0,t) of tmpp_path; + hbbowl(z6,z5,z5,hThick) tmpp_path; + x1r=x1l=x1; x5r=x5; x5m=x5l=rt x5; + y1r=y5r=top y5; y5m=y5; y5l=y1l=bot y5; + fill z5l--z5m--z5r--z1r--z1l--cycle; + square_end13(direction t of tmpp_path); + labels(range 1 thru 16,5m,5l,5r,1l,1r); +endchar; + +beginchar(bbslash_o,8u#+2appr#,x_height#+0.5desc_depth#,0.5desc_depth#); + "The letter slash o"; + italcorr 0.6x_height#*slant+ho#-.5u#;% not perfect at all... + pickup circle.nib; + bbcircle1(apprl-ho,w-apprr+ho,x_height+uo,-oo); draw last_path; + bbbowl(z1b,z1a,z1d,hThick) last_path; z3=z.bowl.top; + bbbowl(z1b,z1c,z1d,hThick) last_path; z2=z.bowl.bot; + y4=-d; y5=h; + z4=whatever[z2,z3]; z5=whatever[z2,z3]; + penpos4(diag_width(thin,z3-z2),0); + penpos5(diag_width(thin,z3-z2),0); + penstroke z4e..z5e; penlabels(2,3,4,5); +endchar; + +iff known bbcross_d: +beginchar(bbcross_d,8u#+2appr#,asc_height#,0); + "The letter crossed d"; + italcorr asc_height#*slant-1.5u#; + pickup circle.nib; + top y1=top y2=h; bot y4=-oo; + top y6=x_height if ab_up_factor>0: +oo fi; + y3=0.4[y4,y2]; y5=0.5[y4,y6]; if ab_up_factor>0: + y7=ab_up_factor[bot x_height, top 0]; else: y7=y6; fi + lft x1=apprl+hround u; rt x3=w-apprr+ho; lft x5=apprl-ho; + x3-x7=hThick; x4=x6=0.5[x5,x3]; x2=0.25[x1,x7]; + tmp_path:=z1..z2 right_to_down z3 down_to_left z4 + left_to_up z5 up_to_right z6; + draw tmp_path; + bbbowl(z6,z5,z4,hThick) tmp_path; + hbbowl(z2,(x3,y7),(x3,y7),x3-x7) tmp_path; + hbbowl(z4,(x3,y5),(x3,y7),x3-x7) tmp_path; + draw z6 if ab_up_factor>0: right_to_down else: .. fi z7; + x8=x1; rt x9=w-apprr-hround u; y9=y2; + y8=good.y 0.3[y6,y1]; draw z8..z9; + square_end1(left); square_end8(z8-z9); + square_end9(z8-z9); + labels(1,2,3,4,5,6,7,8,9); +endchar; + +iff known bbeng: +beginchar(bbeng,8u#+2appr#,x_height#,desc_depth#); + "Lowercase eng"; + italcorr 0.75x_height#*slant-.5u#; + j_bar:=true; complete_n; +endchar; + +iff known bbthorn: +beginchar(bbthorn,8u#+2appr#,asc_height#,desc_depth#); + "Lowercase thorn"; + italcorr 0.6x_height#*slant+ho#-.5u#; + complete_right_lower(lower_down_curve_factor,lower_up_curve_factor); +endchar; + diff --git a/fonts/mbboard/source/mbbromxu.mf b/fonts/mbboard/source/mbbromxu.mf new file mode 100644 index 0000000000..7f62dd8644 --- /dev/null +++ b/fonts/mbboard/source/mbbromxu.mf @@ -0,0 +1,111 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbromxu.mf (extended roman uppercase) +% last modification: 25.10.2001. + +% Crossed letters are no more generated. +% They appear only with Cork encoding. + +def horizontal_rules_list=0.4cap_height,0.5cap_height,0.6cap_height, + -body_depth,-desc_depth,cap_height,asc_height,body_height +enddef; + +use_rule2; + +beginchar(bbAE,15.25u#+2appr#,cap_height#,0); + "The letter AE"; + italcorr cap_height#*slant-.5u#; + pickup circle.nib; + rt x5=rt x8=w-apprr; rt x5-lft x6=rt x8-lft x7=hround 7.5u; + top y5=top y9=top y6=h; bot y7=bot y10=bot y8=0; + lft x11=x10=x9=x6+hthick; bot y11=bot y12=vround 0.5h; + rt x12=w-apprr-hround 0.7u; + z1l=(apprl-0.5u,0); z2l=(lft x6,h); + penpos1(diag_width(thin,z2l-z1l),0); + penpos2(diag_width(thin,z2l-z1l),0); + y0=y2l; x0=x6; z2a=whatever[z6,z7]; z2a=whatever[z1r,z2r]; + bot y3=bot y4=vround 0.25h; x4=x6; z3=whatever[z1,z2]; + fill z1l--z1r--z2a--z0--z2l--cycle; draw z3..z4; draw z9..z10; + pickup square.nib; draw z5--z6--z7--z8; draw z11..z12; + labels(range 3 thru 12); penlabels(0,1,2); + math_fit(0,0.5ic#); +endchar; + +beginchar(bbOE,16u#+2appr#,cap_height#,0); + "The letter OE"; + italcorr cap_height#*slant-.5u#;% not perfect at all... + numeric t[]; + pickup circle.nib; + y1=y3=0.5[y4,y2]; top y2=h+o; bot y4=-o; x2=x4=0.5[x3,x1]; + lft x3=apprl; x1=x13+hThick-hthick; + rt x9=rt x12=w-apprr; rt x9-lft x10=rt x12-lft x11=hround 7.5u; + top y9=top y13=top y10=h; bot y11=bot y14=bot y12=0; + lft x15=x14=x13=x10+hthick; bot y15=bot y16=vround 0.5h; + rt x16=w-apprr-hround 0.7u; + tmp_path:=superellipse(z1,z2,z3,z4,superness); + bbbowl(z2,z3,z4,hThick) tmp_path; + t1=xpart(tmp_path intersectiontimes ((x10,y2)..(x10,y3))); + t2=xpart(tmp_path intersectiontimes ((x10,y3)..(x10,y4))); + z7=point t2 of tmp_path; z8=point t1 of tmp_path; + draw z10..z8&subpath(t1,t2) of tmp_path&z7..z11; draw z13..z14; + pickup square.nib; draw z9--z10--z11--z12; draw z15..z16; + labels(range 1 thru 16); + math_fit(0,0.5ic#); +endchar; + +beginchar(bbslash_O,13u#+2appr#,cap_height#+0.5desc_depth#,0.5desc_depth#); + "The letter slash O"; + italcorr 0.7cap_height#*slant-.5u#; + pickup circle.nib; + bbcircle1(apprl,w-apprr,cap_height+o,-o); draw last_path; + bbbowl(z1b,z1a,z1d,hThick) last_path; z3=z.bowl.top; + bbbowl(z1b,z1c,z1d,hThick) last_path; z2=z.bowl.bot; + y4=-d; y5=h; + z4=whatever[z2,z3]; z5=whatever[z2,z3]; + penpos4(diag_width(thin,z3-z2),0); + penpos5(diag_width(thin,z3-z2),0); + penstroke z4e..z5e; penlabels(2,3,4,5); + math_fit(0.3cap_height#*slant-0.5u#,ic#); +endchar; + +iff known bbEng: +beginchar(bbEng,12u#+Appr#+appr#,cap_height#,0); + "The letter Eng"; + italcorr 0.8cap_height#*slant-.5u#; + pickup circle.nib; + lft x1=lft x3=Apprl; rt x7=rt x8=w-apprr; x4-x3=x2-x1=hthick; + x5=x4; x6=0.5[x4,x7]; x9=0.5[x10,x8]; rt x8-lft x10=hround(7.2u); + if x10<x2: x10:=x2; fi + bot y1=bot y2=0; top y3=top y4=h; y5=y7; top y6=h+o; y6-y7=y8-y9; + top y8=top y10=vround 0.3h; bot y9=-o; + tmp_path:=z5 up_to_right z6 right_to_down z7..z8 down_to_left + z9 left_to_up z10; + draw tmp_path; + hbbowl(z6,z7,0.5[z7,z8],hthick) tmp_path; + hbbowl(z9,z8,0.5[z7,z8],hthick) tmp_path; + pickup square.nib; + draw z1--z2--z4--z3--cycle; + square_end10(up); + labels(1,2,3,4,5,6,7,8,9,10); +endchar; + +iff known bbThorn: +beginchar(bbThorn,10.15u#+Appr#+appr#,cap_height#,0); + "The letter Thorn"; + italcorr 0.6cap_height#*slant-.5u#; + pickup circle.nib; + lft x1=lft x2=Apprl; rt x7=w-apprr; + x3=x4=x5=x9=x1+hthick; x6=x8=0.5[x1,x7]; + bot y1=bot y4=0; top y2=top y3=h; + top y5=top y6=vround 0.825h; + bot y8=bot y9=vround 0.225h; + y7=0.5[y8,y6]; + tmp_path:=z5..z6 right_to_down z7 down_to_left z8..z9; + bbbowl(z6,z7,z8,hThick) tmp_path; draw tmp_path; + pickup square.nib; draw z1--z2--z3--z4--cycle; + labels(1,2,3,4,5,6,7,8,9); +endchar; + + + + + diff --git a/fonts/mbboard/source/mbbsc10.mf b/fonts/mbboard/source/mbbsc10.mf new file mode 100644 index 0000000000..caef251e01 --- /dev/null +++ b/fonts/mbboard/source/mbbsc10.mf @@ -0,0 +1,28 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbsc10.mf (parameters' file for 10 points small caps fonts) +% last modification: 25.10.2001. + +% To be checked + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbbsc"; font_size 10pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_y:=false; variant_g:=false; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbblight; +lower.u#:=17/36pt#; % unit width +lower.letter_fit#:=2.4/36pt#; % extra space added to all sidebars +lower.body_height#:=200/36pt#; % height of tallest characters +lower.x_height#:=116/36pt#; % height of small lowercase +lower.cap_height#:=185/36pt#; % height of uppercase and tall lowercase +lower.o#:=5/36pt#; % amount of vertical overshoot for curves + +input mbbsmcdr; + + diff --git a/fonts/mbboard/source/mbbsl10.mf b/fonts/mbboard/source/mbbsl10.mf new file mode 100644 index 0000000000..f0dfe59c76 --- /dev/null +++ b/fonts/mbboard/source/mbbsl10.mf @@ -0,0 +1,18 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbsl10.mf (parameters' file for 10 points slanted fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbbsl"; font_size 10pt#; + +slant:=1/6; +square_dots:=false; +variant_a:=true; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=false; +ab_up_factor:=0.05; ab_down_factor:=0.15; +hmn_factor:=0.15; uy_factor:=0.15; + +input mbblight; +input mbbdrivr;
\ No newline at end of file diff --git a/fonts/mbboard/source/mbbsmcdr.mf b/fonts/mbboard/source/mbbsmcdr.mf new file mode 100644 index 0000000000..e40fb0dc19 --- /dev/null +++ b/fonts/mbboard/source/mbbsmcdr.mf @@ -0,0 +1,121 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbsmcdr.mf (small caps driver file) +% last modification: 25.10.2001. + +mode_setup; font_setup; +font_coding_scheme:="mbb small caps"; +% desserves much more care. + +% encoding + + bbes_zet=hex"19"; + bbslash_o=hex"1C"; bbslash_O=hex"1F"; + bbae=hex"1A"; bbAE=hex"1D"; + bboe=hex"1B"; bbOE=hex"1E"; + + bbgrave=hex"12"; bbacute=hex"13"; + bbcircumflex=hex"5E"; bbhacheck=hex"14"; bbtilde=hex"7E"; + bbbreve=hex"15"; bbmacron=hex"16"; + bbdotaccent=hex"5F"; bbumlaut=hex"7F";bbcirc_accent=hex"17"; + bbcedilla=hex"18"; +% bblong_umlaut:=hex"7D"; + bbleft_slanted_cross=hex"20"; +% bbogonek=hex"22";% Polish + bbrough=hex"9E"; bbsmooth=hex"9F";% Greek +% bbstraight_accent=hex"E0";% Greek + + bbstar=hex"2A"; bbcomma=hex"2C"; bbperiod=hex"2E"; + bbcolon=hex"3A"; bbsemicolon=hex"3B"; + bbquestion_mark=hex"3F"; bbexclamation_point=hex"21"; + bbspanish_shriek=hex"05"; bbspanish_query=hex"06"; + bbslash=hex"2F"; bbback_slash=hex"5C"; + + vertical=hex"7C"; + parenthesis_left=hex"28"; parenthesis_right=hex"29"; + bracket_left=hex"5B"; bracket_right=hex"5D"; + brace_left=hex"7B"; brace_right=hex"7D"; + + bbapostrophe=hex"27"; bbreverse_apostrophe=hex"60"; + bbopening_quotes=hex"02"; bbclosing_quotes=hex"03"; + bbgerman_opening_quotes=hex"04"; + bbstraight_quotes=hex"22"; % ASCII location + bbdash=hex"2D"; bben_dash=hex"00"; bbem_dash=hex"01"; + ligtable bbdash: bbdash=:bben_dash; + ligtable bben_dash: bbdash=:bbem_dash; + ligtable bbreverse_apostrophe: bbreverse_apostrophe=:bbopening_quotes; + ligtable bbapostrophe: bbapostrophe=:bbclosing_quotes; + ligtable bbcomma: bbcomma=:bbgerman_opening_quotes; + ligtable bbexclamation_point: bbreverse_apostrophe=:bbspanish_shriek; + ligtable bbquestion_mark: bbreverse_apostrophe=:bbspanish_query; + +% bbhash_mark=hex"23"; + bbdollar=hex"24"; +% bbpercent=hex"25"; + bbesperluette=hex"26"; +% bbat_sign=hex"40"; +% bbpartial_derivative=hex"A0"; +% bbperthousand=hex"E8"; +% bbeuro=hex"E9"; bbpound=hex"EA"; bbcent=hex"EB"; bbyen=hex"EC"; + + bbAlpha=hex"81"; bbBeta=hex"82"; bbGamma=hex"83"; bbDelta=hex"84"; + bbEpsilon=hex"85"; bbZeta=hex"86"; bbEta=hex"87"; bbTheta=hex"88"; + bbIota=hex"89"; bbKappa=hex"8A"; bbLambda=hex"8B"; bbMu=hex"8C"; + bbNu=hex"8D"; bbXi=hex"8E"; bbOmicron=hex"8F"; bbPi=hex"90"; + bbRho=hex"91"; bbSigma=hex"92"; bbTau=hex"93"; bbUpsilon=hex"94"; + bbPhi=hex"95"; bbChi=hex"96"; bbPsi=hex"97"; bbOmega=hex"98"; + boolean variant_Upsilon; variant_Upsilon=false; + bbslash_Sigma=hex"9A"; bbnabla=hex"9B"; bbcoprod=hex"9C"; + bbmho=hex"9D"; +% bbDigamma=hex"E1"; bbKoppa=hex"E2"; bbSampi=hex"E3"; + +% Activate to allow characters with undefined code. +% (for proof mode compilation) + +%def iff expr b= +% if b: let next_=use_it else: let next_=use_it fi; next_ +%enddef; + +extra_endchar:=extra_endchar&";charcode:=charcode+code_offset;"; +code_offset:=0; + +% let the show begin: + +input mbbromup; +input mbbromxu; +input mbbdigit; +input mbbaccnt; +input mbbpunct; +input mbbsymbl; +input mbbgrkup; + +forsuffixes $=u,letter_fit,body_height,cap_height,x_height,o: + $.#:=lower.$.#; +endfor +thin2#:=thin1#; thick2#:=thick1#; + +font_setup; + +code_offset:=ASCII"a"-ASCII"A"; +input mbbromup; +input mbbgrkup; +code_offset:=-3; +input mbbromxu; + +% parameters for TFM files. + +font_slant=slant; +font_x_height=x_height#; +font_normal_stretch=3u#; +font_normal_shrink=2u#; +font_quad=18u#+4letter_fit#; +font_extra_space=2u#; +font_normal_space=6u#+2letter_fit#; + +bye. + + + + + + + diff --git a/fonts/mbboard/source/mbbsymbl.mf b/fonts/mbboard/source/mbbsymbl.mf new file mode 100644 index 0000000000..1b6854a531 --- /dev/null +++ b/fonts/mbboard/source/mbbsymbl.mf @@ -0,0 +1,554 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbsymbl.mf (various blackboard symbols) +% last modification: 25.10.2001. + +def horizontal_rules_list=math_axis, + -body_depth,-desc_depth,x_height,cap_height,asc_height,body_height +enddef; + +% usual symbols + +iff known equal_sign: +compute_spread(.35x_height#,.45x_height#); +beginchar(equal_sign,12u#+2appr#,v_center(spread#+rule_thickness#)); + "Equality sign"; + italcorr charht*slant-.5u#; + penpos1(rule_thickness,90); penpos2(rule_thickness,90); + penpos3(rule_thickness,90); penpos4(rule_thickness,90); + x1=x3=Apprl; x2=x4=w-Apprr; + y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis; + penstroke z1e..z2e; % upper bar + penstroke z3e..z4e; % lower bar + penlabels(1,2,3,4); +endchar; + +iff known plus_sign: +beginchar(plus_sign,12u#+2appr#,6u#+math_axis#,6u#-math_axis#); + "Plus sign"; + italcorr charht*slant-.5u#; + penpos1(rule_thickness*(1++slant),0); + penpos2(rule_thickness*(1++slant),0); + penpos3(rule_thickness,90); penpos4(rule_thickness,90); + x1l=x2l=hround(0.5[Apprl,w-Apprr]-0.5rule_thickness*(1++slant)); + x3=Apprl; y3=y4=math_axis; x1l-x3=x4-x1r=y1-y3r=y3l-y2; + penstroke z1e..z2e; % stem + penstroke z3e..z4e; % crossbar + penlabels(1,2,3,4); +endchar; + +iff known minus_sign: +beginchar(minus_sign,12u#+2appr#,6u#+math_axis#,6u#-math_axis#); + "Minus sign"; + italcorr charht*slant-.5u#; + penpos1(rule_thickness,90); penpos2(rule_thickness,90); + y1=y2=math_axis; x1=Apprl; x2=w-Apprr; + penstroke z1e..z2e; + penlabels(1,2,3,4); +endchar; + +iff known hash_sign: +compute_spread(.35x_height#,.45x_height#); +beginchar(hash_sign,12u#+2appr#,6u#+math_axis#,6u#-math_axis#); + "Hash sign"; + italcorr charht*slant-.5u#; + penpos1(rule_thickness,90); penpos2(rule_thickness,90); + penpos3(rule_thickness,90); penpos4(rule_thickness,90); + penpos5(rule_thickness*(1++slant),0); + penpos6(rule_thickness*(1++slant),0); + penpos7(rule_thickness*(1++slant),0); + penpos8(rule_thickness*(1++slant),0); + x5l=x6l=hround(0.5[Apprl,w-Apprr] + -0.5(rule_thickness+spread)*(1++slant)); + x7l=x8l=hround(x5l+spread*(1++slant)); + x1=x3=Apprl; x2=x4=x7r+(x5l-x1); + y1r=y2r=vround(math_axis+0.5(rule_thickness+spread)); + y3r=y4r=y1r-spread; + %x5l-x1=y5-y1r=y3l-y6; y5=y7; y6=y8; + y5=y7=h; y5-y1r=y3l-y6; y6=y8; + penstroke z1e..z2e; penstroke z3e..z4e; + penstroke z5e..z6e; penstroke z7e..z8e; + penlabels(1,2,3,4,5,6,7,8); +endchar; + +iff known inferior_sign: +compute_spread(5/4x_height#,3/2x_height#); +beginchar(inferior_sign,11u#+2appr#, + v_center(spread#+rule_thickness#)); + "Inferior sign"; + italcorr charht*slant-.5u#; + y2r=0.5[y1,y3]=vround math_axis+0.5; y1-y3=spread; + x1=w-apprr; x2r=apprl-0.5; x1=x1r=x3=x3r; + adjust_slanted_bar(2r,1,2a,1')(0.5rule_thickness,-1); + adjust_slanted_bar(2r,3,2b,3')(0.5rule_thickness,1); + z1r=whatever[z2r,z1']; z3r=whatever[z2r,z3']; + z1r-z1=z1-z1l; z3r-z3=z3-z3l; + z2l-z1l=whatever*(z2r-z1r); z2l-z3l=whatever*(z2r-z3r); + penstroke z1e--z2e--z3e; + penlabels(1,2,3); labels(1',3',2a,2b); +endchar; + +iff known superior_sign: +compute_spread(5/4x_height#,3/2x_height#); +beginchar(superior_sign,11u#+2appr#, + v_center(spread#+rule_thickness#)); + "Superior sign"; + italcorr charht*slant-.5u#; + y2r=0.5[y1,y3]=vround math_axis+0.5; y1-y3=spread; + x1=apprl; x2r=w-apprr+0.5; x1=x1r=x3=x3r; + adjust_slanted_bar(2r,1,2a,1')(0.5rule_thickness,1); + adjust_slanted_bar(2r,3,2b,3')(0.5rule_thickness,-1); + z1r=whatever[z2r,z1']; z3r=whatever[z2r,z3']; + z1r-z1=z1-z1l; z3r-z3=z3-z3l; + z2l-z1l=whatever*(z2r-z1r); z2l-z3l=whatever*(z2r-z3r); + penstroke z1e--z2e--z3e; + penlabels(1,2,3); labels(1',3',2a,2b); +endchar; + +% blackboard symbols + +iff known bbhash_mark: +use_rule2; +compute_spread(0.45x_height#,0.55x_height#); +beginchar(bbhash_mark,13u#+2appr#,asc_height#,asc_depth#); + "Hash mark"; + italcorr (math_axis#+0.5(spread#+thin#))*slant-0.5u#; + pickup circle.nib; + lft x9=lft x15=apprl; rt x14=rt x20=w-apprr; + x10-x9=x14-x13=hround((x14-x9-2hthick-thin)/3); x11-x10=x13-x12=hthick; + x1=x2=x10=x16; x3=x4=x11=x17; x5=x6=x12=x18; x7=x8=x13=x19; + bot y1=-d; y1=y4=y5=y8; top y2=h; y2=y3=y6=y7; + y9=good.y(math_axis-0.5spread); y9=y10=y11=y12=y13=y14; + y15=good.y(math_axis+0.5spread); y15=y16=y17=y18=y19=y20; + pickup square.nib; + draw z1--z2--z3--z4--cycle; draw z5--z6--z7--z8--cycle; + draw z9..z10; draw z11..z12; draw z13..z14; + draw z15..z16; draw z17..z18; draw z19..z20; + labels(range 1 thru 20); +endchar; + +% The small zero for `per cent sign' and al. is defined here. +if (known bbpercent)or(known bbperthousand)or(known bbsmall_zero) + or(known bbpertenthousand): + begingroup + use_rule1; + clearit; clearxy; + h:=vround(hppp*(0.5asc_height#)); + d:=vround(hppp*(body_height#-asc_height#)); + w:=hround(hppp*(7.5u#+2appr#)); + save hThick; hThick:=hthick; + pickup circle.nib; + bbcircle1(apprl,w-apprr,h,0); draw last_path; + bbbowl(z1b,z1a,z1d,hThick) last_path; + bbbowl(z1b,z1c,z1d,hThick) last_path; + picture tmp_picture; tmp_picture=currentpicture; + numeric tmp_w,tmp_h; tmp_w=w; tmp_h=h; + endgroup; +fi + +iff known bbpercent: +use_rule1; +beginchar(bbpercent,16u#+2appr#,body_height#, + body_height#-asc_height#); + "Per cent sign"; + italcorr body_height#*slant-2.5u#; + y1l=-d; y2r=h; x1l-apprl=w-apprr-x2r=hround 2u; + adjust_slanted_bar(1l,2r,1r,2l)(thin,-1); penstroke z1e..z2e; + currentpicture:=currentpicture + +(tmp_picture shifted((tmp_h+d)*slant,asc_height-tmp_h)) + +(tmp_picture shifted(w-tmp_w,0)); + penlabels(1,2); +endchar; + +% The widths of the small zero and of the next character +% are adjusted so that the distance between the two lowest +% small zeroes is exactly 0.5u# (independent of letter_fit#). +% This should be remembered when defining kerning rules. + +iff known bbperthousand: +use_rule1; +beginchar(bbperthousand,24u#+2appr#,body_height#, + body_height#-asc_height#); + "Per thousand sign"; + italcorr body_height#*slant-u#; + a:=hround(hppp*(16u#+2appr#)); + currentpicture:=currentpicture + +(tmp_picture shifted((tmp_h+d)*slant,asc_height-tmp_h)) + +(tmp_picture shifted(w-tmp_w,0)) + +(tmp_picture shifted(a-tmp_w,0)); + y1l=-d; y2r=h; x1l-apprl=a-apprr-x2r=hround 2u; + adjust_slanted_bar(1l,2r,1r,2l)(thin,-1); + penstroke z1e..z2e; penlabels(1,2); +endchar; + +iff known bbpertenthousand: +use_rule1; +beginchar(bbpertenthousand,31.5u#+2appr#,body_height#, + body_height#-asc_height#); + "Per ten thousand sign"; + italcorr body_height#*slant-10u#; + a:=hround(hppp*(16u#+2appr#)); + currentpicture:=currentpicture + +(tmp_picture shifted((tmp_h+d)*slant,asc_height-tmp_h)) + +(tmp_picture shifted(w-tmp_w,0)) + +(tmp_picture shifted(a-tmp_w,0)) + +(tmp_picture shifted(0.5(a+w)-tmp_w,0)); + y1l=-d; y2r=h; x1l-apprl=a-apprr-x2r=hround 2u; + adjust_slanted_bar(1l,2r,1r,2l)(thin,-1); + penstroke z1e..z2e; penlabels(1,2); +endchar; + +iff known bbsmall_zero: +use_rule1; +beginchar(bbsmall_zero,7.5u#+2appr#,0.5asc_height#, + body_height#-asc_height#); + "Small zero"; + currentpicture:=tmp_picture; +endchar; + +iff known bbampersand: +use_rule1; +beginchar(bbampersand,11u#+2appr#,asc_height#,0); + "The ampersand"; + italcorr x_height#*slant-.5u#; + numeric second_slope,t; + pickup circle.nib; + y2=0.558h; x4-x10=hround 0.9u; rt x6-lft x4=hround 5.6u; + x17-x4=hround 0.5[thin,thick]; lft x10=apprl-ho; + x5=x11=max(0.5[x4,x6],x17+eps); + x2-x10=hThick; x15=w-apprr; y15=0; + adjust_slanted_bar(2,15,2a,1)(thick,1); + slope:=(y2-y1)/(x2-x1); second_slope=-0.56slope; + a:=diag_width(thin,(1,slope)); + penpos1(a,0); penpos15(a,0); + top y5=h+oo; bot y11=-oo; + ellipse_set(5,4,3,1); ellipse_set(5,17,16,15); + slope:=second_slope; + ellipse_set(11,10,9,2); ellipse_set(5,6,7,2); + x14r=w-apprr; y14r=x_height; z13r=whatever[z15,z16]; + z13r=whatever[z14r,(0.5[x11,x1],0)]; + penpos14(diag_width(thin,z14r-z13r),0); + z13l=whatever[z15,z16]; z14l-z13l=whatever*(z14r-z13r); + z13=whatever[z15,z16]; z14-z13=whatever*(z14r-z13r); + z12=whatever[z1,z2]; z12=whatever[z13,z14]; + tmp_path:=z3{z3-z1}...z4 up_to_right z5 right_to_down z6 + ...z7---z2---z9...z10 down_to_right z11...z12{z14-z13}; + t=xpart(tmp_path intersectiontimes(z15..z16)); + z8=point t of tmp_path; + ortho_penpos3(thin,z3-z1); ortho_penpos16(thin,z16-z15); + y1a-y1=thin; z1a-z1=z15a-z15=whatever*(z2-z1); + penstroke z1e..z3e; penstroke z15e..z16e; penstroke z13e..z14e; + fill z1--z1a--z15a--z15--cycle; + draw subpath (0,t) of tmp_path; + draw subpath (7,12) of tmp_path; + hbbowl(z11,z10,(x10,y2),x2-x10) tmp_path; + draw z16{z16-z15}...z17 up_to_right z5; + labels(1a,2,2a,4,5,6,7,8,9,10,11,12,15a,17); + penlabels(1,3,13,14,15,16); +endchar; + +iff known bbat_sign: +use_rule1; +beginchar(bbat_sign,12u#+2appr#,asc_height#,0); + "At sign"; + italcorr 0.7asc_height#*slant-.5u#; + numeric t; pickup circle.nib; + if hround((w+apprl-apprr-hThick-thin)/2) + <>(w+apprl-apprr-hThick-thin)/2: change_width fi; + lft x7=(w+apprl-apprr-hThick-thin)/2; + lft x3=apprl; rt x1=rt x5=w-apprr; + x6=x8=0.5[x7,x5]; y1=0.707[y3,y2]; + top y4=h+oo; bot y2=-oo; x4=0.5[x2,0.5[x3,x5]]; + bot y6=vround 0.2h-oo; top y8=vround 0.8h+oo; + y3=0.5[y2,y4]; y7=0.5[y6,y8]; + tmp_path:=reverse elliptic_arc(3,2,1); + y5=0.5[y7,((x5-x4)/(x4-x3))[y4,y3]];% key formula + tmp_path:=tmp_path & z3 up_to_right z4 right_to_down z5 + down_to_left z6 left_to_up z7 up_to_right z8 right_to_down z5; + bbbowl(z4,z5,z6,hThick) tmp_path; + t=12+xpart(subpath (12,infinity) of tmp_path + intersectiontimes bowl_path); + draw subpath (0,t) of tmp_path; + bbbowl(z4,z3,z2,hThick) tmp_path; + bbbowl(z8,z7,z6,hThick) tmp_path; + square_end1(z1-z1'); + labels(1,1',2,3,4,5,6,7,8); +endchar; + +iff known bbpartial: +use_rule1; +beginchar(bbpartial,8u#+2appr#,asc_height#,0); + "The partial derivative symbol"; + italcorr .7asc_height#*slant-.5u#; + numeric t; pickup circle.nib; + top y2=h+oo; bot y4=-oo; y1=0.92[y4,y2]; + top y6=x_height+oo; y3=0.43[y4,y2]; y5=0.5[y4,y6]; + lft x1=apprl+hround 0.4u; rt x3=w-apprr+ho; lft x5=apprl-ho; + x4=x6=0.5[x5,x3]; x3=x7; y5=y7; + tmp_path:=reverse elliptic_arc(3,2,1) & z3 down_to_left + z4 left_to_up z5 up_to_right z6 right_to_down z7; + bbbowl(z6,z5,z4,hThick) tmp_path; + bbbowl(z2,z3,z4,hThick) tmp_path; + t=8+xpart(subpath (8,infinity) of tmp_path + intersectiontimes bowl_path); + draw subpath (0,t) of tmp_path; + square_end1(z1-z1'); + labels(1,1',2,3,4,5,6,7); +endchar; + +iff known bbWeierstrass_p: +use_rule1; +beginchar(bbWeierstrass_p,10u#+2appr#,x_height#,desc_depth#); + "The Weierstrass' p"; + italcorr 0.6x_height#*slant+ho#-.5u#; + path tmp_path[]; numeric t[]; pickup circle.nib; + top y1=h+o; top y8=vround 0.9h+o; bot y10=-oo; bot y6=-d-o; + y0=0.5[y1,y6]; y9=0.5[y8,y10]; + lft x2l=apprl-ho; rt x9=w-apprr+ho; x5r-x2l=hround 5u+2eps; + x2r-x2l=x5r-x5l=hround 0.375[thin,ess]; x0=x6=0.5[x2l,x5r]; + x1=good.x x0; x9-x12=hThick; x8=x10=0.7[x2l,x9]; + slope:=-(h+d)/9u; ortho_penpos0(ess,-(1,slope)); + ellipse_set(1,2l,3l,0l); ellipse_set(1,2r,3r,0r); + ellipse_set(6,5l,4l,0l); ellipse_set(6,5r,4r,0r); + tmp_path1=z1 left_to_down z2r...z3r---z4r...z5r down_to_left z6; + tmp_path2=z1 left_to_down z2l...z3l---z4l...z5l down_to_left z6; + y7=0.5[y5r,y5l]; x7=good.x(2x0-0.5[x5r,x5l]); + y11''=y9; 0.5[x11'',x9]=x10; lft x11=max(rt x5r+0.25u,lft x11''); + y11'=y10; + tmp_path3=z7 up_to_right z8 right_to_down z9 down_to_left z10 + left_to_up z11''; + t1=xpart(tmp_path3 intersectiontimes tmp_path2); + t2=xpart(tmp_path3 intersectiontimes tmp_path1); + t3=xpart(tmp_path3 intersectiontimes ((x11,y10)..(x11,y9))); + bbbowl(z8,z9,z10,hThick) tmp_path3; + z11=point t3 of tmp_path3; z11'-z11=whatever*(direction t3 of tmp_path3); + draw tmp_path1&z6 left_to_up z7&subpath (0,t1) of tmp_path3; + draw tmp_path2; draw subpath (t2,t3) of tmp_path3; + square_end1(right); square_end11(z11-z11'); + penlabels(0,2,3,4,5); labels(1,6,7,8,9,10,11); +endchar; + +% Currency signs + +iff known bbdollar: +use_rule2; +beginchar(bbdollar,8u#+2appr#,body_height#,body_height#-asc_height#); + "The dollar sign"; + italcorr fig_height#*slant-.5u#;% I don't know why (see computer modern). + center_stem(10,13); + slope:=-asc_height/40u; y5=0.52asc_height; + top y2=asc_height+oo; bot y8=-oo; + y1=good.y 0.918[y8,y2]; y9=good.y 0.126[y8,y2]; + lft x3l=lft x9-0.15u=apprl; + rt x7r=w-apprr; rt x1=w-apprr-0.825u; + x2=x5=x8=0.5[apprl,w-apprr]; + x3r-x3l=x7r-x7l=hround 0.475[thin,cap_ess]; + ortho_penpos5(cap_ess,(-1,-slope)); + forsuffixes $=r,l: + ellipse_set(2,3.$,4.$,5.$); ellipse_set(8,7.$,6.$,5.$); + endfor + z1'-z1=(z2-z1)xscaled 0.36; z9-z9'=(z9-z8)xscaled 0.3; + tmp_path:=z1{z1'-z1}...z2 left_to_down z3l...z4l + ---z6l...z7l down_to_left z8; + tmpp_path:= z2 left_to_down z3r...z4r + ---z6r...z7r down_to_left z8...{z9-z9'}z9; + bot y10=-d; top y13=h; + z11=tmp_path intersectionpoint((x10,y3l)..(x10,y7l)); + z12=tmpp_path intersectionpoint((x10,y3r)..(x10,y7r)); + draw tmp_path; draw tmpp_path; draw z10..z11; draw z12..z13; + square_end10(down); square_end13(up); + square_end1(z1-z1'); square_end9(z9-z9'); + labels(1,1',2,8,9,9',10,11,12,13); penlabels(3,4,5,6,7); +endchar; + +iff known bbeuro: +use_rule2; +beginchar(bbeuro,12u#+2appr#,asc_height#,0); + "The euro sign"; + italcorr asc_height#*slant-.5u#; + pickup circle.nib; + ortho_penpos2(thin,left); ortho_penpos4(thin,right); + x1l=x5l=x5r=w-apprr; lft x3=apprl+ceiling u-eps; + x0=x2=x4=(1/(1+cosd40))[rt x3,x1l]; + top y2=h+o; bot y4=-o; y3=y0=0.5[y2,y4]; + y1l-y0=y0-y5l=(y2l-y0)*sind 40; + y5l-y5r=thin/sind 40; + z1r-z1l=thin/cosd(angle(z1l-z4r)-40)*unitvector(z1l-z4r); + tmp_path:=z2 left_to_down z3 down_to_right z4; + draw tmp_path; + bbbowl(z2,z3,z4,hThick) tmp_path; + y8=good.y 0.6[y4,y2]; y12=good.y 0.4[y4,y2]; + y8r=top y8; y8l=bot y8; y12r=top y12; y12l=bot y12; + y8r=y11r; y8l=y11l; y12r=y15r; y12l=y15l; + x8r=x12r=apprl; z8r-z8l=z12r-z12l=whatever*(z1l-z4r); + z11r=whatever[z1l,z4r]; z11l=whatever[z1l,z4r]; + z15r=whatever[z1l,z4r]; z15l=whatever[z1l,z4r]; + z9r=tmp_path intersectionpoint ((0,y8r)...(w,y8r)); + z9l=tmp_path intersectionpoint ((0,y8l)...(w,y8l)); + z10r=bowl_path intersectionpoint ((0,y8r)...(w,y8r)); + z10l=bowl_path intersectionpoint ((0,y8l)...(w,y8l)); + z13r=tmp_path intersectionpoint ((0,y12r)...(w,y12r)); + z13l=tmp_path intersectionpoint ((0,y12l)...(w,y12l)); + z14r=bowl_path intersectionpoint ((0,y12r)...(w,y12r)); + z14l=bowl_path intersectionpoint ((0,y12l)...(w,y12l)); + penstroke z1e...z2e{left}; penstroke z4e{right}...z5e; + penstroke z8e..z9e; penstroke z10e..z11e; + penstroke z12e..z13e; penstroke z14e..z15e; + penlabels(1,2,4,5,8,9,10,11,12,13,14,15); + labels(0,3,3,5); +endchar; + +iff known bbpound: +use_rule2; +beginchar(bbpound,8.5u#+2appr#,asc_height#,0); + "The pound sign"; + italcorr asc_height#*slant-.5u#;% to be corrected + pickup circle.nib; + lft x1=lft x3=apprl; rt x2=w-apprr; + hround((w-apprl-apprr-hthick-thin)/3)=x8-x1=x2-x6; + hthick=x11-x8; x4=lft x8; x5=rt x11; + x12=0.25[x1,x8]; bot y1=0; y1=y2=y12; + y3=y4=y5=y6=good.y 0.5h; y8=0.75h; y11=0.25h; + x9=x6+hround 0.05u; x9=0.25[x10,x11]; + top y9=top y10=h; + tmp_path:=z8 up_to_right z9...z10; + tmpp_path:=z11 down_to_left z12---z1; + draw tmp_path; draw tmpp_path; + hbbowl(z9,z8,(x8,y11),x11-x8) tmp_path; + hbbowl(z12,z11,(x11,y8),x11-x8) tmpp_path; + square_end10(right); pickup square.nib; + draw z1..z2; draw z3..z4; draw z5..z6; + labels(1,2,3,4,5,6,7,8,9,10,11,12); +endchar; + +iff known bbcent: +use_rule1; +beginchar(bbcent,7u#+2appr#,x_height#+0.5desc_depth#,0.5desc_depth#); + "The cent sign"; + italcorr x_height#*slant-.5u#; + pickup circle.nib; + x1=x5=w-apprr; lft x3=apprl-ho; + top y2=x_height+uo; bot y4=-oo; y3=0.5[y4,y2]; + y1=0.707[y3,y2]; y5=0.707[y3,y4]; + tmp_path:=reverse elliptic_arc(3,2,1)&elliptic_arc(3,4,5); + x6=x7=good.x(x2+eps); bot y6=-d; top y7=h; + draw tmp_path; bbbowl(z2,z3,z4,hThick) tmp_path; + square_end1(z1-z1'); + square_end5(z5-z5'); + pickup square.nib; draw z6..z7; + labels(1,1',2,3,4,5,5',6,7); +endchar; + +iff known bbyen: +use_rule2; +beginchar(bbyen,12u#+2appr#,cap_height#,0); "The Yen sign"; + italcorr cap_height#*slant-0.5u#; +% copy of roman Y + center_bar(3,4); bot y3=bot y4=-d; + x3l=apprl+hround(0.5(w-apprr-apprl-hthick-thin*(1++slant))); + x4l-x3l=hround(hthick+thin*(1++slant)); + x3r-x3l=x4l-x4r=thin*(1++slant); + y4l=y3l=-d; y3r-y3l=y4r-y4l=thin; + y1=y6=y7r=h; x1=apprl; x7r=w-apprr; + x2=x3; y2=y5a=0.4h; x6-x1=x5a-x2=diag_width(thick,z1-z2); + a:=diag_width(thin,z1-z2); + penpos1(a,0); penpos6(a,180); z8=z5; + forsuffixes $=,r,l: x5$=x4$; z5$-z6$=whatever*(z2-z1); endfor + forsuffixes $=r,l: x2$=x3$; z2$-z1$=whatever*(z2-z1); endfor + y1-y1a=y6-y6a=thin; z1a=whatever[z1,z2]; z6a=whatever[z6,z5a]; + adjust_slanted_bar(7r,8,7,8a)(0.5thin,-1); z7-z7l=z7r-z7; + ortho_penpos8(thin,z7-z8); + penstroke z1e--z2e--z3e--z4e--z5e--z6e; + fill z1--z6--z6a--z1a--cycle; penstroke z7e..z8e; + penlabels(1,2,3,4,5,6,7,8,9,10); labels(1a,5a,6a,8a); +% bars + lft x11=lft x15=apprl+hround 0.8u; + rt x14=rt x18=w-apprr-hround 0.8u; + y11=h-y15=good.y 0.6h; y11=y12=y13=y14; y15=y16=y17=y18; + x16=x3; if y5>y17: x17=x4 else: z17=whatever[z5,z6] fi; + z12=whatever[z1,z2]; z13=whatever[z5,z6]; + draw z11..z12; draw z13..z14; draw z15..z16; draw z17..z18; + square_end14(right); square_end18(right); + square_end11(left);square_end15(left); + labels(11,12,13,14,15,16,17,18); +endchar; + +% The next symbol is supposed to be associated +% to the israelian currency: the shereq +iff known bbshereq: +use_rule2; +beginchar(bbshereq,16u#+2appr#,cap_height#,0); + "The shereq sign"; + italcorr cap_height#*slant-.5u#; + pickup circle.nib; + top y1=h; bot y2=0; y1=y4=y5=y15; y2=y3=y9=y12=y13; + top y10=top y11=vround 0.8h; y7=y1-y10; + y6=0.3[y1,y2]; y14-y13=y5-y6; + lft x3=lft x4=apprl; rt x14=rt x15=w-apprr; + x1=x2=x3+hthick; x6=x7; x9=x10; x11=x12=x9-hthick; + x11-x3=x15-x7=hround((x15-x3-4hthick)/3)+hthick; + x5=0.5[x1,x7]; x13=0.5[x9,x15]; + tmp_path:=z4..z5 right_to_down z6..z7; + tmpp_path:=z12..z13 right_to_up z14..z15; + draw tmp_path; draw tmpp_path; + hbbowl(z5,z6,z7,hthick) tmp_path; z8=z.bowl.bot; + hbbowl(z13,z14,z15,hthick) tmpp_path; + pickup square.nib; + draw z1--z2--z3--z4; draw z9--z10--z11--z12; + draw z7..z8; draw z15..z.bowl.bot; + labels(range 1 thru 18); +endchar; + +% funny things + +iff known bbestimated: +use_rule2; +beginchar(bbestimated,13u#+2appr#,cap_height#,0); + "The Estimated sign (large e)"; + italcorr 0.6cap_height#*slant-.5u#; + numeric t; pickup circle.nib; + rt x1=w-apprr; lft x3=apprl; x2=x4=0.5[x1,x3]; + top y2=h+o; bot y4=-o; y1=y3=good.y(0.5[y2,y4]); + tmp_path:=superellipse(z1,z2,z3,z4,superness); + t=xpart(tmp_path intersectiontimes + (bot(w/2,0.25[y4,y2])..bot(w,0.25[y4,y2]))); + draw subpath (0,t) of tmp_path; + z5=point t of tmp_path; + bbbowl(z2,z3,z4,hThick) tmp_path; + z6=(x.bowl.mid,y1); + hbbowl(z2,z1,z1,hThick) tmp_path; + x6r=x6l=x6; x1r=x1; x1m=x1l=rt x1; + y6r=y1r=top y1; y1m=y1; y1l=y6l=bot y1; + fill z1l--z1m--z1r--z6r--z6l--cycle; + square_end5(direction t of tmp_path); + labels(1,1r,1l,1m,2,3,4,5,6,6l,6r); + math_fit(0,0); +endchar; + +iff known bbbar_h: +use_rule1; +beginchar(bbbar_h,8u#+2appr#,asc_height#,0); + "The letter bar h"; + italcorr 0.75x_height#*slant-.5u#; + complete_n; + y13=y14=y15=y16=good.y 0.5[bot h,bot x_height]; + lft x13=apprl-hround u; x14=lft x1; x15=rt x2; + rt x16-lft x13=hround(3.8u+thin+hthick); + draw z13..z14; draw z15..z16; labels(13,14,15,16); +endchar; + +iff known bbcross_h: +use_rule1; +beginchar(bbcross_h,8u#+2appr#,asc_height#,0); + "The letter crossed h"; + italcorr 0.75x_height#*slant-.5u#; + complete_n; + y13r=x_height; y16r=h; x13r=apprl-hround u; + x16r-x13r=hround(3.8u+thin+hthick); + ortho_penpos13(thin,z13r-z16r); ortho_penpos16(thin,z13r-z16r); + x14r=x14l=x1; x15r=x15l=x2; + z14r=whatever[z13r,z16r]; z14l=whatever[z13l,z16l]; + z15r=whatever[z13r,z16r]; z15l=whatever[z13l,z16l]; + penstroke z13e..z14e; penstroke z15e..z16e; + penlabels(13,14,15,16); +endchar; + diff --git a/fonts/mbboard/source/mbbx10.mf b/fonts/mbboard/source/mbbx10.mf new file mode 100644 index 0000000000..fb7ed0dbc1 --- /dev/null +++ b/fonts/mbboard/source/mbbx10.mf @@ -0,0 +1,23 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb10.mf (parameters' file for 10 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 10pt#; + +slant:=0; +%math_fitting:=true; +square_dots:=true; +straight_bowl:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbbxbold; +input mbbdrivr; + + + diff --git a/fonts/mbboard/source/mbbx12.mf b/fonts/mbboard/source/mbbx12.mf new file mode 100644 index 0000000000..105cd39734 --- /dev/null +++ b/fonts/mbboard/source/mbbx12.mf @@ -0,0 +1,23 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb12.mf (parameters' file for 12 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 12pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbbxbold; +input mbbdrivr; + + + + + diff --git a/fonts/mbboard/source/mbbx17.mf b/fonts/mbboard/source/mbbx17.mf new file mode 100644 index 0000000000..6b6571f77a --- /dev/null +++ b/fonts/mbboard/source/mbbx17.mf @@ -0,0 +1,23 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb17.mf (parameters' file for 17 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 17pt#; + +slant:=0; +%math_fitting:=true; +square_dots:=true; +straight_bowl:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbbxbold; +input mbbdrivr; + + + diff --git a/fonts/mbboard/source/mbbx5.mf b/fonts/mbboard/source/mbbx5.mf new file mode 100644 index 0000000000..626fdecc2e --- /dev/null +++ b/fonts/mbboard/source/mbbx5.mf @@ -0,0 +1,18 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb5.mf (parameters' file for 5 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 5pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbbxbold; +input mbbdrivr;
\ No newline at end of file diff --git a/fonts/mbboard/source/mbbx6.mf b/fonts/mbboard/source/mbbx6.mf new file mode 100644 index 0000000000..bf4276634f --- /dev/null +++ b/fonts/mbboard/source/mbbx6.mf @@ -0,0 +1,20 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb6.mf (parameters' file for 6 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 6pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbbxbold; +input mbbdrivr; + + diff --git a/fonts/mbboard/source/mbbx7.mf b/fonts/mbboard/source/mbbx7.mf new file mode 100644 index 0000000000..a601f1a9f1 --- /dev/null +++ b/fonts/mbboard/source/mbbx7.mf @@ -0,0 +1,20 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb8.mf (parameters' file for 7 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 7pt#; + +slant:=0; % tilt ratio $(\Delta x/\Delta y)$ +square_dots:=true; % should dots be square? +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbbxbold; +input mbbdrivr; + + diff --git a/fonts/mbboard/source/mbbx8.mf b/fonts/mbboard/source/mbbx8.mf new file mode 100644 index 0000000000..869ae38181 --- /dev/null +++ b/fonts/mbboard/source/mbbx8.mf @@ -0,0 +1,19 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb8.mf (parameters' file for 8 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 8pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbbxbold; +input mbbdrivr; + diff --git a/fonts/mbboard/source/mbbx9.mf b/fonts/mbboard/source/mbbx9.mf new file mode 100644 index 0000000000..0db1a3c4a8 --- /dev/null +++ b/fonts/mbboard/source/mbbx9.mf @@ -0,0 +1,18 @@ +% blackboard typefaces by Anthony Phan. +% file: mbb9.mf (parameters' file for 9 points fonts) +% last modification: 25.10.2001. + +if unknown mbbbase: input mbbbase fi + +font_identifier:="mbb"; font_size 9pt#; + +slant:=0; +square_dots:=true; +variant_a:=false; variant_f:=false; +variant_g:=false; variant_y:=false; +old_digits:=false; square_hebrew:=true; +ab_up_factor:=0; ab_down_factor:=0; +hmn_factor:=0; uy_factor:=0; + +input mbbxbold; +input mbbdrivr; diff --git a/fonts/mbboard/source/mbbxbold.mf b/fonts/mbboard/source/mbbxbold.mf new file mode 100644 index 0000000000..1efc4c0332 --- /dev/null +++ b/fonts/mbboard/source/mbbxbold.mf @@ -0,0 +1,70 @@ +% blackboard typefaces by Anthony Phan. +% file: mbbxbold.mf (parameters' file for all bold extended fonts) +% last modification: 25.10.2001. + +numeric gen_; gen_=0; +for $=17pt#,12pt#,10pt#,9pt#,8pt#,7pt#,6pt#,5pt#: + if designsize<$: gen_:=gen_+1; fi +endfor; + +vardef gen(expr unit)(text t)= + save a,b; a=0; for $=t: + if gen_>=a: b:=$; fi + a:=a+1; endfor; b*unit +enddef; + +dh#:=0.6designsize; +superness:=(12/256)[sqrt 0.5,1]; +superbowl:=(30/256)[sqrt 0.5,1]; +math_spread:=gen(1)(0.4,0.5,0.7,0.9,1.1,1.3,1.5); + +% +% Specific parameters +% + +thin1# :=1.50*gen(1/36pt#)(18,14,12,11.5,11,10.5,10,9.5); + +thick1# :=1.2*gen(1/36pt#)(43.5*(37.3/23),43.5*(27/23),43.5,0.8[30,43.5], + 0.6[30,43.5],0.4[30,43.5],0.2[30,43.5],0.0[30,43.5]); + +Thick1# :=1.2*gen(1/36pt#)(47.25*(37.3/23),43.5*(27/23),47.25,0.8[33.5,47.25], + 0.6[33.5,47.25],0.4[33.5,47.25],0.2[33.5,47.25],0.0[33.5,47.25]); + +thin2# :=1.50*gen(1/36pt#)(18,14,12,11.5,11,10.5,10,9.5); + +thick2# :=1.2*gen(1/36pt#)(44.75*(37.3/23),43.5*(27/23),44.75,0.8[31,44.75], + 0.6[31,44.75],0.4[31,44.75],0.2[31,44.75],0.0[31,44.75]); + +Thick2# :=1.2*gen(1/36pt#)(48.75*(37.3/23),43.5*(27/23),48.75,0.8[34.5,48.75], + 0.6[34.5,48.75],0.4[34.5,48.75],0.2[34.5,48.75],0.0[34.5,48.75]); + +ess# :=1.2*gen(1/36pt#)(45*(37.3/23),43.5*(27/23),45,0.8[31,45], + 0.6[31,45],0.4[31,45],0.2[31,45],0.0[31,45]); + +cap_ess# :=1.2*gen(1/36pt#)(49*(37.3/23),43.5*(27/23),49,0.8[35,49], + 0.6[35,49],0.4[35,49],0.8[35,49],0.2[35,49],0.0[35,49]); + +dot_size#:=1.10*gen(1/36pt#)(66*(37.3/23),43.5*(27/23),55,49.5, + 44,38.5,33,27.5); + +% +% Relative (to Computer Modern) parameters +% + +u#:=gen(1/36pt#)( 37.3, 27, 23, 21.3, 19.6, 17.9, 16.2, 14.5); +letter_fit#:=gen(1/36pt#)( -0.1, 0, 0, 0, 0, 1, 2, 3); + +body_height# :=gen(1/36pt#)(466, 324, 270, 243, 216, 189, 162, 135); +asc_height# :=gen(1/36pt#)(432, 300, 250, 225, 200, 175, 150, 125); +cap_height# :=gen(1/36pt#)(426.7,296.4,247,222.3,197.6,172.9, 148.2,123.5); +fig_height# :=gen(1/36pt#)(401, 278.4, 232, 208.8, 185.6, 162.4, 139.2, 116); +x_height# :=gen(1/36pt#)(267.5, 192, 160, 144, 128, 112, 96, 80); +math_axis# :=gen(1/36pt#)(155.5, 108, 90, 81, 72, 63, 54, 45); +desc_depth# :=gen(1/36pt#)(121, 84, 70, 63, 56, 49, 42, 35); +o# :=gen(1/36pt#)(10, 9, 8, 7, 6, 5, 4.5, 4); +ho# :=gen(1/36pt#)(10, 9, 8, 7, 6, 5, 4.5, 4); + +rule_thickness#:=gen(1pt#)(0.60,0.66,0.60,0.57,0.54,0.51,0.47,0.43); + +endinput; + |