--- a/XWorkstation.st Fri Jan 29 08:32:08 2016 +0000
+++ b/XWorkstation.st Sat Feb 06 07:50:06 2016 +0000
@@ -599,6 +599,21 @@
"Modified: / 27.4.1999 / 17:21:30 / cg"
! !
+!XWorkstation class methodsFor:'accessing-display capabilities'!
+
+hasXftLibrary
+%{
+#ifdef XFT
+ RETURN(true);
+#else
+ RETURN(false);
+#endif
+%}
+ "
+ Display hasXftLibrary
+ "
+! !
+
!XWorkstation class methodsFor:'error handling'!
debug:aBoolean
@@ -1281,19 +1296,6 @@
"
!
-hasXftLibrary
-%{
-#ifdef XFT
- RETURN(true);
-#else
- RETURN(false);
-#endif
-%}
- "
- Display hasXftLibrary
- "
-!
-
iconSizes
"Get the preferred/supported icon sizes. These are set by the window manager.
We return nil (if not set) or an OrderedCollection of iconSize specs."
@@ -1651,15 +1653,13 @@
^ true
!
-supportsXFTFonts
- "return true, if this device supports xft (truetype) fonts."
-
- ^ self hasRenderExtension and:[self hasXftLibrary]
-
- "
- Display supportsXFTFonts
+supportsXftFonts
+ ^ XftFontDescription notNil and:[self class hasXftLibrary and:[self hasRenderExtension]]
+
+ "
+ Display supportsXftFonts
Display hasRenderExtension
- Display hasXftLibrary
+ Display class hasXftLibrary
"
!
@@ -7061,7 +7061,7 @@
listOfXFonts := nil.
XftFontDescription notNil ifTrue:[
- XftFontDescription flushListOfAvailableFonts.
+ XftFontDescription flushListOfAvailableFonts.
].
"
@@ -7655,27 +7655,24 @@
|names listOfXftFonts|
listOfXFonts isNil ifTrue:[
- names := self getAvailableFontsMatching:'*'.
- names isNil ifTrue:[
- "no names returned ..."
- ^ nil
- ].
- listOfXFonts := names collect:[:aName | self fontDescriptionFromXFontName:aName].
- listOfXFonts := FontDescription genericFonts, listOfXFonts.
- ].
-
- (XftFontDescription notNil
- and:[ XftFontDescription isLoaded
- and:[ self supportsXFTFonts ]]
- ) ifTrue:[
- UserPreferences current useXFontsOnly ifFalse:[
- listOfXftFonts := XftFontDescription listOfAvailableFonts.
-
- UserPreferences current useXftFontsOnly ifTrue:[
- ^ listOfXftFonts
- ].
- ^ listOfXftFonts , listOfXFonts.
- ].
+ names := self getAvailableFontsMatching:'*'.
+ names isNil ifTrue:[
+ "no names returned ..."
+ ^ nil
+ ].
+ listOfXFonts := names collect:[:aName | self fontDescriptionFromXFontName:aName].
+ listOfXFonts := FontDescription genericFonts, listOfXFonts.
+ ].
+
+ self supportsXftFonts ifTrue:[
+ UserPreferences current useXFontsOnly ifFalse:[
+ listOfXftFonts := XftFontDescription listOfAvailableFonts.
+
+ UserPreferences current useXftFontsOnly ifTrue:[
+ ^ listOfXftFonts
+ ].
+ ^ listOfXftFonts , listOfXFonts.
+ ].
].
^ listOfXFonts