on -> onDevice
authorMichael Beyl <mb@exept.de>
Tue, 23 Jul 2002 19:22:33 +0200
changeset 3659 26bd2ef5f0ed
parent 3658 8932bb6311ef
child 3660 30c7ab561a68
on -> onDevice
BitmapFont.st
CompoundFont.st
--- a/BitmapFont.st	Thu Jul 18 14:40:59 2002 +0200
+++ b/BitmapFont.st	Tue Jul 23 19:22:33 2002 +0200
@@ -24,6 +24,8 @@
  SUCH DAMAGE.
 "
 
+"{ Package: 'stx:libview' }"
+
 FontDescription subclass:#BitmapFont
 	instanceVariableNames:'characterBitmaps ascent descent width'
 	classVariableNames:''
@@ -523,13 +525,6 @@
     ^ width
 !
 
-on:aDevice
-    "return a device representation of the receiver.
-     Since I am device independent, return the receiver."
-
-    ^ self
-!
-
 onDevice:aDevice
     "return a device representation of the receiver.
      Since I am device independent, return the receiver."
@@ -571,5 +566,5 @@
 !BitmapFont class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/BitmapFont.st,v 1.3 1999-03-30 17:41:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/BitmapFont.st,v 1.4 2002-07-23 17:22:30 mb Exp $'
 ! !
--- a/CompoundFont.st	Thu Jul 18 14:40:59 2002 +0200
+++ b/CompoundFont.st	Tue Jul 23 19:22:33 2002 +0200
@@ -25,6 +25,8 @@
 "
 
 
+"{ Package: 'stx:libview' }"
+
 FontDescription subclass:#CompoundFont
 	instanceVariableNames:'baseFont characterToFontMapping maxAscent maxDescent'
 	classVariableNames:''
@@ -102,9 +104,9 @@
                                                                         [exBegin]
     |font top list|
 
-    font := CompoundFont basedOn:(Font family:'courier' size:10).
+    font := CompoundFont basedOn:(Font family:'courier' size:18).
     #($a $e $i $o $u) do:[:char |
-        font glyphAt:char putFont:(Font family:'times' size:10).
+        font glyphAt:char putFont:(Font family:'times' size:18).
     ].
     top := ScrollableView forView:(list := EditTextView new).
     list font:font.
@@ -125,14 +127,12 @@
     baseFont := baseFont onDevice:Display.
     glyphs := Array new:256.
     euroGlyph := Form 
-                    width:(baseFont widthOf:'e') 
+                    width:12 
                     height:16 
                     fromArray:#( 
                                 2r00000000 2r00000000
                                 2r00000000 2r00000000
                                 2r00000000 2r00000000
-                                2r00000000 2r00000000
-                                2r00000000 2r00000000
                                 2r00000111 2r11000000
                                 2r00001000 2r00100000
                                 2r00010000 2r00000000
@@ -144,6 +144,8 @@
                                 2r00000111 2r11000000
                                 2r00000000 2r00000000
                                 2r00000000 2r00000000
+                                2r00000000 2r00000000
+                                2r00000000 2r00000000
                                ).
     glyphs at:($$ asciiValue+1) put:euroGlyph.
 
@@ -174,7 +176,8 @@
 baseFont
     "return the value of the instance variable 'baseFont' (automatically generated)"
 
-    ^ baseFont!
+    ^ baseFont
+!
 
 baseFont:something
     "set the value of the instance variable 'baseFont' (automatically generated)"
@@ -330,7 +333,7 @@
     ^ self descent
 !
 
-on:aDevice
+onDevice:aDevice
     "return a device representation of the receiver.
      Since I am device independent, return the receiver."
 
@@ -342,7 +345,6 @@
         newFonts at:char put:(font onDevice:aDevice)
     ].
     characterToFontMapping := newFonts
-
 !
 
 widthOf:aString from:index1 to:index2
@@ -361,5 +363,5 @@
 !CompoundFont class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/CompoundFont.st,v 1.2 1999-03-30 17:42:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/CompoundFont.st,v 1.3 2002-07-23 17:22:33 mb Exp $'
 ! !