summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/musixtex/xslhd.mf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/fonts/source/public/musixtex/xslhd.mf')
-rw-r--r--Master/texmf-dist/fonts/source/public/musixtex/xslhd.mf69
1 files changed, 69 insertions, 0 deletions
diff --git a/Master/texmf-dist/fonts/source/public/musixtex/xslhd.mf b/Master/texmf-dist/fonts/source/public/musixtex/xslhd.mf
new file mode 100644
index 00000000000..c20d3e84e96
--- /dev/null
+++ b/Master/texmf-dist/fonts/source/public/musixtex/xslhd.mf
@@ -0,0 +1,69 @@
+%=== xslhd.mf ============================================================
+% ick 96-08-24 modified to be "dashed" (each modification marked with WpH or ick ).
+% mods a la mods in xslhu.mf by WpH
+% ick 98-05-22 changed constants for gap, dash, pointendl, bluntendl
+%
+
+thick#:=1pt#;
+stepwidth#:=designsize/8;
+define_pixels(stepwidth);
+define_blacker_pixels(thick);
+picture save_pic;
+numheights:=16;
+numlengths:=8;%(12-96pt)
+gap:=thick; %was 1.5; WpH length of space between dashes. ick
+dash:=1.6thick; % 2.5; WpH length of each middle dash. ick
+pointendl:=-0.00dash; % -1.0; WpH length of first dash near point end.
+bluntendl:=-0.00thick; % -0.5; WpH length of last dash near blunt end.
+if unknown makedotted: makedotted:=0; fi % WpH
+path outerpath, innerpath;
+
+code=-1;
+for j=1 upto numlengths:
+ slength#:=j*12pt#;
+ define_pixels(slength);
+
+ for i=1 upto numheights:
+ beginchar(incr code, slength#, 0, 0);
+ x1=y1=0;x2=slength;y2= i*stepwidth;
+ end_angle:=min(2angle(z2-z1),90);
+ penpos1(thick,90);
+ penpos2(max(1,.15thick),min(2angle(z2-z1)+90,180));
+ outerpath:=z1r{dir(1)}..{dir(end_angle-1)}z2r; %ick
+ innerpath:=z2l{dir(end_angle-180)}..z1l{left}; %ick
+ fill outerpath--innerpath--cycle; %WpH created names for
+ % outer and inner paths.
+ %
+ % WpH start of added block to make gaps.
+ if makedotted<>1:
+ % variable makedotted has not been given a value.
+ % Dotted lines will not be made.
+ else:
+ cullit;
+ mw:=abs(x2,y2); %approximate length of curve.
+ tcount:=(mw-pointendl-bluntendl)/(gap+dash); % number of gaps.
+ tcount:=floor(tcount + .5); %round to nearest int number.
+ tinc:=((mw-pointendl-bluntendl)/tcount)/mw;
+ pickup pencircle scaled gap;
+ for k=0 upto tcount-1:
+ t:= (pointendl + .5gap)/mw + k*tinc;
+ undraw (point t of outerpath)..
+ (point (1-t) of innerpath); % for "90 degree" dash edges.
+% undraw ((point t of outerpath)+(0,1.5pt))..
+% ((point t of outerpath)-(0,1.5pt)); % for vertical edges.
+ endfor;
+ cullit;
+ fi
+ % WpH end of added block to make gaps.
+ %
+ save_pic:=currentpicture;
+ endchar;
+
+ beginchar(128+code, slength#, 0, 0);
+ currentpicture:=save_pic reflectedabout((.5slength,0),(.5slength, 1));
+ endchar;
+ endfor
+
+endfor
+end
+