--- a/TextView.st Thu Apr 25 15:12:24 2013 +0200
+++ b/TextView.st Fri Apr 26 11:46:46 2013 +0200
@@ -2571,20 +2571,25 @@
line separation. This is required, to allow for proper handling of
national characters, such as A-dieresis ..."
- |italicFont boldFont|
+ |italicFont boldFont fA iA bA|
font := font onDevice:device.
italicFont := font asItalic onDevice:device.
boldFont := font asBold onDevice:device.
includesNonStrings == true ifTrue:[
- "/ for now, we do not support variable height entries ...
- fontHeight := list first heightOn:self
+ "/ for now, we do not support variable height entries ...
+ fontHeight := list first heightOn:self
] ifFalse:[
- fontHeight := font maxHeight max:(italicFont maxHeight max:(boldFont maxHeight)).
+ fontHeight := font maxHeight max:(italicFont maxHeight max:(boldFont maxHeight)).
+ "/ fontHeight := font height "maxHeight" max:(italicFont height "maxHeight" max:(boldFont height "maxHeight")).
].
fontHeight := fontHeight + lineSpacing.
- fontAscent := font maxAscent max:(italicFont maxAscent max:(boldFont maxAscent)).
+ "/ fontAscent := font ascent "maxAscent" max:(italicFont ascent "maxAscent" max:(boldFont ascent "maxAscent")).
+ fA := font ascent. "/ (font maxAscent + font ascent) // 2.
+ iA := italicFont ascent. "/ (italicFont maxAscent + italicFont ascent) // 2.
+ bA := boldFont ascent. "/ (boldFont maxAscent + boldFont ascent) // 2.
+ fontAscent := fA max:(iA max:bA).
fontWidth := font width.
fontIsFixedWidth := font isFixedWidth and:[ italicFont isFixedWidth and:[ boldFont isFixedWidth ]].
@@ -4830,11 +4835,11 @@
!TextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.350 2013-04-25 13:11:43 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.351 2013-04-26 09:46:46 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.350 2013-04-25 13:11:43 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.351 2013-04-26 09:46:46 cg Exp $'
! !