Debian Codegraph @

texmf-dist/fonts/source/public/circ/defcirc.mf

raw
1 %%
2 %% This is file `defcirc.mf',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% circ.dtx (with options: `defcircmf')
8 %% CIRC is a LaTeX package to typeset circuit and optics diagrams.
9 %% Copyright (C) 1997,1998,2003 Sebastian Tannert and Andreas Tille
10 %%
11 %% This program is free software; you can redistribute it and/or modify
12 %% it under the terms of the GNU General Public License as published by
13 %% the Free Software Foundation; either version 2 of the License, or
14 %% (at your option) any later version.
15 %%
16 %% This program is distributed in the hope that it will be useful,
17 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
18 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 %% GNU General Public License for more details.
20 %%
21 %% You should have received a copy of the GNU General Public License
22 %% along with this program; if not, write to the Free Software
23 %% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 %%
25 %% For error reports concerning UNCHANGED versions of this file no
26 %% more than one year old, see CIRC.DVI after installation.
27 %% If installation fails search thru this file for 'bug'.
28 mode_setup;
29 font_coding_scheme:="CIRC symbols";
30
31 message("CIRC %<*"&font_identifier_&">");
32 message("CIRC \freecirc");
33 message("CIRC \addCIRCfont "&font_identifier_);
34 message("CIRC %</"&font_identifier_&">");
35 message("CIRC %<+doc> \optionline "&optionname);
36 message("CIRC %<*"&font_identifier_&",doc>");
37 message("");
38
39 inner bye;
40 def endCIRCfont =
41 message("CIRC %</"&font_identifier_&",doc>");
42 message("CIRC %<*"&font_identifier_&">");
43 message("CIRC \protectcirc");
44 message("CIRC %</"&font_identifier_&">");
45 message("");
46 bye;
47 enddef;
48
49 CIu#:=7pt#; define_whole_pixels(CIu);
50
51 current_char_code:=0;
52
53 pair shiftpoint;
54
55 linethickness#:= 0.45pt#;
56 thinline# := 0.5linethickness#;
57 normalline# := 1.0linethickness#;
58 thickline# := 1.5linethickness#;
59 verythickline#:= 2.5linethickness#;
60 define_whole_blacker_pixels(normalline,thinline,thickline,verythickline);
61
62 fontdimen6: 1CIu#;
63
64 extra_endchar:=extra_endchar & "labels(range 0 thru 100);";
65
66 def {{ =
67 begingroup
68 save T; transform T;
69 T:=currenttransform;
70 save currenttransform;
71 transform currenttransform;
72 currenttransform:=T;
73 enddef;
74
75 def }} = endgroup; enddef;
76
77 def addTF(text t) = currenttransform:=currenttransform t; enddef;
78
79 def twopinchar(text name, lab, doc)(expr wd, ht, dp)(text body) =
80 message("CIRC \cdef "&name&" "&lab&" \CIRC"&
81 font_identifier_&" "&decimal(current_char_code));
82 message("CIRC %<+doc> {"&doc&"}");
83 message("");
84 beginchar(current_char_code, wd, ht, dp);
85 body;
86 endchar;
87 current_char_code:=current_char_code+1;
88 beginchar(current_char_code,dp,wd,ht);
89 {{addTF(shifted -shiftpoint rotated -90); body;}}
90 endchar;
91 current_char_code:=current_char_code+1;
92 enddef;
93
94 def twopincharfour(text name, lab, pini, pinii, doc)
95 (expr wd, ht, dp)(text body) =
96 message("CIRC \cdefiv "&name&" "&lab&" \CIRC"&
97 font_identifier_&" "&decimal(current_char_code)&" "&
98 pini&" "&pinii);
99 message("CIRC %<+doc> {"&doc&"}");
100 message("");
101 beginchar(current_char_code,wd,ht,dp);
102 body;
103 endchar;
104 current_char_code:=current_char_code+1;
105 beginchar(current_char_code,dp,wd,ht);
106 {{addTF(rotated 90); body;}}
107 endchar;
108 current_char_code:=current_char_code+1;
109 beginchar(current_char_code,wd,dp,ht);
110 {{addTF(shifted -shiftpoint rotated 180); body;}}
111 endchar;
112 current_char_code:=current_char_code+1;
113 beginchar(current_char_code,ht,wd,dp);
114 {{addTF(shifted -shiftpoint rotated -90); body;}}
115 endchar;
116 current_char_code:=current_char_code+1;
117 enddef;
118
119 def twopincharfourfour(text name, lab, pini, pinii, doc)
120 (expr wd, ht, dp)(text body) =
121 message("CIRC \cdefiviv "&name&" "&lab&" \CIRC"&
122 font_identifier_&" "&decimal(current_char_code)&" "&
123 pini&" "&pinii);
124 message("CIRC %<+doc> {"&doc&"}");
125 message("");
126 beginchar(current_char_code,wd,ht,dp);
127 body;
128 endchar;
129 current_char_code:=current_char_code+1;
130 beginchar(current_char_code,dp,wd,ht);
131 {{addTF(rotated 90); body;}}
132 endchar;
133 current_char_code:=current_char_code+1;
134 beginchar(current_char_code,wd,dp,ht);
135 {{addTF(shifted -shiftpoint rotated 180); body;}}
136 endchar;
137 current_char_code:=current_char_code+1;
138 beginchar(current_char_code,ht,wd,dp);
139 {{addTF(shifted -shiftpoint rotated -90); body;}}
140 endchar;
141 current_char_code:=current_char_code+1;
142 beginchar(current_char_code,wd,dp,ht);
143 {{addTF(reflectedabout(left,right)); body;}}
144 endchar;
145 current_char_code:=current_char_code+1;
146 beginchar(current_char_code,ht,wd,dp);
147 {{addTF(reflectedabout(left,right) rotated 90); body;}}
148 endchar;
149 current_char_code:=current_char_code+1;
150 beginchar(current_char_code,wd,ht,dp);
151 {{addTF(reflectedabout (left,right) shifted -shiftpoint rotated 180); body;}}
152 endchar;
153 current_char_code:=current_char_code+1;
154 beginchar(current_char_code,dp,wd,ht);
155 {{addTF(reflectedabout(left,right) shifted -shiftpoint rotated -90); body;}}
156 endchar;
157 current_char_code:=current_char_code+1;
158 enddef;
159 %%
160 %%
161 %% End of file `defcirc.mf'.