summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/xypic/xyqc10.mf
blob: f1dc3c79a492ee26e89a8b2c398f1f3d2db5d672 (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
% $Id: xyqc10.mf,v 3.0 1995/07/07 20:14:21 kris Exp $ -*-tex-*-
%
% XYQC10: quarter circles for XY mode at 10 point.
% Copyright (c) 1992  Kristoffer H. Rose  <kris@diku.dk>
%
% This file is part of the XY-pic macro package.
%
% The XY-pic macro package 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.
%
% The XY-pic macro package 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 macro package; if not, write to the Free Software Foundation, Inc.,
% 675 Mass Ave, Cambridge, MA 02139, USA.
%
% CONTENTS: Quarter circles in all directions:
%
%			            -.
%                            |   )   |  /\
%	    o    o    o    o-'  o    o    o  .-o    o
%	   (     |_    \/                    |     (
%
% Code:   [-1]   15   31   47   65   79   95  111  127
%
% Each character has a cosinoid bounding box :-) with wd = cos I = sin F,
% where I,F are the angles from direction --> to the initial,final direction.
%
font_identifier "XYQC"; font_size 10pt#;
font_coding_scheme:="XY quarter circles";
mode_setup;

% METANESS...
%
qcd# = 1/2 designsize;	% quarter circle diameter
rulew# = .4pt#;		% quarter circle line width
define_pixels(qcd,rulew);
%
% beginqc draws the quarter circle starting in the direction towards endpoint
% and turning left...
def beginqc(expr cc,ex,ey) =
 alpha := angle (ex,ey);
 cw := sqrt(1/2) * abs(sind(alpha + 135));
 beginchar(cc,cw*qcd#,0,0);
 pickup pencircle scaled rulew rotated (alpha - 90);
 if (cc<64): draw quartercircle shifted (-.5,0) rotated (alpha - 90)
	scaled qcd
 else: draw quartercircle shifted (-.5,0) rotated (alpha - 90) shifted (cw,0)
	scaled qcd
 fi
enddef;

% TESTING...we redefine openit because the characters extend far to the
% left of the bounding box!
%
def openit = openwindow currentwindow
 from origin to (screen_cols,screen_rows) at (-200,200) enddef;

% FONT.
%
% Font dimension 8 is the rule thickness (cf. The TeXbook, app.G).
fontdimen 8: rulew#;
%
% Here are the characters...
%
for cc = 0 step 1 until 31:
 beginqc(cc,cc-15,-16); endchar;
endfor;
%
for cc = 32 step 1 until 63:
 beginqc(cc,16,cc-47); endchar;
endfor;
%
for cc = 64 step 1 until 95:
 beginqc(cc,79-cc,16); endchar;
endfor;
%
for cc = 96 step 1 until 127:
 beginqc(cc,-16,111-cc); endchar;
endfor;

bye.
%
% $Log: xyqc10.mf,v $
% Revision 3.0  1995/07/07 20:14:21  kris
% Major release w/new User's Guide!
%
% Revision 2.6  1992/06/24  01:23:34  kris
% Implemented and used for hooks.