1%(c) 1990,91 by Joel M. Hoffman 2 3%hcaption. Modernized Fancy Classical Hebrew font. Version 0.9. 4%calls the file base. 5%last update: 5/15/91 by JMH 6% modified for use with ArabTeX: 5/25/96 Klaus Lagally 7% renamed "hcbase_pc" to "hcbase": 1999/04/10 KL 8 9%This calls the file ``hcbase_pc'' to create a slanted, elongated Hebrew font 10%for use in captions. See that file for more information. 11 12%Use of this material in a commercial venture of any sort requires 13%permission from me. Otherwise, you are free to use this for any 14%legal, non-destructive purpose. If you find this font useful, a 15%contribution to charity will be most appreciated. 16% 17%Send comments or complaints to: 18% 19%BITNET: hoffman@nyuacf.BITNET <-- this will change soon 20%CompuServe: 72700,402 -or- 72700.402@compuserve.com 21%SNAIL: Joel M. Hoffman 22% 19 Hillcrest Lane 23% Rye, NY 10580 24% U.S.A. 25 26if unknown mode: 27mode:=localfont; fi 28mode_setup; 29currenttransform:= currenttransform slanted 1/5; 30 31 32 33%I used large units, and then later scaled the font down to size. -JMH 34%u#:=1/100in#; %ten units to a square. 35u#:=1/384.16in#; %but account for magnification.(1/384.16) 36%u#:=1/295.16in#; %but account for magnification and hp vs. epson 37 38let_height#:=42u#; %height of a standard letter. 39asc_height#:=40u#; %ascender height (for lamed). 40desc_height#:=30u#; %descender height(depth?). 41 42let_width#:=31u#; %width of a standard letter. (31u#) 43 44serif_height#:=5u#; %height of a standard serif.(2.5u#) 45serif_width#:=2.5u#; %width of a standard serif. (2.5u#) 46chupchiklength#:=6u#; 47 48vowel_width#:=14u#; %width of vowels under the letters. 49vowel_height#:=12u#; %How tall the vowels are. 50vowel_depth#:=8u#; %the space between the baseline and the vowels. 51 52let_fit#:=3u#; %space to left and right of letter (.5u#) 53vowel_fit#:=1.4u#; %space to the left and right of vowel(1.4u#); 54 55thick#:=10u#; %thickness of thick lines. (7.5u#) 56thin#:=3u#; %thickness of thin lines. (2u#) 57hairline#:=.5u#; %VERY thin lines (.3u#) 58vowel_stroke#:=4u#; %pen to use 59dot#:=4u#; %diameter of dots (dagesh, vowels, etc) 60squaredot#:=10u#; 61 62overshoot#:=4u#; %overshoot for bet, taf. 63 64tightness:=.68; %tightness for right_curve; (.78) 65 66baseline_tilt:=45; %degrees for the tilt in baseline lines. 67 68head_tilt#:=.7u#; %tilt for the head on the zion, etc. 69 70sss:=.7; %Shrink the serif's width by this amount on a shin. 71 %(s)hrink (s)hin's (s)erif 72 73define_pixels(let_height,asc_height,desc_height,let_width,head_tilt); 74define_pixels(vowel_height,vowel_width,vowel_depth,vowel_height); 75define_pixels(squaredot); 76define_whole_pixels(let_fit,vowel_fit); 77define_pixels(serif_height,serif_width,chupchiklength); 78define_pixels(overshoot); 79define_whole_blacker_pixels(thick,thin,dot,hairline,vowel_stroke); 80 81def serifpen = pickup pencircle xscaled thin yscaled thick; enddef; 82%def serifpen = pickup pencircle xscaled hairline yscaled thick; enddef; 83def vowelpen = pickup pensquare scaled vowel_stroke; enddef; 84 85 86%this is from the METAFONT book: 87shrink_fit:=1+hround(2let_fit#*hppp)-2let_fit; 88 89def normal_adjust_fit(expr left_adjustment,right_adjustment) = 90 l:=-hround(left_adjustment*hppp)-let_fit; 91 interim xoffset:=-l; 92 charwd:=charwd+2let_fit#+left_adjustment+right_adjustment; 93 r:=l+hround(charwd*hppp)-shrink_fit; 94 w:=r-hround(right_adjustment*hppp)-let_fit; 95 enddef; 96let af=normal_adjust_fit; 97def negate_af = af(-let_fit#,-let_fit#); enddef; 98def vowel_af = af(-let_fit#+vowel_fit#,-let_fit#+vowel_fit#); enddef; 99extra_endchar := extra_endchar&"r:=r+shrink_fit;w:=r-l;"; 100 101 102 103 104def top_serif (suffix i,j) = %draw a serif at point z.i, using z.j 105 serifpen; 106 x.j = x.i-serif_width; y.j = y.i + serif_height; 107 draw (x.i+serif_width,y.i) ... z.i .. z.j; 108enddef; 109 110def bottom_serif (suffix i,j) = %draw an inverse serif at point z.i, with z.j 111 serifpen; 112 x.j = x.i+serif_width;y.j=y.i-serif_height; 113 draw (x.i-serif_width,y.i) ... z.i .. z.j; 114enddef; 115 116def roundoff_bottom (suffix i) = %round off point z.i, assuming thin lines. 117 fill fullcircle scaled thin shifted z.i; 118enddef; 119 120def right_curve(suffix i,j,k,l) = %call general_right_curve 121general_right_curve(tightness,tightness,thick,thick,thin,thin,i,j,k,l); 122enddef; 123 124def left_curve(suffix i,j,k,l) = %call general_left_curve 125general_left_curve(tightness,tightness,thick,thick,thin,thin,i,j,k,l); 126enddef; 127 128 129def general_right_curve (expr ta,tb,sa,sb,sc,sd) (suffix i,j,k,l) = 130 y.j=y.i;x.j=ta*(x.l-x.i)+x.i; 131 x.k=x.l;y.k=tb*(y.i-y.l)+y.l; 132 penpos i (sa,90); 133 penpos j (sb,90); 134 penpos k (sc,0); 135 penpos l (sd,0); 136 penstroke z.l.e{up} ... {up}z.k.e ... z.j.e{left} ...{left} z.i.e; 137enddef; 138 139def general_left_curve (expr ta,tb,sa,sb,sc,sd) (suffix i,j,k,l) = 140 y.j=y.i;x.j=ta*(x.l-x.i)+x.i; 141 x.k=x.l;y.k=tb*(y.i-y.l)+y.l; 142 penpos i (sa,-90); 143 penpos j (sb,-90); 144 penpos k (sc,0); 145 penpos l (sd,0); 146 penstroke z.i.e{right}...{right}z.j.e...z.k.e{up}...{up}z.l.e; 147enddef; 148 149 150 151def any_curve (expr adjust,thick,thin) (suffix i,j,k,l,m) = 152 %draw from i to m via k, using j and l, using specified values for 153 % withds. 154 z.j=(tightness/adjust)[z.i,z.k]; 155 z.l=(tightness/adjust)[z.m,z.k]; 156 penpos i (thick,angle(z.k-z.i)+90); 157 penpos j (thick,angle(z.k-z.i)+90); 158 penpos l (thin,angle(z.m-z.k)+90); 159 penpos m (thin,angle(z.m-z.k)+90); 160 penstroke z.i.e{z.k-z.i} 161 ... {z.k-z.i}z.j.e 162 ... z.l.e{z.m-z.k} 163 ... {z.m-z.k}z.m.e; 164enddef; 165 166def baseline (expr a,b) = %draw a baseline 167 pickup penrazor scaled thick rotated baseline_tilt; 168 draw a --- b; 169enddef; 170baselinewidth:= thick*sind(baseline_tilt);%but should be thick/sind.... 171 172def thickpen = pickup pencircle scaled thick; enddef; 173def thinpen = pickup pencircle scaled thin; enddef; 174def hairlinepen = pickup pencircle scaled hairline; enddef; 175def baselinepen = pickup penrazor scaled thick rotated baseline_tilt; enddef; 176def dotpen = pickup pencircle scaled dot; enddef; 177def squarepen = pickup penrazor scaled squaredot rotated 45; enddef; 178 179def dotat (expr z) = %put at dot at z 180fill fullcircle scaled dot shifted z; 181enddef; 182 183def chupchik(suffix i,j)(expr ang) = %draw a chupchik from z at angle ang 184thinpen; 185z.i=z.j+dir(ang)*chupchiklength; 186draw z.i--z.j; 187enddef; 188 189def mycutoff(expr a,b) = %cutoff with culling 190cullit; 191cutoff(a,b); 192cullit; 193enddef; 194 195%input hcbase_pc; % KL 25.05.96 196input hcbase; % 1999/04/10 KL 197 198end; % KL 03.11.96 199 200