summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/circ/defcirc.mf
blob: 34c990935ac1b7ab067af5542bdff7f6d9b36e4e (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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
%%
%% This is file `defcirc.mf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% circ.dtx  (with options: `defcircmf')
%% CIRC is a LaTeX package to typeset circuit and optics diagrams.
%% Copyright (C) 1997,1998,2003  Sebastian Tannert and Andreas Tille
%% 
%%   This program is free software; you can redistribute it and/or modify
%%   it under the terms of the GNU General Public License as published by
%%   the Free Software Foundation; either version 2 of the License, or
%%   (at your option) any later version.
%% 
%%   This program is distributed in the hope that it will be useful,
%%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%%   GNU General Public License for more details.
%% 
%%   You should have received a copy of the GNU General Public License
%%   along with this program; if not, write to the Free Software
%%   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
%% 
%% For error reports concerning UNCHANGED versions of this file no
%% more than one year old, see CIRC.DVI after installation.
%% If installation fails search thru this file for 'bug'.
mode_setup;
font_coding_scheme:="CIRC symbols";

message("CIRC %<*"&font_identifier_&">");
message("CIRC \freecirc");
message("CIRC \addCIRCfont "&font_identifier_);
message("CIRC %</"&font_identifier_&">");
message("CIRC %<+doc> \optionline "&optionname);
message("CIRC %<*"&font_identifier_&",doc>");
message("");

def endCIRCfont =
  message("CIRC %</"&font_identifier_&",doc>");
  message("CIRC %<*"&font_identifier_&">");
  message("CIRC \protectcirc");
  message("CIRC %</"&font_identifier_&">");
  message("");
  bye;
enddef;

CIu#:=7pt#; define_whole_pixels(CIu);

current_char_code:=0;

pair shiftpoint;

linethickness#:= 0.45pt#;
thinline#     := 0.5linethickness#;
normalline#   := 1.0linethickness#;
thickline#    := 1.5linethickness#;
verythickline#:= 2.5linethickness#;
define_whole_blacker_pixels(normalline,thinline,thickline,verythickline);

fontdimen6: 1CIu#;

extra_endchar:=extra_endchar & "labels(range 0 thru 100);";

def {{ =
   begingroup
   save T; transform T;
   T:=currenttransform;
   save currenttransform;
   transform currenttransform;
   currenttransform:=T;
enddef;

def }} = endgroup; enddef;

def addTF(text t) = currenttransform:=currenttransform t; enddef;

def twopinchar(text name, lab, doc)(expr wd, ht, dp)(text body) =
  message("CIRC \cdef "&name&" "&lab&" \CIRC"&
          font_identifier_&" "&decimal(current_char_code));
  message("CIRC %<+doc> {"&doc&"}");
  message("");
  beginchar(current_char_code, wd, ht, dp);
    body;
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,dp,wd,ht);
    {{addTF(shifted -shiftpoint rotated -90); body;}}
  endchar;
  current_char_code:=current_char_code+1;
enddef;

def twopincharfour(text name, lab, pini, pinii, doc)
                  (expr wd, ht, dp)(text body) =
  message("CIRC \cdefiv "&name&" "&lab&" \CIRC"&
          font_identifier_&" "&decimal(current_char_code)&" "&
          pini&" "&pinii);
  message("CIRC %<+doc> {"&doc&"}");
  message("");
  beginchar(current_char_code,wd,ht,dp);
    body;
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,dp,wd,ht);
    {{addTF(rotated 90); body;}}
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,wd,dp,ht);
    {{addTF(shifted -shiftpoint rotated 180); body;}}
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,ht,wd,dp);
    {{addTF(shifted -shiftpoint rotated -90); body;}}
  endchar;
  current_char_code:=current_char_code+1;
enddef;

def twopincharfourfour(text name, lab, pini, pinii, doc)
                  (expr wd, ht, dp)(text body) =
  message("CIRC \cdefiviv "&name&" "&lab&" \CIRC"&
          font_identifier_&" "&decimal(current_char_code)&" "&
          pini&" "&pinii);
  message("CIRC %<+doc> {"&doc&"}");
  message("");
  beginchar(current_char_code,wd,ht,dp);
    body;
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,dp,wd,ht);
    {{addTF(rotated 90); body;}}
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,wd,dp,ht);
    {{addTF(shifted -shiftpoint rotated 180); body;}}
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,ht,wd,dp);
    {{addTF(shifted -shiftpoint rotated -90); body;}}
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,wd,dp,ht);
    {{addTF(reflectedabout(left,right)); body;}}
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,ht,wd,dp);
    {{addTF(reflectedabout(left,right) rotated 90); body;}}
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,wd,ht,dp);
    {{addTF(reflectedabout (left,right) shifted -shiftpoint rotated 180); body;}}
  endchar;
  current_char_code:=current_char_code+1;
  beginchar(current_char_code,dp,wd,ht);
    {{addTF(reflectedabout(left,right) shifted -shiftpoint rotated -90); body;}}
  endchar;
  current_char_code:=current_char_code+1;
enddef;
%% 
%%
%% End of file `defcirc.mf'.