summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/mdsymbol/mdaccents.mf
blob: 872bb12609a659177535f827d09fb8b282e8b664 (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
%
% Copyright (c) 2011, Sebastian Schubert <schubert.seb@googlemail.com>
%
% 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:
  beginaccent(scale * 7u#, 1/2equal_spread# + accent_thickness#); "wide hat";

    y2r = h;
    x2r = w/2;
    x1r = w - x3r = 0;
    y1r = y3r = y2r - 1/2equal_spread;

    theta := angle(z2r - z1r);

    penpos2(1.1thick/cosd(theta), 90);
    penpos1(thick, theta + 90);
    penpos3(thick, 90 - theta);

    fill stroke z1e -- z2e -- z3e;
    penlabels(1,2,3);
  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:
  beginaccent(scale * 7u#, 1/2equal_spread# + accent_thickness#); "wide tilde";
    draw_sim(a, (0, 1/2[accent_height, h]), (w, 1/2[accent_height, h]), 1/4equal_spread, thick);
  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:
  beginaccent(scale * 7u#, 1/2equal_spread# + accent_thickness#); "wide paren";
    draw_smile(a, -1, (0, 1/2[accent_height, h]), (w, 1/2[accent_height, h]), 1/2equal_spread, thick, true);
  endchar;
endfor;

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

beginaccent(6u# + side_bearing#, 3u# + 1/2accent_thickness#); "vec";

  x0 = side_bearing;
  x1 = w - 1/2thick;
  y0 = y1 = h - 1/2(1/2(x1-x0) + thick);

  draw_straight(z0, z1, thick, false);
  draw_arrowhead(z1, 0, 1/2(x1-x0), thick);
  labels(0,1);
endchar;

beginsymbol(5u#, (-1)[x_height#, asc_height#], 0); "middle bar";
  penpos0(accent_thickness, 90);
  penpos1(accent_thickness, 90);

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

  fill stroke z0e -- z1e;
  penlabels(0,1)
endchar;

beginsymbol(5u#, (-1)[x_height#, asc_height#], 0); "middle slash";
  x0 = w - x1 = 0;
  1/2[y0,y1] = h;
  y1 - y0 = 2line_thickness;

  penpos0(accent_thickness/cosd(angle(z1-z0)), 90);
  penpos1(accent_thickness/cosd(angle(z1-z0)), 90);

  fill stroke z0e -- z1e;
  penlabels(0,1)
endchar;

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

  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;

  draw_line_cut_linethick(1,2)(4/5line_thickness);
endchar;