--- a/FileBrowser.st Thu Feb 12 19:39:35 2004 +0100
+++ b/FileBrowser.st Thu Feb 12 21:52:32 2004 +0100
@@ -6003,25 +6003,6 @@
"Modified: 1.7.1997 / 00:00:27 / cg"
!
-preferredFontEncodingFor:fileEncoding
- "given a file encoding, return corresponding preferred fontEncoding
- match pattern"
-
- |ce fe|
-
- ce := FontDescription characterSetForCharacterEncoding:fileEncoding.
- ce isNil ifTrue:[
- ce := fileEncoding.
- ].
-
- fe := FontDescription fontNamePatternForCharset:ce.
- fe notNil ifTrue:[^ fe].
- ^ ce ? 'iso8859*'
-
- "Created: 28.6.1997 / 20:47:35 / cg"
- "Modified: 1.7.1997 / 00:04:56 / cg"
-!
-
validateFontEncodingFor:newEncoding ask:ask
"if required, query user if he/she wants to change to another font,
which is able to display text encoded as specified by newEncoding"
@@ -6030,7 +6011,7 @@
fontsEncoding := subView font encoding.
- pref := self preferredFontEncodingFor:newEncoding.
+ pref := FontDescription preferredFontEncodingFor:newEncoding.
(pref match:fontsEncoding) ifTrue:[
^ self
@@ -6052,8 +6033,7 @@
].
defaultFont isNil ifTrue:[
- (pref = 'ascii*'
- or:[pref = 'iso8859*']) ifTrue:[
+ (pref = 'ascii*' or:[pref = 'iso8859*']) ifTrue:[
defaultFont := FontDescription family:'courier' face:'medium' style:'roman' size:12
]
].
@@ -6285,7 +6265,7 @@
].
fontsEncoding := subView font encoding ? 'ascii'.
- pref := self preferredFontEncodingFor:guess.
+ pref := FontDescription preferredFontEncodingFor:guess.
ok := CharacterEncoder isEncoding:pref subSetOf:fontsEncoding.
ok ifTrue:[
@@ -7633,5 +7613,5 @@
!FileBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.562 2004-02-12 18:39:35 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.563 2004-02-12 20:52:32 cg Exp $'
! !