only init once
authorClaus Gittinger <cg@exept.de>
Sat, 27 Jan 1996 19:33:23 +0100
changeset 170 7194ef17f5b8
parent 169 ba5dac089c64
child 171 ce00d8aab37c
only init once
PSPrStr.st
PostscriptPrinterStream.st
--- a/PSPrStr.st	Tue Jan 16 04:34:59 1996 +0100
+++ b/PSPrStr.st	Sat Jan 27 19:33:23 1996 +0100
@@ -13,7 +13,7 @@
 PrinterStream subclass:#PostscriptPrinterStream
 	 instanceVariableNames:'xPos yPos lineBuffer colNr lineNr fFamily fStyle'
 	 classVariableNames:'Prolog Trailer PageProlog PageTrailer FontHeight FontWidth LeftX
-                TopY LinesPerPage Italic Bold Normal Courier Times Helvetica'
+		TopY LinesPerPage Italic Bold Normal Courier Times Helvetica'
 	 poolDictionaries:''
 	 category:'Streams-External'
 !
@@ -48,7 +48,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Attic/PSPrStr.st,v 1.14 1995-11-23 01:51:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Attic/PSPrStr.st,v 1.15 1996-01-27 18:33:23 cg Exp $'
 ! !
 
 !PostscriptPrinterStream class methodsFor:'initialization'!
@@ -68,21 +68,22 @@
 initialize
     |tmpString t fontNr|
 
-    Normal := 0.
-    Bold := 1.
-    Italic := 2.
-
-    Courier := 0.
-    Times := 3.
-    Helvetica := 6.
+    Normal isNil ifTrue:[
+	Normal := 0.
+	Bold := 1.
+	Italic := 2.
 
-    LinesPerPage := 66.
-    FontHeight := 200.
-    FontWidth := 120.
-    LeftX := 900.
-    TopY := 14900.
+	Courier := 0.
+	Times := 3.
+	Helvetica := 6.
 
-    tmpString :=
+	LinesPerPage := 66.
+	FontHeight := 200.
+	FontWidth := 120.
+	LeftX := 900.
+	TopY := 14900.
+
+	tmpString :=
 '%!!PS-Adobe-1.0
 %%Creator: Smalltalk
 %%DocumentFonts: Courier-Oblique Courier-Bold Courier Times-Italic Times-Bold Times
@@ -127,31 +128,32 @@
 end
 StartSmalltalkDoc % end fixed prolog
 '.
-    fontNr := 8.
-    t := ''.
-    self fontNames do:[:aName |
-	t := t , (fontNr printString) , ' ' 
-	       , (FontHeight printString) , ' '
-	       , aName , (Character nl) asString.
-	fontNr := fontNr - 1
-    ].
-    tmpString := tmpString , t.
-    tmpString := tmpString , '9 SetUpFonts
+	fontNr := 8.
+	t := ''.
+	self fontNames do:[:aName |
+	    t := t , (fontNr printString) , ' ' 
+		   , (FontHeight printString) , ' '
+		   , aName , (Character nl) asString.
+	    fontNr := fontNr - 1
+	].
+	tmpString := tmpString , t.
+	tmpString := tmpString , '9 SetUpFonts
 '.
-    Prolog := tmpString.
+	Prolog := tmpString.
 
-    PageProlog :=
+	PageProlog :=
 'StartPage
 '.
 
-    PageTrailer :=
+	PageTrailer :=
 'EndPage
 '.
 
-    Trailer :=
+	Trailer :=
 'EndSmalltalkDoc
 SmalltalkJob restore
 '
+    ]
 ! !
 
 !PostscriptPrinterStream methodsFor:'access writing'!
--- a/PostscriptPrinterStream.st	Tue Jan 16 04:34:59 1996 +0100
+++ b/PostscriptPrinterStream.st	Sat Jan 27 19:33:23 1996 +0100
@@ -13,7 +13,7 @@
 PrinterStream subclass:#PostscriptPrinterStream
 	 instanceVariableNames:'xPos yPos lineBuffer colNr lineNr fFamily fStyle'
 	 classVariableNames:'Prolog Trailer PageProlog PageTrailer FontHeight FontWidth LeftX
-                TopY LinesPerPage Italic Bold Normal Courier Times Helvetica'
+		TopY LinesPerPage Italic Bold Normal Courier Times Helvetica'
 	 poolDictionaries:''
 	 category:'Streams-External'
 !
@@ -48,7 +48,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/PostscriptPrinterStream.st,v 1.14 1995-11-23 01:51:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/PostscriptPrinterStream.st,v 1.15 1996-01-27 18:33:23 cg Exp $'
 ! !
 
 !PostscriptPrinterStream class methodsFor:'initialization'!
@@ -68,21 +68,22 @@
 initialize
     |tmpString t fontNr|
 
-    Normal := 0.
-    Bold := 1.
-    Italic := 2.
-
-    Courier := 0.
-    Times := 3.
-    Helvetica := 6.
+    Normal isNil ifTrue:[
+	Normal := 0.
+	Bold := 1.
+	Italic := 2.
 
-    LinesPerPage := 66.
-    FontHeight := 200.
-    FontWidth := 120.
-    LeftX := 900.
-    TopY := 14900.
+	Courier := 0.
+	Times := 3.
+	Helvetica := 6.
 
-    tmpString :=
+	LinesPerPage := 66.
+	FontHeight := 200.
+	FontWidth := 120.
+	LeftX := 900.
+	TopY := 14900.
+
+	tmpString :=
 '%!!PS-Adobe-1.0
 %%Creator: Smalltalk
 %%DocumentFonts: Courier-Oblique Courier-Bold Courier Times-Italic Times-Bold Times
@@ -127,31 +128,32 @@
 end
 StartSmalltalkDoc % end fixed prolog
 '.
-    fontNr := 8.
-    t := ''.
-    self fontNames do:[:aName |
-	t := t , (fontNr printString) , ' ' 
-	       , (FontHeight printString) , ' '
-	       , aName , (Character nl) asString.
-	fontNr := fontNr - 1
-    ].
-    tmpString := tmpString , t.
-    tmpString := tmpString , '9 SetUpFonts
+	fontNr := 8.
+	t := ''.
+	self fontNames do:[:aName |
+	    t := t , (fontNr printString) , ' ' 
+		   , (FontHeight printString) , ' '
+		   , aName , (Character nl) asString.
+	    fontNr := fontNr - 1
+	].
+	tmpString := tmpString , t.
+	tmpString := tmpString , '9 SetUpFonts
 '.
-    Prolog := tmpString.
+	Prolog := tmpString.
 
-    PageProlog :=
+	PageProlog :=
 'StartPage
 '.
 
-    PageTrailer :=
+	PageTrailer :=
 'EndPage
 '.
 
-    Trailer :=
+	Trailer :=
 'EndSmalltalkDoc
 SmalltalkJob restore
 '
+    ]
 ! !
 
 !PostscriptPrinterStream methodsFor:'access writing'!