--- a/XWorkstation.st Sat Nov 26 21:38:57 2016 +0000
+++ b/XWorkstation.st Sat Nov 26 22:00:53 2016 +0000
@@ -39,6 +39,13 @@
category:'Interface-Graphics'
!
+Object subclass:#PseudoDeviceWithoutXFTSupport
+ instanceVariableNames:'realDevice'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:XWorkstation
+!
+
Object subclass:#SelectionFetcher
instanceVariableNames:'sema message display drawableID selectionID propertyID targetID
buffer done incremental'
@@ -1041,6 +1048,15 @@
^ nil
!
+asPseudoDeviceWithoutXFTSupport
+ "return a pseudo device to be used when drawing into pixmaps
+ on a device where xft-drawing into pixmaps is broken.
+ This is a temporary hack, to be removed when that problem is fixed in xft;
+ then, we should return self here."
+
+ ^ PseudoDeviceWithoutXFTSupport basicNew realDevice:self
+!
+
blackpixel
"return the colornumber of black"
@@ -13404,6 +13420,45 @@
^ false "/ or true or what ?
! !
+!XWorkstation::PseudoDeviceWithoutXFTSupport class methodsFor:'documentation'!
+
+documentation
+"
+ this is a proxy device, which forwards its messages to a real device,
+ possibly overriding some messages.
+ It is currently only used as a hack (workaround) a bug in the XWindows
+ interface, which cannot draw strings into pixmaps using XFT fonts.
+ For this, a pseudoDevice instance is set as device into the pixmap's GC,
+ so it will draw using non-xft fonts.
+ This should vanish, once the xft drawing works.
+
+ [author:]
+ cg
+"
+! !
+
+!XWorkstation::PseudoDeviceWithoutXFTSupport methodsFor:'accessing'!
+
+realDevice:aDevice
+ realDevice := aDevice.
+! !
+
+!XWorkstation::PseudoDeviceWithoutXFTSupport methodsFor:'message forwarding'!
+
+doesNotUnderstand:aMessage
+ ^ aMessage sendTo:realDevice
+! !
+
+!XWorkstation::PseudoDeviceWithoutXFTSupport methodsFor:'queries'!
+
+deviceFonts
+ ^ realDevice deviceFonts keys reject:[:f | f isXftFont ]
+!
+
+supportsXftFonts
+ ^ false.
+! !
+
!XWorkstation::SelectionFetcher class methodsFor:'documentation'!
documentation