WinWorkstation.st
changeset 5163 96a6ca407606
parent 5150 577084e6f257
child 5171 333471dbc830
--- a/WinWorkstation.st	Tue Feb 17 17:44:04 2009 +0100
+++ b/WinWorkstation.st	Tue Feb 17 17:44:18 2009 +0100
@@ -12528,7 +12528,7 @@
 !
 
 getFontWithFamily:familyString face:faceString
-	    style:styleArgString size:sizeArg encoding:encodingSym
+            style:styleArgString size:sizeArgOrNil pixelSize:pixelSizeArgOrNil encoding:encodingSym
 
     "try to get the specified font, if not available, try the next smaller
      font."
@@ -12539,94 +12539,94 @@
 
     "special: if face is nil, allow access to X-fonts"
     faceString isNil ifTrue:[
-	sizeArg notNil ifTrue:[
-	    theName := familyString , '-' , sizeArg printString
-	] ifFalse:[
-	    theName := familyString
-	].
-	theName isNil ifTrue:[
-	    "
-	     mhmh - fall back to the default font
-	    "
-	    theName := 'fixed'
-	].
-	theId := self createFontFor:theName.
-	theId isNil ifTrue:[
-	    theId := self getDefaultFont
-	].
-	^ theId
+        sizeArgOrNil notNil ifTrue:[
+            theName := familyString , '-' , sizeArgOrNil printString
+        ] ifFalse:[
+            theName := familyString
+        ].
+        theName isNil ifTrue:[
+            "
+             mhmh - fall back to the default font
+            "
+            theName := 'fixed'
+        ].
+        theId := self createFontFor:theName.
+        theId isNil ifTrue:[
+            theId := self getDefaultFont
+        ].
+        ^ theId
     ].
 
     "/ spacing other than 'normal' is contained as last component
     "/ in style
     styleString notNil ifTrue:[
-	((styleString endsWith:'-narrow')
-	 or:[styleString endsWith:'-semicondensed']) ifTrue:[
-	    |i|
-	    i := styleString lastIndexOf:$-.
-	    spacing := styleString copyFrom:(i+1).
-	    styleString := styleString copyTo:(i-1).
-	] ifFalse:[
-	    spacing := 'normal'.
-	].
+        ((styleString endsWith:'-narrow')
+         or:[styleString endsWith:'-semicondensed']) ifTrue:[
+            |i|
+            i := styleString lastIndexOf:$-.
+            spacing := styleString copyFrom:(i+1).
+            styleString := styleString copyTo:(i-1).
+        ] ifFalse:[
+            spacing := 'normal'.
+        ].
     ].
 
     xlatedStyle := styleString.
     xlatedStyle notNil ifTrue:[
-	xlatedStyle := xlatedStyle first asString
+        xlatedStyle := xlatedStyle first asString
     ].
 
     id := self
-	    getFontWithFoundry:'*'
-	    family:familyString asLowercase
-	    weight:faceString
-	    slant:styleString "/ xlatedStyle
-	    spacing:spacing
-	    pixelSize:nil
-	    size:sizeArg
-	    registry:'*'
-	    encoding:encodingSym.
+            getFontWithFoundry:'*'
+            family:familyString asLowercase
+            weight:faceString
+            slant:styleString "/ xlatedStyle
+            spacing:spacing
+            pixelSize:nil
+            size:sizeArgOrNil
+            registry:'*'
+            encoding:encodingSym.
 
     id isNil ifTrue:[
-	(encodingSym notNil and:[encodingSym ~= '*']) ifTrue:[
-	    "/ too stupid: encodings come in both cases
-	    "/
-	    id := self
-		    getFontWithFoundry:'*'
-		    family:familyString asLowercase
-		    weight:faceString
-		    slant:styleString "/ xlatedStyle
-		    spacing:spacing
-		    pixelSize:nil
-		    size:sizeArg
-		    registry:'*'
-		    encoding:encodingSym asUppercase.
-	    id isNil ifTrue:[
-		id := self
-			getFontWithFoundry:'*'
-			family:familyString asLowercase
-			weight:faceString
-			slant:styleString "/ xlatedStyle
-			spacing:spacing
-			pixelSize:nil
-			size:sizeArg
-			registry:'*'
-			encoding:encodingSym asLowercase.
-
-		id isNil ifTrue:[
-		    id := self
-			    getFontWithFoundry:'*'
-			    family:familyString asLowercase
-			    weight:faceString asLowercase
-			    slant:styleString asLowercase
-			    spacing:spacing
-			    pixelSize:nil
-			    size:sizeArg
-			    registry:'*'
-			    encoding:encodingSym asLowercase.
-		]
-	    ]
-	]
+        (encodingSym notNil and:[encodingSym ~= '*']) ifTrue:[
+            "/ too stupid: encodings come in both cases
+            "/
+            id := self
+                    getFontWithFoundry:'*'
+                    family:familyString asLowercase
+                    weight:faceString
+                    slant:styleString "/ xlatedStyle
+                    spacing:spacing
+                    pixelSize:nil
+                    size:sizeArgOrNil
+                    registry:'*'
+                    encoding:encodingSym asUppercase.
+            id isNil ifTrue:[
+                id := self
+                        getFontWithFoundry:'*'
+                        family:familyString asLowercase
+                        weight:faceString
+                        slant:styleString "/ xlatedStyle
+                        spacing:spacing
+                        pixelSize:nil
+                        size:sizeArgOrNil
+                        registry:'*'
+                        encoding:encodingSym asLowercase.
+
+                id isNil ifTrue:[
+                    id := self
+                            getFontWithFoundry:'*'
+                            family:familyString asLowercase
+                            weight:faceString asLowercase
+                            slant:styleString asLowercase
+                            spacing:spacing
+                            pixelSize:nil
+                            size:sizeArgOrNil
+                            registry:'*'
+                            encoding:encodingSym asLowercase.
+                ]
+            ]
+        ]
     ].
     ^ id
 
@@ -18153,7 +18153,7 @@
 !WinWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.379 2009-01-30 17:03:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.380 2009-02-17 16:44:18 cg Exp $'
 ! !
 
 WinWorkstation initialize!