--- a/TextView.st Thu Sep 03 09:05:19 2015 +0200
+++ b/TextView.st Thu Sep 03 10:10:03 2015 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -1227,15 +1225,15 @@
pref := FontDescription preferredFontEncodingFor:newEncoding.
(pref match:fontsEncoding) ifTrue:[
- ^ self
+ ^ self
].
- (CharacterEncoder isEncoding:pref subSetOf:fontsEncoding) ifTrue:[
- ^ self
+ (fontsEncoding notNil and:[CharacterEncoder isEncoding:pref subSetOf:fontsEncoding]) ifTrue:[
+ ^ self
].
filter := [:f | |coding|
- (coding := f encoding) notNil
- and:[pref match:coding]].
+ (coding := f encoding) notNil
+ and:[pref match:coding]].
device flushListOfAvailableFonts.
matchingFonts := device listOfAvailableFonts select:filter.
@@ -1244,46 +1242,46 @@
matchingFamilyFaceStyleFonts := matchingFamilyFaceFonts select:[:f | f style = font style].
matchingFamilyFaceStyleSizeFonts := matchingFamilyFaceStyleFonts select:[:f | f size = font size].
matchingFamilyFaceStyleSizeFonts size > 0 ifTrue:[
- defaultFont := matchingFamilyFaceStyleSizeFonts first
+ defaultFont := matchingFamilyFaceStyleSizeFonts first
] ifFalse:[
- matchingFamilyFaceStyleFonts size > 0 ifTrue:[
- defaultFont := matchingFamilyFaceStyleFonts first
- ] ifFalse:[
- matchingFamilyFaceFonts size > 0 ifTrue:[
- defaultFont := matchingFamilyFaceFonts first
- ] ifFalse:[
- matchingFamilyFonts size > 0 ifTrue:[
- defaultFont := matchingFamilyFonts first
- ] ifFalse:[
- matchingFonts size > 0 ifTrue:[
- defaultFont := matchingFonts first
- ].
- ].
- ].
- ].
+ matchingFamilyFaceStyleFonts size > 0 ifTrue:[
+ defaultFont := matchingFamilyFaceStyleFonts first
+ ] ifFalse:[
+ matchingFamilyFaceFonts size > 0 ifTrue:[
+ defaultFont := matchingFamilyFaceFonts first
+ ] ifFalse:[
+ matchingFamilyFonts size > 0 ifTrue:[
+ defaultFont := matchingFamilyFonts first
+ ] ifFalse:[
+ matchingFonts size > 0 ifTrue:[
+ defaultFont := matchingFonts first
+ ].
+ ].
+ ].
+ ].
].
defaultFont isNil ifTrue:[
- defaultFont isNil ifTrue:[
- self warn:'Your display does not seem to provide any ' , newEncoding allBold , ' encoded font.\\Please select an appropriate font (iso10646-Unicode recommended)'.
- pref := #'iso10646-1'.
- ]
+ defaultFont isNil ifTrue:[
+ self warn:'Your display does not seem to provide any ' , newEncoding allBold , ' encoded font.\\Please select an appropriate font (iso10646-Unicode recommended)'.
+ pref := #'iso10646-1'.
+ ]
].
msg := 'Switch to a %1 encoded font ?'.
(ask not or:[self confirm:(resources stringWithCRs:msg with:pref)])
ifTrue:[
- self withWaitCursorDo:[
- f := FontPanel
- fontFromUserInitial:defaultFont
- title:(resources string:'Font selection')
- filter:filter
- encoding:pref.
-
- f notNil ifTrue:[
- self font:f.
- ]
- ]
+ self withWaitCursorDo:[
+ f := FontPanel
+ fontFromUserInitial:defaultFont
+ title:(resources string:'Font selection')
+ filter:filter
+ encoding:pref.
+
+ f notNil ifTrue:[
+ self font:f.
+ ]
+ ]
]
"Created: 26.10.1996 / 12:06:54 / cg"