Font.st
changeset 5174 1bc656582c8b
parent 5170 4646aa850bf2
child 5186 adffd6f387e7
--- a/Font.st	Tue Feb 17 21:15:04 2009 +0100
+++ b/Font.st	Wed Feb 18 00:20:29 2009 +0100
@@ -270,6 +270,7 @@
     Display notNil ifTrue:[
         Display deviceFonts do:[:aFont |
             (newFont sameDeviceFontAs:aFont) ifTrue:[
+self assert:(aFont encoding = newFont encoding).
                 ^ aFont
             ]
         ]
@@ -350,10 +351,15 @@
     "if I am already assigned to that device ..."
     (device == aDevice) ifTrue:[^ self].
 
-    aDevice isNil ifTrue:[^ self].
+    aDevice isNil ifTrue:[
+        device notNil ifTrue:[
+            ^ self
+        ]
+    ].
 
     aDevice deviceFonts do:[:aFont |
         (self sameDeviceFontAs:aFont) ifTrue:[
+self assert:aFont encoding = encoding.
             ^ aFont
         ].
     ].
@@ -390,6 +396,7 @@
         aDevice registerFont:newFont.
         ^ newFont
     ].
+self assert:newFont encoding = encoding.
 
     ^ newFont
 
@@ -1199,7 +1206,7 @@
 !Font class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.109 2009-02-17 18:16:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.110 2009-02-17 23:20:29 cg Exp $'
 ! !
 
 Font initialize!