File:  [NeXTSTEP 3.3 examples] / Examples / PostScript / Outlines.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 16, on page 203
%%Creator: Adobe Systems Incorporated 
%%CreationDate: Fri Dec 29 12:39:20 PST 1989
%%Pages: 0 1
%%BoundingBox: 0 0 240 110
%%DocumentFonts: Helvetica-Bold
%%EndComments

/makeoutlinedict 7 dict def
/MakeOutlineFont
  { makeoutlinedict begin
    /uniqueid exch def
	/strokewidth exch def
	/newfontname exch def
	/basefontname exch def

	/basefontdict basefontname findfont def
	
	/numentries basefontdict maxlength 1 add def
	
	basefontdict /UniqueID known not
	  { /numentries numentries 1 add def } if
	  
	/outfontdict numentries dict def

	basefontdict
	  { exch dup /FID ne
		  { exch outfontdict 3 1 roll put }
		  { pop pop }
		  ifelse
		} forall
		
	outfontdict /FontName newfontname put
	outfontdict /PaintType 2 put
	outfontdict /StrokeWidth strokewidth put
	outfontdict /UniqueID uniqueid put
	
	newfontname outfontdict definefont pop
	end
  } def

/Helvetica-Bold /Helvetica-Outline1 1000 54 div 

  /Helvetica-Bold findfont dup /UniqueID known
    { /UniqueID get 1 add }
    { pop 1 }
    ifelse
  MakeOutlineFont

/Helvetica-Outline1 findfont 36 scalefont setfont 
  5 65 moveto (NeXT) show

/Helvetica-Outline1 findfont 54 scalefont setfont 
  (NeXT) show
  
/Helvetica-Bold /Helvetica-Outline2 1000 36 div 

  /Helvetica-Bold findfont dup /UniqueID known
    { /UniqueID get 2 add }
    { pop 1 }
    ifelse
  MakeOutlineFont

/Helvetica-Outline2 findfont 36 scalefont setfont 
  5 5 moveto (NeXT) show
  
/Helvetica-Outline2 findfont 54 scalefont setfont 
  (NeXT) show
showpage

unix.superglobalmegacorp.com

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