summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/tram/tram.mf
blob: 54d9de875da7cf8deda8b872836f726abe1c35ab (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
%%
%% This is file `tram.mf',

%% 
%%   __________________________________
%%   Copyright © 2011–2013 Persian TeX Group
%% 
%%   License information appended.
%% 
%%


font_identifier:="tram";
mode_setup;
em#:=10pt#;
fctrs [1] = 0.25;
fctrs [2] = 0.30;
fctrs [3] = 0.35;
fctrs [4] = 0.40;
fctrs [5] = 0.45;
fctrs [6] = 0.50;
fctrs [7] = 0.60;
fctrs [8] = 0.75;
bwd = 0.1;
for i = 1 step 1 until 16:
    penwd [i] = bwd;
    bwd := bwd * 1.2;
endfor;
picture bpic,cpic;
boolean badpen;
ch:=0; cnt:=10;

for peni = 1 step 1 until 16:
  pen_x#:=penwd [peni] * pt#;
  for fctri = 1 step 1 until 8:
    wd#:=(1.5*1/(fctrs [fctri]))*pen_x#;
    define_pixels(pen_x, wd);
    badpen := false;
    if pen_x < 1.0 : pen_x := 1.0; badpen := true; fi
    cpic:=nullpicture;
    fw := 5pt# / wd#; fw := round (fw + 0.5); if fw < 1 : fw := 1; fi;
    fw := 2fw; % showvariable pen_x; showvariable fw; showvariable wd;
    beginchar(ch,fw*wd#,fw*wd#,0);
      x1:=0; x2:=x1; x3:=(1+.5wd); x4:=x3;
      y1:=.5wd; y2:=(y1+wd); y3:=(y1-.5wd); y4:=(y3+wd);
      if badpen or (wd < 2.99) :
         x1 := x2 := 0.wd; y1 := y2 := 0.5wd;
      fi;
      fill fullcircle scaled pen_x shifted(z1);
      fill fullcircle scaled pen_x shifted(z2);
      if not badpen or (wd > 3) :
        fill fullcircle scaled pen_x shifted(z3);
        fill fullcircle scaled pen_x shifted(z4);
      fi;
      bpic:=currentpicture;
      for i = 1 step 1 until fw - 1:
        currentpicture:=currentpicture + bpic shifted (i*wd, 0);
      endfor;
      bpic:=currentpicture;
      for i = 2 step 2 until fw - 1:
        currentpicture:=currentpicture + bpic shifted (0, i*wd);
      endfor;
    endchar;
    ch := ch + 1;
  endfor; %%%  fctri
endfor; %%%  peni
end;
%% 
%% Copyright © 2011–2013      by Persian TeX Group     <persian-tex@tug.org>
%% 
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%% 
%% This work is "maintained" (as per LPPL maintenance status)
%% by Persian TeX Group.
%% 
%% 
%% 
%% 
%%
%% End of file `tram.mf'.