XftFontDescription.st
branchdelegated_gc_jv
changeset 6800 f4acb46ba42e
parent 6726 9f16fe1701f5
parent 6754 e5fad431c0b8
child 6819 f91377f97414
--- a/XftFontDescription.st	Sat Jan 10 06:20:20 2015 +0000
+++ b/XftFontDescription.st	Tue Feb 03 13:48:45 2015 +0000
@@ -76,7 +76,8 @@
 
 # define __HANDLE_VAL(type, externalAddress) \
 	((type)__externalAddressVal(externalAddress))
-#define __HANDLE_NEW(ptr, __cls)                \
+
+# define __HANDLE_NEW(ptr, __cls)                \
 	({                                      \
 	    OBJ handle;                         \
 	    handle = __MKEXTERNALADDRESS(ptr);  \
@@ -553,13 +554,15 @@
      bg bgR bgG bgB bgA bgPixel drawX drawY displayId screen drawableId drawId drawIdIsShared error stringLen|
 
     "limit the string len, otherwise bad output is generated"
-    stringLen := index2Arg - index1.
-    stringLen > 4000 ifTrue:[
-        index2 := index1 + 4000.
+    stringLen := index2Arg - index1 + 1.
+    stringLen > 8000 ifTrue:[
+        index2 := index1 + 8000 - 1.
     ]  ifFalse:[
+        stringLen <= 0 ifTrue:[^ self].
         index2 := index2Arg.
     ].
     bytesPerCharacter := aString bitsPerCharacter // 8.
+    transformation := aGC transformation.
 
     clipR := aGC deviceClippingBoundsOrNil.
     clipR notNil ifTrue:[
@@ -567,15 +570,16 @@
         clipY := clipR top.
         clipW := clipR width.
         clipH := clipR height.
-	"/ YES YES YES: this MUST be transformed!!
-	"/ (see htmlView) fix the notebook, please.
-	transformation notNil ifTrue:[
-	    clipX := (transformation applyToX:clipX) ceiling.
-	    clipY := (transformation applyToY:clipY) ceiling.
-	].
+clipW > 32767 ifTrue:['clipW > 32767 ' errorPrintCR. clipW errorPrintCR. self halt. clipW := 32767].
+(clipX > 16384 or:[clipX < -16384]) ifTrue:['clipX < 16384 ' errorPrintCR. clipX errorPrintCR.].
+        "/ YES YES YES: this MUST be transformed!!
+        "/ (see htmlView) fix the notebook, please.
+        transformation notNil ifTrue:[
+            clipX := (transformation applyToX:clipX) ceiling.
+            clipY := (transformation applyToY:clipY) ceiling.
+        ].
     ].
 
-    transformation := aGC transformation.
     transformation isNil ifTrue:[
         drawX := xArg.
         drawY := yArg.
@@ -2099,11 +2103,11 @@
 !XftFontDescription class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.62 2014-11-27 00:12:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.51.2.2 2015-01-29 09:54:04 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.62 2014-11-27 00:12:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.51.2.2 2015-01-29 09:54:04 stefan Exp $'
 !
 
 version_HG