it works !
authorMichael Beyl <mb@exept.de>
Wed, 24 Jul 2002 20:48:36 +0200
changeset 3673 49e583135bf2
parent 3672 d627bfa7b9a2
child 3674 2d18a78198af
it works !
BitmapFont.st
CompoundFont.st
--- a/BitmapFont.st	Wed Jul 24 20:04:46 2002 +0200
+++ b/BitmapFont.st	Wed Jul 24 20:48:36 2002 +0200
@@ -398,7 +398,7 @@
 
     glyph := characterBitmaps at:(ascii + 1) ifAbsent:nil.
     glyph isNil ifTrue:[^ self].
-    aGC displayForm:glyph x:x y:y-glyph height+1+descent opaque:opaque
+    aGC displayForm:glyph x:x y:y-glyph height+descent opaque:opaque
 ! !
 
 !BitmapFont methodsFor:'private - queries'!
@@ -572,5 +572,5 @@
 !BitmapFont class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/BitmapFont.st,v 1.7 2002-07-24 18:04:46 mb Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/BitmapFont.st,v 1.8 2002-07-24 18:48:36 mb Exp $'
 ! !
--- a/CompoundFont.st	Wed Jul 24 20:04:46 2002 +0200
+++ b/CompoundFont.st	Wed Jul 24 20:48:36 2002 +0200
@@ -210,8 +210,7 @@
     ].
 
     characterToFontMapping at:char put:aFont.
-    maxAscent := maxDescent := nil.
-
+    maxAscent := maxDescent := maxHeight := nil.
 !
 
 graphicsDevice
@@ -239,16 +238,16 @@
 
             wString := font widthOf:aString from:i1 to:i2.
             opaque ifTrue:[
-                (font maxAscent < maxAscent 
-                or:[font maxDescent < maxDescent]) 
-                ifTrue:[       
+"/                (font ascent < maxAscent 
+"/                or:[font descent < maxDescent]) 
+"/                ifTrue:[       
                     aGC 
                         fillRectangleX:x 
-                        y:y-maxAscent+1      
+                        y:y-maxAscent      
                         width:wString 
                         height:maxAscent+maxDescent 
                         color:aGC backgroundPaint.
-                ].
+"/                ].
             ].
             font displayString:s from:i1 to:i2 x:x y:y in:aGC opaque:opaque.
             x := x + wString.
@@ -401,5 +400,5 @@
 !CompoundFont class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/CompoundFont.st,v 1.7 2002-07-24 18:04:33 mb Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/CompoundFont.st,v 1.8 2002-07-24 18:48:27 mb Exp $'
 ! !