class: XftFontDescription
changed: #displayString:from:to:x:y:in:opaque:
limit string len to 8000
--- a/XftFontDescription.st Thu Mar 20 18:05:05 2014 +0100
+++ b/XftFontDescription.st Thu Mar 20 23:56:49 2014 +0100
@@ -435,11 +435,18 @@
!XftFontDescription methodsFor:'displaying'!
-displayString:aString from:index1 to:index2 x:xArg y:yArg in:aGC opaque:opaque
+displayString:aString from:index1 to:index2Arg x:xArg y:yArg in:aGC opaque:opaque
"display a partial string at some position in aGC."
- |bytesPerCharacter transformation clipR clipX clipY clipW clipH fg fgR fgG fgB fgA fgPixel bg bgR bgG bgB bgA bgPixel drawX drawY displayId screen drawableId error |
+ |index2 bytesPerCharacter transformation clipR clipX clipY clipW clipH fg fgR fgG fgB fgA fgPixel bg bgR bgG bgB bgA bgPixel drawX drawY displayId screen drawableId error stringLen|
+ "limit the string len, otherwise bad output is generated"
+ stringLen := index2Arg - index1.
+ stringLen > 8000 ifTrue:[
+ index2 := index2Arg - (stringLen - 8000).
+ ] ifFalse:[
+ index2 := index2Arg.
+ ].
bytesPerCharacter := aString bitsPerCharacter // 8.
transformation := aGC transformation.
@@ -499,7 +506,7 @@
^ self.
].
screen := device screen.
- drawableId := aGC id.
+ drawableId := aGC drawableId.
%{
#ifdef XFT
@@ -1907,11 +1914,11 @@
!XftFontDescription class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.41 2014-03-19 21:53:55 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.42 2014-03-20 22:56:49 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.41 2014-03-19 21:53:55 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.42 2014-03-20 22:56:49 stefan Exp $'
! !