# HG changeset patch # User Claus Gittinger # Date 822767603 -3600 # Node ID 7194ef17f5b846080ce4b28963520ace48e1eb60 # Parent ba5dac089c640bb44971f563526500b7619aef98 only init once diff -r ba5dac089c64 -r 7194ef17f5b8 PSPrStr.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'! diff -r ba5dac089c64 -r 7194ef17f5b8 PostscriptPrinterStream.st --- 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'!