--- a/HPLjetIIPrinterStream.st Fri Feb 02 17:24:31 1996 +0100
+++ b/HPLjetIIPrinterStream.st Fri Feb 02 20:53:52 1996 +0100
@@ -35,13 +35,24 @@
documentation
"
- This class defines protocol for simple text prinitng on an HP Laserjet 2
- (and compatible) printer. It knows the escape codes for bold, italic etc.
+ This class defines protocol for simple text prinitng on an HP Laserjet 2/3
+ (and compatible) printer.
+ It does not support multiple fonts, but knows how to print bold, italic etc.
+
+ Graphics printing is not supported - you need a postscriptprinter for this.
"
!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/HPLjetIIPrinterStream.st,v 1.11 1995-11-23 01:50:58 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/HPLjetIIPrinterStream.st,v 1.12 1996-02-02 19:53:48 cg Exp $'
+! !
+
+!HPLjetIIPrinterStream class methodsFor:'queries'!
+
+printerTypeName
+ "return a descriptive name"
+
+ ^ 'hp laserjet III compatible printer'
! !
!HPLjetIIPrinterStream methodsFor:'access writing'!
@@ -49,17 +60,16 @@
bold
"switch to bold font-face"
- super nextPut:(Character esc).
- super nextPutAll:'(s0S'.
- super nextPut:(Character esc).
- super nextPutAll:'(s3B'
+ "send <ESC>(s0S<ESC>(s3B"
+
+ super escapeAll:'(s0S'.
+ super escapeAll:'(s3B'
!
courier
"switch to courier font"
- super nextPut:(Character esc).
- super nextPutAll:'(s3T'
+ super escapeAll:'(s3T'
!
cr
@@ -73,32 +83,25 @@
helvetica
"switch to helvetica font"
- super nextPut:(Character esc).
- super nextPutAll:'(s4T'
+ super escapeAll:'(s4T'
!
italic
"switch to italic/oblique font-face"
- super nextPut:(Character esc).
- super nextPutAll:'(s1S'.
- super nextPut:(Character esc).
- super nextPutAll:'(s0B'
+ super escapeAll:'(s1S'.
+ super escapeAll:'(s0B'
!
normal
"switch to normal/roman font-face"
- super nextPut:(Character esc).
- super nextPutAll:'(s0S'.
- super nextPut:(Character esc).
- super nextPutAll:'(s0B'
+ super escapeAll:'(s0S'.
+ super escapeAll:'(s0B'
!
times
"switch to times font"
- super nextPut:(Character esc).
- super nextPutAll:'(s5T'
+ super escapeAll:'(s5T'
! !
-