Font.st
changeset 564 3ddccbec4ee7
parent 456 3ab60f26b5a1
child 578 69373a884165
--- a/Font.st	Sat Apr 13 21:01:31 1996 +0200
+++ b/Font.st	Sat Apr 13 21:16:20 1996 +0200
@@ -56,21 +56,21 @@
     units) can only be done if the font being asked is associated to
     a device (which should be clear, since a 'courier-roman-12' font may
     have a different number of pixels on a 75dpi vs. a 120dpi display. And
-    a total number of device units on a 600dpi laser printer.
+    a totally different number of device units on a 600dpi laser printer.
     Thus, to query a font for its height (or ascent, or descent, or width),
     use something like:
 
-	myFont := Font family:'courier' ... size:12.
-	    ...
+        myFont := Font family:'courier' ... size:12.
+            ...
         
-	'want to know its height on the Display'
+        'want to know its height on the Display'
         
-	h := (myFont on:Display) height.
+        h := (myFont on:Display) height.
 
         
-	'want to know its height on a printer'
+        'want to know its height on a printer'
         
-	h := (myFont on:aPrinter) height.
+        h := (myFont on:aPrinter) height.
         
     Keep in mind, that each device is free to think in whatever units it
     likes - a display may return units of pixels, a postscript printer may
@@ -79,8 +79,16 @@
     printer devices are being developped and may or may not be in the current
     system.
 
-    Sometimes, a font cannot be represented on a device, then a replacement
+    If a font cannot be represented on a device, a replacement
     font is chosen and kept in the replacementFont instance variable. 
+    This is done to preserve the original font information, in case the image
+    is restarted later on another display which has that font available.
+
+
+    All device fonts are registered in a Lobby object (a registry) and
+    the underlying device resources are freed, when the ST font object is
+    garbage collected.
+
 
     Instance variables:
 
@@ -97,12 +105,12 @@
       ascent          <Integer>       the fonts ascent in device units on device
       descent         <Integer>       the fonts descent in device units on device
       width           <Integer>       the character width in device units on device
-				      (for variable fonts, its the width of a space)
+                                      (for variable fonts, its the width of a space)
       isFixedWidth    <Boolean>       true if font is a fixed width font
       minWidth        <Integer>       width of the smallest-width character in
-				      in device units on device
+                                      in device units on device
       maxWidth        <Integer>       width of the largest-width character in
-				      in device units on device
+                                      in device units on device
 
     class variables:
 
@@ -833,6 +841,6 @@
 !Font class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.36 1996-02-24 21:50:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.37 1996-04-13 19:16:20 cg Exp $'
 ! !
 Font initialize!