#OTHER by mawalch
authormawalch
Thu, 07 Jul 2016 20:22:05 +0200
changeset 7409 2de3e4caafbb
parent 7408 d1cebfa53c19
child 7410 7324cb6c30dc
child 7489 07c626716aed
#OTHER by mawalch Spelling fixes.
XWorkstation.st
--- a/XWorkstation.st	Thu Jul 07 20:21:57 2016 +0200
+++ b/XWorkstation.st	Thu Jul 07 20:22:05 2016 +0200
@@ -6870,7 +6870,7 @@
 
 createFontFor:aFontName
     "a basic method for X-font allocation; this method allows
-     any font to be aquired (even those not conforming to
+     any font to be acquired (even those not conforming to
      standard naming conventions, such as cursor, fixed or k14)"
 
     <context: #return>
@@ -6883,15 +6883,15 @@
     if (ISCONNECTED
      && __isStringLike(aFontName)) {
 
-	ENTER_XLIB();
-	newFont = XLoadQueryFont(myDpy, (char *)__stringVal(aFontName));
-	LEAVE_XLIB();
+        ENTER_XLIB();
+        newFont = XLoadQueryFont(myDpy, (char *)__stringVal(aFontName));
+        LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-	if (newFont)
-	    __cnt_font++;
-#endif
-
-	RETURN ( newFont ? __MKEXTERNALADDRESS(newFont) : nil );
+        if (newFont)
+            __cnt_font++;
+#endif
+
+        RETURN ( newFont ? __MKEXTERNALADDRESS(newFont) : nil );
     }
 %}.
     "/ --- disabled due to UNLIMITEDSTACK -- self primitiveFailedOrClosedConnection.
@@ -7562,12 +7562,12 @@
 !
 
 getFontWithFamily:familyString face:faceString
-	    style:styleArgString size:sizeArgOrNil sizeUnit:sizeUnit encoding:encoding
+            style:styleArgString size:sizeArgOrNil sizeUnit:sizeUnit encoding:encoding
 
     "try to get the specified font, if not available, try next smaller
      font. Access to X-fonts by name is possible, by passing the X font name
      as family and the other parameters as nil. For example, the cursor font
-     can be aquired that way."
+     can be acquired that way."
 
     |styleString theName theId xlatedStyle
      id spacing encodingMatch idx roundedSize pixelSize pointSize|
@@ -7575,28 +7575,28 @@
     styleString := styleArgString.
 
     sizeArgOrNil notNil ifTrue:[
-	roundedSize := sizeArgOrNil rounded asInteger.
-	sizeUnit == #px ifTrue:[
-	    pixelSize := roundedSize.
-	] ifFalse:[
-	    pointSize := roundedSize.
-	].
+        roundedSize := sizeArgOrNil rounded asInteger.
+        sizeUnit == #px ifTrue:[
+            pixelSize := roundedSize.
+        ] ifFalse:[
+            pointSize := roundedSize.
+        ].
     ].
 
     "special: if face is nil, allow access to X-fonts"
     faceString isNil ifTrue:[
-	roundedSize notNil ifTrue:[
-	    theName := familyString , '-' , roundedSize printString
-	] ifFalse:[
-	    theName := familyString
-	].
-	theName notNil ifTrue:[
-	    theId := self createFontFor:theName.
-	].
-	theId isNil ifTrue:[
-	    theId := self getDefaultFontWithEncoding:encoding
-	].
-	^ theId
+        roundedSize notNil ifTrue:[
+            theName := familyString , '-' , roundedSize printString
+        ] ifFalse:[
+            theName := familyString
+        ].
+        theName notNil ifTrue:[
+            theId := self createFontFor:theName.
+        ].
+        theId isNil ifTrue:[
+            theId := self getDefaultFontWithEncoding:encoding
+        ].
+        ^ theId
     ].
 
     "/ spacing other than 'normal' is contained as last component
@@ -7604,67 +7604,67 @@
 
     (styleString notNil
      and:[(styleString endsWith:'-narrow')
-	  or:[styleString endsWith:'-semicondensed']]) ifTrue:[
-	|i|
-	i := styleString lastIndexOf:$-.
-	spacing := styleString copyFrom:(i+1).
-	styleString := styleString copyTo:(i-1).
+          or:[styleString endsWith:'-semicondensed']]) ifTrue:[
+        |i|
+        i := styleString lastIndexOf:$-.
+        spacing := styleString copyFrom:(i+1).
+        styleString := styleString copyTo:(i-1).
     ] ifFalse:[
-	spacing := 'normal'.
+        spacing := 'normal'.
     ].
 
     xlatedStyle := styleString.
     xlatedStyle notNil ifTrue:[
-	xlatedStyle := xlatedStyle first asString
+        xlatedStyle := xlatedStyle first asString
     ].
 
     encoding isNil ifTrue:[
-	encodingMatch := '*-*'.
+        encodingMatch := '*-*'.
     ] ifFalse:[
-	idx := encoding indexOf:$-.
-	idx ~~ 0 ifTrue:[
-	    encodingMatch := encoding
-	] ifFalse:[
-	    encodingMatch := encoding , '-*'.
-	].
+        idx := encoding indexOf:$-.
+        idx ~~ 0 ifTrue:[
+            encodingMatch := encoding
+        ] ifFalse:[
+            encodingMatch := encoding , '-*'.
+        ].
     ].
 
     id := self
-	    getFontWithFoundry:'*'
-	    family:familyString asLowercase
-	    weight:faceString
-	    slant:xlatedStyle
-	    spacing:spacing
-	    pixelSize:pixelSize
-	    size:pointSize
-	    encoding:encodingMatch.
+            getFontWithFoundry:'*'
+            family:familyString asLowercase
+            weight:faceString
+            slant:xlatedStyle
+            spacing:spacing
+            pixelSize:pixelSize
+            size:pointSize
+            encoding:encodingMatch.
 
     id isNil ifTrue:[
-	(encodingMatch notNil and:[encodingMatch ~= '*']) ifTrue:[
-	    "/ too stupid: registries come in both cases
-	    "/ and X does not ignore case
-	    "/
-	    id := self
-		    getFontWithFoundry:'*'
-		    family:familyString asLowercase
-		    weight:faceString
-		    slant:xlatedStyle
-		    spacing:spacing
-		    pixelSize:nil
-		    size:roundedSize
-		    encoding:encodingMatch asUppercase.
-	    id isNil ifTrue:[
-		id := self
-			getFontWithFoundry:'*'
-			family:familyString asLowercase
-			weight:faceString
-			slant:xlatedStyle
-			spacing:spacing
-			pixelSize:nil
-			size:roundedSize
-			encoding:encodingMatch asLowercase.
-	    ]
-	]
+        (encodingMatch notNil and:[encodingMatch ~= '*']) ifTrue:[
+            "/ too stupid: registries come in both cases
+            "/ and X does not ignore case
+            "/
+            id := self
+                    getFontWithFoundry:'*'
+                    family:familyString asLowercase
+                    weight:faceString
+                    slant:xlatedStyle
+                    spacing:spacing
+                    pixelSize:nil
+                    size:roundedSize
+                    encoding:encodingMatch asUppercase.
+            id isNil ifTrue:[
+                id := self
+                        getFontWithFoundry:'*'
+                        family:familyString asLowercase
+                        weight:faceString
+                        slant:xlatedStyle
+                        spacing:spacing
+                        pixelSize:nil
+                        size:roundedSize
+                        encoding:encodingMatch asLowercase.
+            ]
+        ]
     ].
     ^ id