summaryrefslogtreecommitdiff
path: root/macros/mtex/metafont/musicdef.mf
blob: fbbef58249a77af5dffaff9912871845fdf2ece3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
% this is musicdef.mf
%
%
% hier evtl. mode fuer gewuenschten output setzen
%
%  AGFA P400 mode: for devices that print 406 pixels per inch
%  mode_def agfa  =
%   proofing:=0;
%   fontmaking:=1;
%   tracingtitles:=0;
%   pixels_per_inch:=406;
%   blacker:=0.65;
%   fillin:=0;
%   o_correction:=1;
%   enddef;
%  localfont:=agfa;
%  mode:=agfa;
%
% low resolution music fonts are not very nice - but you need something...
  mode_def atari  =
   proofing:=0;
   fontmaking:=1;
   tracingtitles:=0;
   pixels_per_inch:=96;
   blacker:=1.0;
   fillin:=0;
   o_correction:=1;
   enddef;
  localfont:=atari;
  mode:=atari;
  mode_setup;
%
%
%mode_def ibm =    % ibm mode: for the IBM3820
% proofing:=0;      % no, we're not making proofs
% fontmaking:=1;      % yes, we are making a font
% tracingtitles:=0;    % no, don't show titles in the log
% pixels_per_inch:=240;
% blacker:=.78;      % (this value is conjectural)
% fillin:=0.25;      % (ditto)
% o_correction:=.5;    % (ditto)
% enddef;
%
fontmaking:=1;
turningcheck:=0;
displaying:=1;
designsize:=16;
nhh#:=1/4designsize; %noteheadheight
nhw#:=1.2nhh#; %noteheadwidth
beamht#:=0.6nhh#; %Balkenst"arke
nhh:=nhh#*pt; %noteheadheight *pt
nhw:=nhw#*pt; %noteheadwidth  *pt
thinwidth := 0.1pt;
beamht := beamht#*pt;
s := 10thinwidth;
S := 1/16designsize;
%pair constants
pair ne,se,sw,nw; %northeast,southeast,southwest,northwest
ne = up+right; se = down+right; sw = down+left; nw = up+left;
openit;
def clear =
  numeric x[],y[],x[]l,y[]l,x[]r,y[]r,dx[],dy[];
  pair    sh[];
enddef;
%
pickup pencircle scaled (0.1pt);
def penstrike text t =
 forsuffixes e = l,r: path_.e:=t; endfor
 if cycle path_.l: cyclestroke_
 else: filldraw path_.l -- reverse path_.r -- cycle fi enddef;
%