File:  [NeXTSTEP 3.3 examples] / Examples / PostScript / Fractions.eps
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:49:00 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

%!PS-Adobe-2.0
%%Title: Blue Book Program 8, on page 161
%%Creator: Adobe Systems Incorporated 
%%CreationDate: Thu Dec 28 13:30:57 PST 1989
%%BoundingBox: 0 0 592 750
%%DocumentFonts: Times-Roman
%%EndComments

/fractiondict 5 dict def
/fractionshow
	{ fractiondict begin
	  /denominator exch def
	  /numerator exch def
	  
	  /regularfont currentfont def
	  /fractionfont currentfont [.65 0 0 .6 0 0] 
	    makefont def
	  
	  gsave
	    newpath
	    0 0 moveto
	    (1) true charpath
	    flattenpath pathbbox
	    /height exch def pop pop pop
	  grestore
	  
	  0 .4 height mul rmoveto
	  
	  fractionfont setfont numerator show
	  0 .4 height mul neg rmoveto
	  regularfont setfont (\244) show
	  
	  fractionfont setfont denominator show
	  regularfont setfont
	  end
	} def

/Times-Roman findfont 300 scalefont setfont
100 72 moveto
(7) (8) fractionshow

/Times-Roman findfont 18 scalefont setfont
72 550 moveto
(Slowly stir in 5) show
(1) (2) fractionshow
( lbs. of chocolate and then blend on high.) show

/Times-Roman findfont 40 scalefont setfont
420 650 moveto
(13) (22) fractionshow
100 450 moveto
(3) (4) fractionshow

showpage
	    

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.