Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/fonts/source/public/xypic/xyline10.mf

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


% $Id: xyline10.mf,v 3.3 1996/12/19 03:31:56 krisrose Exp $ -*-tex-*-
%
% XYLINE10: line segments for XY mode at 10 point.
% Copyright (c) 1991,1992  Kristoffer H. Rose  <[email protected]>
%
% 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: Line segments going either segl# down or to the right.  Codes
% range from 0 to 127, distributed evenly in each of the
% intervals between the `purely' horizontal/
% vertical/diagonal characters with code 31,	    ..../
% 63, 95, and 127 (code -1 would be  pure as	    :  /:
% well if it existed):				    : /	:
%                                                   :/	:
%      	..../  ..../   |   o   o....  o....  o----  o...:
%       :  /:  :  /:   |   |   :\  :  :\  :
%       : / :  : / :   |   |   : \ :  : \ :
%       :/  :  :/  :   |   |   :  \:  :  \:
%       o...:  o...:   o   |   :...\  :...\
%
% Code: [-1]     0    30  31     63     64     95     127
%
font_identifier "XYLINE"; font_size 10pt#;
font_coding_scheme:="XY line segments";
mode_setup;

% METANESS...
%
segl# = 1/2 designsize; define_pixels(segl);	% line segment length
rulew# = .4pt#; define_whole_blacker_pixels(rulew); % line thickness
%
% drawsegment draws a line from (0,0) to the argument point...
def drawsegment expr endpoint =
 z0 = (0,0); z1 = endpoint;
 pickup pencircle scaled rulew rotated (angle (z1-z0) - 90);
 draw z0--z1; penlabels(0,1) 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,300) enddef;

% FONT.
%
% Font dimension 8 is the rule thickness (cf. The TeXbook, app.G)
fontdimen 8: rulew#;
%
% The characters follow...
%
for cc = 0 step 1 until 30:
 beginchar(cc,(31-cc)/32*segl#,segl#,0); drawsegment (w,h); endchar;
endfor;
%
for cc = 31 step 1 until 63:
 beginchar(cc,(cc-31)/32*segl#,0,segl#); drawsegment (w,-d); endchar;
endfor;
%
for cc = 64 step 1 until 94:
 beginchar(cc,segl#,0,(95-cc)/32*segl#); drawsegment (w,-d); endchar;
endfor;
%
for cc = 95 step 1 until 126:
 beginchar(cc,segl#,(cc-95)/32*segl#,0); drawsegment (w,h); endchar;
endfor;
%
beginchar(127,segl#,segl#,0); drawsegment (w,h); endchar;

bye.
%
% $Log: xyline10.mf,v $
% Revision 3.3  1996/12/19 03:31:56  krisrose
% Maintenance release
%
% Revision 3.0  1995/07/07 20:14:21  kris
% Major release w/new User's Guide!
%
% Revision 2.1  1992/01/02  14:54:07  kris
% Release version.
%
% Revision 1.7  1991/12/17  04:51:16  kris
% Version distributed with `final draft' on Usenet.
%
% Revision 1.6  1991/11/27  06:54:21  kris
% \beta-test on DIKU.
%
% Revision 1.5  1991/10/21  23:19:08  kris
% Version described in DIKU student report 91-7-10.
%
% Revision 1.4  1991/07/28  22:16:18  kris
% Inverted char0..30 to avoid negative widths.
%
% Revision 1.3  1991/07/26  01:22:28  kris
% Set bounding box completely!
%
% Revision 1.2  91/06/09  21:59:49  kris
% separated METANESS and CHARACTERS
%
% Revision 1.1  91/06/06  22:52:31  kris
% furst succesful attempt

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].