summaryrefslogtreecommitdiff
path: root/fonts/fdsymbol/source/fdaccents.mf
blob: 037ffb6a03bfa1a78789b9ec887d041896338da0 (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
%
% Copyright (c) 2012, Michael Ummels <michael.ummels@rwth-aachen.de>
%
% This Font Software is licensed under the SIL Open Font License,
% Version 1.1. This license is in the accompanying file OFL.txt, and
% is also available with a FAQ at: http://scripts.sil.org/OFL
%

for scale = 1, 1.8, 2.6, 3.4, 4.2, 5:
  beginsymbol(scale * 7u#, x_height# + 2rule_thickness# + 1/2equal_spread# + line_thickness#, 0); "wide hat";
    thick := line_thickness;

    y2 = h - 1/2thick;
    x2 = w/2;
    x1 = w - x3 = 0;
    y1 = y3 = y2 - 1/2equal_spread;

    theta := angle(z2 - z1);

    penpos2(6/5thick, 90);
    penpos1(thick, theta + 90);
    penpos3(thick, 90 - theta);

    fill stroke z1e -- z2e -- z3e;
  endchar;
endfor;

charlist current_char - 5: current_char - 4: current_char - 3: current_char - 2: current_char - 1: current_char;

for scale = 1, 1.8, 2.6, 3.4, 4.2, 5:
  beginsymbol(scale * 7u#, x_height# + 2rule_thickness# + 1/2equal_spread# + line_thickness#, 0); "wide tilde";
    draw_sim(a, (0, 1/2[x_height + 2rule_thickness, h]), (w, 1/2[x_height + 2rule_thickness, h]), 1/4equal_spread, line_thickness);
  endchar;
endfor;

charlist current_char - 5: current_char - 4: current_char - 3: current_char - 2: current_char - 1: current_char;

for scale = 1, 1.8, 2.6, 3.4, 4.2, 5:
  beginsymbol(scale * 7u#, x_height# + 2rule_thickness# + 1/2equal_spread# + line_thickness#, 0); "wide paren";
    draw_smile(a, -1, (0, 1/2[x_height + 2rule_thickness, h]), (w, 1/2[x_height + 2rule_thickness, h]), 1/2equal_spread, line_thickness, true);
  endchar;
endfor;

charlist current_char - 5: current_char - 4: current_char - 3: current_char - 2: current_char - 1: current_char;

beginsymbol(6u# + side_bearing#, x_height# + 2rule_thickness# + 5/2line_thickness#, 0); "vec";
  thick := 3/4line_thickness;

  x0 = side_bearing;
  x1 = w - 1/2thick;
  y0 = y1 = h - 5/4line_thickness;

  draw_straight(z0, z1, thick, false);
  draw_arrowhead(z1, 0, 5/2line_thickness, thick);
endchar;

beginsymbol(5u#, (-1)[x_height#, asc_height#], 0); "middle bar";
  penpos0(5/6line_thickness, 85);
  penpos1(5/6line_thickness, 85);

  x0 = w - x1 = 0;
  y0 = y1 = h;

  fill stroke z0e -- z1e;
endchar;

beginsymbol(5u#, (-1)[x_height#, asc_height#], 0); "middle slash";
  penpos0(line_thickness, 85);
  penpos1(line_thickness, 85);

  x0 = w - x1 = 0;
  1/2[y0,y1] = h;
  y1 - y0 = 2line_thickness;

  fill stroke z0e -- z1e;
endchar;

beginsymbol(5u# + 2side_bearing#, 3/2asc_height#, 0); "stroke through";
  theta := 70;

  penpos1(line_thickness, theta - 90);
  penpos2(line_thickness, theta - 90);

  z0 = (w/2,1/6asc_height);
  z1 = z0 + 3/4asc_height / cosd (90 - theta) * dir theta;
  z2 = z0 - 3/4asc_height / cosd (90 - theta) * dir theta;

  fill stroke z1e -- z2e;
endchar;