summaryrefslogtreecommitdiff
path: root/fonts/pandora/punctr.mf
blob: 5a5bb6279bdbd76fa8d401dcc7ea224ebad89057 (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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
%*****************************************************************************
%        Copyright (c) 1989 by N. N. Billawala
%*****************************************************************************


% punctr.mf  punctuation: for roman text set

% 8 characters


iff OK "x":  "Cross for Polish l and L";   %******* 1 ACCENT WIDTH  x 20 degrees
  beginchar(oct"040",accent_w*width#+b_mono#,ascender#,0); 
  
  save_num(theta)=max(0,20-.5oblique);                       % angle of the bar
  save_num(thickness)=.5[accent_thin_end,accent_thick_end]*1/cosd theta;
  min_limit(join_radius)(.5thickness);
  bot lft z1l=(0,.4h)//; multpos(1,2)(thickness,90+ if bold:theta else:0 fi);
  rt x2l=lft x1l+w;  z2l=z1l+(whatever,0) rotated theta;
  z0=.5[z1l,z2l]; 
  
  p1=(z0 soften(z2l,z2r,z1r,z1l) z0)--cycle;
 
  showpoints(0,1,2);

draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); 
show_character; endchar;

% Theta here is the angle of the bar




iff OK "'":  "Right quotes or closing quotes"; 
  beginchar(oct"042",accent_w*width#+b_mono#,cap#,0);
  save_num(head)=accent_dot_diameter;
  top z1=(.5head,.75[xheight,cap]-.5head)//;
  top z2=(w-.5head,y1)//;
  ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0);
  ref2=comma(z2,head,min(.6xheight,1.5pt),accent_thin_end,0); 
  p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique);
  p2=ref2 rotatedaround (z2,if prime:prime_angle fi -oblique);
  showpoints(1,2);
adjust(v_a*fitbasis.lc#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); 
show_character; endchar;



iff OK "-":  "Hyphen";
  beginchar(oct"055",.33width#+b_mono#,cap#,0); 
  pickup mathpen;
  lft z1=(0,math_axis)//;
  rt z2=lft z1+(w,0);
  draw z1--z2;
adjust(v_f*fitbasis.uc#+m_a*b_mfit#,v_f*fitbasis.uc#+m_a*b_mfit#); 
show_character; endchar;

% use different mathpen for softness
% character position, but not shape slants with obliqueness
% must make sure that the plus/minus have the same widths


% rotation and slant of position with obliqueness
iff OK "`":  "Left quotes or open quotes"; 
  beginchar(oct"134",accent_w*width#+b_mono#,cap#,0);
  save_num(head)=accent_dot_diameter;
  top z1=(.5head,.75[xheight,cap]-.5head-min(.6xheight,2pt))//;
  top z2=(w-.5head,y1)//;
  ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0);
  ref2=comma(z2,head,min(.6xheight,1.5pt),accent_thin_end,0);  
  p1=ref1 rotatedaround (z1,180 if prime:prime_angle fi -oblique);
  p2=ref2 rotatedaround (z2,180 if prime:prime_angle fi -oblique);
  showpoints(1,2);
adjust(v_a*fitbasis.lc#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); 
show_character; endchar;

% rotation and slant of position with obliqueness



iff OK "x":  "Dot accent"; 
  beginchar(oct"137",accent_w*width#+b_mono#,
    accent_height#+xheight#+2/3accent_depth#,0); 
  bot z1=(.5w,h-accent_dot_diameter)//;
  p1=dot.b(z1,accent_dot_diameter);
  showpoints(1);

draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); 
show_character; endchar;

% no slant of shape with obliqueness


iff OK "-":  "En-Dash";
  beginchar(oct"173",.5width#+.5mono#,cap#,0); 
  pickup dashpen;
  lft z1=(0,math_axis)//;
  rt z2=lft z1+(w,0);
  draw z1--z2;
adjust(.25mono#,.25mono#); 
show_character; endchar;

% use different dashpen for softness
% character position, but not shape slants with obliqueness
% must make sure that the plus/minus have the same widths


iff OK "-":  "Em-Dash";
  beginchar(oct"174",width#+mono#,cap#,0); 
  pickup dashpen;
  lft z1=(0,math_axis)//;
  rt z2=lft z1+(w,0);
  draw z1--z2;
adjust(0,0); 
show_character; endchar;

% use different dashpen for softness
% character position, but not shape slants with obliqueness
% must make sure that the plus/minus have the same widths
       


iff OK "x":  "Long Hungarian umlaut accent";   
  beginchar(oct"175",.8accent_w*width#+b_mono#,
    accent_height#+xheight#+accent_depth#,0); 

  top rt z1=(round(.45w),h)//;  
  bot lft z2=(0,h-max(1,accent_depth))//;
  top rt z3=(w,h)//;  
  bot lft z4=(round(.55w),h-max(1,accent_depth))//;
  p1=prime_accent(z1,z2,accent_thick_end,accent_thin_end);
  p2=prime_accent(z3,z4,accent_thick_end,accent_thin_end);
  showpoints(1,2,3,4);

draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); 
show_character; endchar;