--- a/Font.st Wed Feb 03 01:41:43 1999 +0100
+++ b/Font.st Wed Feb 03 16:16:55 1999 +0100
@@ -18,6 +18,13 @@
category:'Graphics-Support'
!
+Object subclass:#DeviceFontHandle
+ instanceVariableNames:'device fontId'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:Font
+!
+
!Font class methodsFor:'documentation'!
copyright
@@ -513,28 +520,18 @@
!Font methodsFor:'instance release'!
-disposed
- "some Font has been collected - tell it to the x-server"
-
- |id|
-
- (id := fontId) notNil ifTrue:[
- fontId := nil.
- device releaseFont:id.
- ]
-!
-
shallowCopyForFinalization
"redefined to return a lightweight copy
- all we need is the device handle"
|aCopy|
- aCopy := self class basicNew.
+ aCopy := DeviceFontHandle basicNew.
aCopy setDevice:device fontId:fontId.
^ aCopy
- "Modified: 20.4.1996 / 23:23:04 / cg"
+ "Modified: / 20.4.1996 / 23:23:04 / cg"
+ "Modified: / 3.2.1999 / 16:13:10 / stefan"
! !
!Font methodsFor:'printing & storing'!
@@ -1090,9 +1087,53 @@
^ self height
! !
+!Font::DeviceFontHandle class methodsFor:'documentation'!
+
+documentation
+"
+ This is used as a finalization handle for fonts.
+
+ [author:]
+ Stefan Vogel (stefan@nilpferd)
+
+ [see also:]
+ Font
+
+ [instance variables:]
+
+ [class variables:]
+"
+! !
+
+!Font::DeviceFontHandle methodsFor:'accessing'!
+
+setDevice:aDevice fontId:anId
+ "set the handles contents"
+
+ device := aDevice.
+ fontId := anId.
+
+ "Created: / 3.2.1999 / 16:08:31 / stefan"
+! !
+
+!Font::DeviceFontHandle methodsFor:'finalization'!
+
+disposed
+ "some Font has been collected - tell it to the x-server"
+
+ |id|
+
+ (id := fontId) notNil ifTrue:[
+ fontId := nil.
+ device releaseFont:id.
+ ]
+
+ "Created: / 3.2.1999 / 16:09:25 / stefan"
+! !
+
!Font class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.64 1998-09-10 10:55:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.65 1999-02-03 15:16:55 stefan Exp $'
! !
Font initialize!