summaryrefslogtreecommitdiff
path: root/fonts/wnri/acctmax.mf
blob: 3ff533b9bd3bf7f091130fbc670768f38fe7c9a9 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
%
% Washington Romanized Indic accent driver
%
% File       : acctmax.mf
% Author     : Thomas Ridgeway <ridgeway@u.washington.edu>
% Date       : May 19 1992
%
% Updated by : Anshuman Pandey <apandey@u.washington.edu>
% On         : 18 Feb 1998
%
% Copyright 1992 Humanities and Arts Computing Center, University of 
% Washington. Licensed to the public according to the terms of the 
% Free Software Foundation General Public License.
%
% WNRI is based on Computer Modern Roman and encoded according to
% the Classical Sanskrit/Classical Sanskrit eXtended character set. 
% See wnindic.map for more details.
%

transform At,Tf; At=Tf=identity;

numeric acctdiff; acctdiff = min(dot_size,1/3(asc_height-x_height));

def makeACCENT(suffix $) = 
transform Tf; Tf = identity shifted(-.5w,0);
if tracingspecs>0:
	message ">> savepicture ";
	show str $;
	show Tf;
	fi
picture $; $=currentpicture transformed Tf; 
enddef;

def savePicture(suffix $) = 
if tracingspecs>0:
	message ">> savepicture ";
	show str $;
	show Tf;
	fi
picture $; $=currentpicture transformed Tf; 
enddef;

% addpicture
def ap(suffix $) =
  if unknown At: transform At; At=identity; fi
  if tracingspecs>0:
	  message ">> addpicture "; 
	  show str $; 
	  show At;
	  fi
  addto currentpicture also $ transformed At;
enddef;

def whap(suffix $,$$,$$$) =
  if unknown At: transform At; At=identity; fi
  if tracingspecs>0:
	  message ">> addpicture "; 
	  show str $; 
	  show At;
	  fi
  if w > $$$: addto currentpicture also $ transformed At;
  else: addto currentpicture also $$ transformed At;
  fi
enddef;

numeric adhocht; adhocht=0;

% shall accented characters show the height and depth of the accent?
if unknown trueheights: boolean trueheights; trueheights=false; fi

%adjustacctht
def ah =
 if trueheights:
  if asc_height + (h - x_height) + adhocht > h: 
     h:=asc_height + (h - x_height)+ adhocht; charht:= h / vppp;
  fi
 fi
enddef;

%adjustacctdp
def ad =
 if trueheights:
  if d < desc_depth: d:=desc_depth; chardp:= d / vppp; fi
 fi
enddef;

def deepen =
 if trueheights:
  if d <  max(dot_size,cap_curve)+.25x_height: d:=dot_diam+.25x_height;
      chardp:=max(dot_size#,cap_curve#)+.25x_height#;
  fi
 fi
enddef;

% general accent height shift from x_height
numeric acht; 
acht:= if serifs: max(2/3[asc_height,x_height],x_height+o+hair)
       else: vround 2/3[asc_height,x_height]
       fi ;

% replaced by use of czd
%def slurped (expr accentpoint) =
%  identity shifted ((xpart accentpoint) + slant*(ypart accentpoint),aspect_ratio * (ypart accentpoint))
%enddef;

% end of file acctmax.mf