forward queries to replacement font (if any)
authorClaus Gittinger <cg@exept.de>
Wed, 18 Jun 1997 12:15:59 +0200
changeset 1758 de2d623f1dba
parent 1757 193744c17992
child 1759 f4cd63a4d736
forward queries to replacement font (if any)
Font.st
--- a/Font.st	Tue Jun 17 18:11:03 1997 +0200
+++ b/Font.st	Wed Jun 18 12:15:59 1997 +0200
@@ -709,10 +709,13 @@
     device == aDevice ifTrue:[
         ^ descent
     ].
+    replacementFont notNil ifTrue:[
+        ^ replacementFont descentOn:aDevice
+    ].
     ^ (self on:aDevice) descent
 
     "Created: 30.4.1996 / 16:41:43 / cg"
-    "Modified: 30.4.1996 / 16:45:02 / cg"
+    "Modified: 18.6.1997 / 10:11:02 / cg"
 !
 
 existsOn:aDevice
@@ -732,10 +735,13 @@
     device == aDevice ifTrue:[
         ^ self heightOf:aString
     ].
+    replacementFont notNil ifTrue:[
+        ^ replacementFont heightOf:aString on:aDevice
+    ].
     ^ (self on:aDevice) heightOf:aString
 
     "Created: 30.4.1996 / 17:14:18 / cg"
-    "Modified: 12.5.1996 / 11:03:18 / cg"
+    "Modified: 18.6.1997 / 10:10:15 / cg"
 !
 
 heightOn:aDevice
@@ -744,10 +750,13 @@
     device == aDevice ifTrue:[
         ^ descent + ascent
     ].
+    replacementFont notNil ifTrue:[
+        ^ replacementFont heightOn:aDevice
+    ].
     ^ (self on:aDevice) height
 
     "Created: 30.4.1996 / 16:41:59 / cg"
-    "Modified: 30.4.1996 / 16:44:39 / cg"
+    "Modified: 18.6.1997 / 10:09:46 / cg"
 !
 
 widthOf:aString from:startIndex to:endIndex on:aDevice
@@ -758,10 +767,13 @@
     device == aDevice ifTrue:[
         ^ self widthOf:aString from:startIndex to:endIndex
     ].
+    replacementFont notNil ifTrue:[
+        ^ replacementFont widthOf:aString from:startIndex to:endIndex on:aDevice
+    ].
     ^ (self on:aDevice) widthOf:aString from:startIndex to:endIndex
 
-    "Modified: 30.4.1996 / 17:14:50 / cg"
     "Created: 30.4.1996 / 17:15:20 / cg"
+    "Modified: 18.6.1997 / 10:11:22 / cg"
 !
 
 widthOf:aString on:aDevice
@@ -772,10 +784,13 @@
     device == aDevice ifTrue:[
         ^ self widthOf:aString
     ].
+    replacementFont notNil ifTrue:[
+        ^ replacementFont widthOf:aString on:aDevice
+    ].
     ^ (self on:aDevice) widthOf:aString
 
     "Created: 30.4.1996 / 17:14:18 / cg"
-    "Modified: 30.4.1996 / 17:14:50 / cg"
+    "Modified: 18.6.1997 / 10:11:39 / cg"
 !
 
 widthOn:aDevice
@@ -786,10 +801,13 @@
     device == aDevice ifTrue:[
         ^ self width
     ].
+    replacementFont notNil ifTrue:[
+        ^ replacementFont widthOn:aDevice
+    ].
     ^ (self on:aDevice) width
 
     "Created: 30.4.1996 / 16:42:28 / cg"
-    "Modified: 30.5.1996 / 18:53:13 / cg"
+    "Modified: 18.6.1997 / 10:11:54 / cg"
 ! !
 
 !Font methodsFor:'queries-deviceFonts'!
@@ -1070,6 +1088,6 @@
 !Font class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.61 1997-04-19 16:09:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.62 1997-06-18 10:15:59 cg Exp $'
 ! !
 Font initialize!