summaryrefslogtreecommitdiff
path: root/fonts/ifsym/ifwea.gen
blob: f6c76a6fe2326781495a92f8e4860f7fe1325968 (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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
%%%%%%%%%%%%%%%%%% ifwea.gen %%%%%%%%%%%%%%%%%%%%%%%
% (c) Ingo Kloeckl
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or any later version.

% History
% 20.12.1999 v1.0  IK 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% weather symbols
% by I.Kloeckl, ingo.kloeckl@2k-software.de

pen normalpen;
normalpen := pencircle scaled .75linewidth;

%
% centers of wind symbol
%
"BlueSky";
beginchar(0,4pt#,4pt#,0);
  pickup normalpen;
  draw fullcircle scaled 4pt shifted (2pt,2pt);
endchar;

"BlueSky3/4";
beginchar(1,4pt#,4pt#,0);
  pickup normalpen;
  draw fullcircle scaled 4pt shifted (2pt,2pt);
  fill quartercircle scaled 4pt shifted(2pt,2pt)--(2pt,2pt)--cycle;
endchar;

"BlueSky2/4";
beginchar(2,4pt#,4pt#,0);
  pickup normalpen;
  draw fullcircle scaled 4pt shifted (2pt,2pt);
  fill halfcircle scaled 4pt shifted (2pt,2pt)--(2pt,2pt)--cycle;
endchar;

"BlueSky1/4";
beginchar(3,4pt#,4pt#,0);
  pickup normalpen;
  draw fullcircle scaled 4pt shifted (2pt,2pt);
  fill halfcircle scaled 4pt rotated 180 shifted(2pt,2pt)--(2pt,2pt)--cycle;
  fill quartercircle scaled 4pt rotated -90 shifted(2pt,2pt)--(2pt,2pt)--cycle;
endchar;

"CloudySky";
beginchar(4,4pt#,4pt#,0);
  pickup normalpen;
  fill fullcircle scaled 4pt shifted (2pt,2pt);
endchar;

%
%  nice thermometers
%
def Thermo(expr n, height) =
  beginchar((char n),3pt#,10pt#,0); 
  pickup pencircle scaled .5linewidth;
  fill fullcircle scaled 3pt shifted (1.5pt,1.5pt);

  pickup pencircle scaled .2linewidth;
  draw (0.5pt,2pt)--(0.5pt,9pt)..(1.5pt,10pt)..(2.5pt,9pt)--(2.5pt,2pt)--cycle;
  draw (1.5pt,2pt)--(1.5pt,9pt);
  path p; p := (1pt,1pt)--(2pt,1pt);
  for i=2 upto 8:
    draw p shifted(0, i*1pt);
  endfor;

  fill (1.2pt,2pt)--(1.2pt,height*1pt)--(1.8pt,height*1pt)--(1.8pt,2pt)--cycle;
endchar;
enddef;

"Thermoa";      Thermo(5,3);
"Thermob";      Thermo(6,4);
"Thermoc";      Thermo(7,5);
"Thermod";      Thermo(8,6);
"Thermoe";      Thermo(9,7);
"Thermof";      Thermo(10,8);
"Thermog";      Thermo(11,9);

%
%  popular weather symbols
%
"Sun";
beginchar(16,10pt#,10pt#,0);
  pickup normalpen;
  draw fullcircle scaled 5pt shifted (5pt,5pt);
  path p;
  p=(7.5pt,5pt)--(10pt,5pt);
  for i=0 upto 7:
    draw p rotatedaround ((5pt,5pt),(i*45));
  endfor;
endchar;

"Halfsun";
beginchar(17,10pt#,10pt#,0);
  pickup normalpen;
  draw fullcircle scaled 5pt shifted (5pt,5pt);
  fill halfcircle--cycle scaled 5pt rotated (180) shifted (5pt,5pt);
  path p;
  p=(7.5pt,5pt)--(10pt,5pt);
  for i=0 upto 4:
    draw p rotatedaround ((5pt,5pt),(i*45));
  endfor;
endchar;

"Nosun";
beginchar(18,10pt#,10pt#,0);
  pickup normalpen;
  fill fullcircle scaled 7pt shifted (5pt,5pt);
endchar;

"Fog";
beginchar(19,10pt#,10pt#,0);
pickup pencircle scaled 0.5linewidth;
  for i=.1h step .1h until .9h: 
    for j=0 step .3w until .7w:
      draw (j,i)--(j+.2w,i);
    endfor
  endfor
endchar;


"ThinFog";
beginchar(20,10pt#,10pt#,0);
pickup pencircle scaled .25linewidth;
  for i=.1h step .1h until .9h: 
    for j=0 step .3w until .7w:
      draw (j,i)--(j+.2w,i);
    endfor
  endfor
endchar;

"Rain";
beginchar(21,10pt#,10pt#,0);
pickup normalpen;
for i=1 step 2 until 7:
  draw (i*1pt,1pt)--((i+2)*1pt,4pt); draw((i+1)*1pt,5pt)--((i+3)*1pt,8pt);
endfor;
endchar;

"WeakRain";
beginchar(22,10pt#,10pt#,0);
pickup pencircle scaled .5linewidth;
for i:=1 step 2 until 7:
  draw (i*1pt,1pt)--((i+1)*1pt,2pt); 
  draw((i+1)*1pt,4pt)--((i+2)*1pt,5pt);
  draw((i+2)*1pt,7pt)--((i+3)*1pt,8pt);
endfor;
endchar;

"Hagel";
beginchar(23,10pt#,10pt#,0);
pickup pencircle scaled 4linewidth;
drawdot(3pt,3pt); drawdot(1pt,8pt); drawdot(6pt,7pt);
drawdot(1pt,1pt); drawdot(8pt,2pt); drawdot(3pt,6pt);
drawdot(7pt,3pt); drawdot(3pt,8pt); drawdot(6pt,1pt);
endchar;

"Graupel";
beginchar(24,10pt#,10pt#,0);
pickup pencircle scaled 2linewidth;
drawdot(3pt,3pt); drawdot(1pt,8pt); drawdot(6pt,7pt);
drawdot(1pt,1pt); drawdot(8pt,2pt); drawdot(3pt,6pt);
drawdot(7pt,3pt); drawdot(3pt,8pt); drawdot(6pt,1pt);
endchar;

"Snow";
beginchar(25,10pt#,10pt#,0);
  pickup normalpen;
  path p[];
  p1 = (0,0)--(4pt,0);
  p2 = (4pt,-1pt)--(3pt,0)--(4pt,1pt);
  for i:=0 upto 5:
    draw p1 rotated (i*60) shifted(5pt,5pt);
    draw p2 shifted(-2pt,0) rotated (i*60) shifted(5pt,5pt);
    draw p2 shifted(-1pt,0) rotated (i*60) shifted(5pt,5pt);
    draw p2 rotated (i*60) shifted(5pt,5pt);
  endfor;
endchar;

"Blitz";
beginchar(26,10pt#,10pt#,0);
  pickup normalpen;
  fill (6.4pt,10pt)--(8.7pt,8.4pt)--(5.6pt,4.1pt)--(4.4pt,4.9pt)--(2.4pt,2.1pt)--
       (3.9pt,1.6pt)--(0,0)--(1.1pt,4pt)--(1.6pt,2.4pt)--(3.5pt,8.5pt)--
       (5pt,6pt)--cycle;
endchar;

path cloud;
cloud = (5.0pt,0.0pt){left}..{up}(0.0pt,3.2pt){up}..{right}(2.1pt,5.7pt){right}..
	{dir -60}(4.0pt,4.2pt){dir 40}..{dir -40}(5.5pt,4.1pt){dir -40}..
	{dir -80}(6.1pt,2.4pt){dir 60}..{right}(7.8pt,3.3pt){right}..
	{down}(9.3pt,2.0pt){down}..{left}cycle;

"Cloud";
beginchar(27,10pt#,6pt#,0);
  pickup normalpen;
  draw cloud;
endchar;

"RainCloud";
beginchar(28,10pt#,10pt#,0);
  pickup normalpen;
  draw cloud shifted(0, 4pt);
  for i=0 step 3 until 6:
    draw (i*1pt,1pt)--((i+1)*1pt,4pt);
    draw ((i+1)*1pt,0)--((i+2)*1pt,3pt);
  endfor;
endchar;

"WeakRainCloud";
beginchar(29,10pt#,6pt#,0);
  pickup normalpen;
  draw cloud shifted(0, 4pt);
  for i=0 step 3 until 6:
    draw (i*1pt,1pt)--((i+1)*1pt,4pt);
  endfor;
endchar;

"SunCloud";
beginchar(30,10pt#,10pt#,0);
  pickup normalpen;
  draw fullcircle scaled 4pt shifted (6pt,5pt);
  path p;
  p=(8pt,5pt)--(10pt,5pt);
  for i=0 upto 7:
    draw p rotatedaround ((6pt,5pt),(i*45));
  endfor;
  unfill cloud; draw cloud;
endchar;

"SnowCloud";
beginchar(31,10pt#,10pt#,0);
  pickup normalpen;
  draw cloud shifted(0, 4pt);
  pickup pencircle scaled 2linewidth;
  drawdot(3pt,3pt); drawdot(6pt,2pt); drawdot(2pt,3pt);
  drawdot(1pt,0); drawdot(8pt,1pt); drawdot(9pt,3pt);
  drawdot(7pt,3pt); drawdot(4pt,0); drawdot(5pt,2pt);
endchar;

"FilledCloud";
beginchar(32,10pt#,6pt#,0);
  pickup normalpen;
  fill cloud;
endchar;

"FilledRainCloud";
beginchar(33,10pt#,10pt#,0);
  pickup normalpen;
  fill cloud shifted(0, 4pt);
  for i=0 step 3 until 6:
    draw (i*1pt,1pt)--((i+1)*1pt,4pt);
    draw ((i+1)*1pt,0)--((i+2)*1pt,3pt);
  endfor;
endchar;

"FilledWeakRainCloud";
beginchar(34,10pt#,6pt#,0);
  pickup normalpen;
  fill cloud shifted(0, 4pt);
  for i=0 step 3 until 6:
    draw (i*1pt,1pt)--((i+1)*1pt,4pt);
  endfor;
endchar;

"FilledSunCloud";
beginchar(35,10pt#,10pt#,0);
  pickup normalpen;
  draw fullcircle scaled 4pt shifted (6pt,5pt);
  path p;
  p=(8pt,5pt)--(10pt,5pt);
  for i=0 upto 7:
    draw p rotatedaround ((6pt,5pt),(i*45));
  endfor;
  fill cloud;
endchar;

"FilledSnowCloud";
beginchar(36,10pt#,10pt#,0);
  pickup normalpen;
  fill cloud shifted(0, 4pt);
  pickup pencircle scaled 2linewidth;
  drawdot(3pt,3pt); drawdot(6pt,2pt); drawdot(2pt,3pt);
  drawdot(1pt,0); drawdot(8pt,1pt); drawdot(9pt,3pt);
  drawdot(7pt,3pt); drawdot(4pt,0); drawdot(5pt,2pt);
endchar;

%HalfWeakRainCloud 165
%CloudBlitz 166

def wind(expr n, strength) =
  beginchar((char n),0pt#,11pt#,0); 
  pickup normalpen;
  draw (0,4pt)--(0,10pt);
  for k=0 upto strength/2:
    draw (0,(10-k)*1pt)--(-2pt,(11-k)*1pt);
  endfor
  if (strength mod 2 = 1):
    draw (0,(9.5-strength/2)*1pt)--(-1pt,(10-strength/2)*1pt);
  fi
endchar;
enddef;

for j=0 step 1 until 10:
  wind(48+j,j);
endfor;

end.
%%%%%%%%%%%%%%%%%% end of ifwea.gen %%%%%%%%%%%%%%%%%%%%%%%