--- a/FontPanel.st Wed Feb 18 18:51:54 2004 +0100
+++ b/FontPanel.st Thu Feb 19 00:04:20 2004 +0100
@@ -681,7 +681,7 @@
"
show a wait cursor: for some fonts (kanji etc) the
- X-server needs quites some time to load the font
+ X-server needs quite some time to load the font
"
self withWaitCursorDo:[
allFonts := device
@@ -709,11 +709,10 @@
].
font notNil ifTrue:[
- enc := font encoding.
+ deviceFont := font onDevice:device.
+ enc := deviceFont encoding.
enc isNil ifTrue:[enc := 'fontspecific'].
- deviceFont := font onDevice:device.
-
previewField font:deviceFont.
previewField characterEncoding:enc.
@@ -843,7 +842,7 @@
faceSelected:aFaceAndStyleName showPreview:showPreview
"a fonts face was selected; find available sizes and update lists"
- |sizes|
+ |sizes didShow|
aFaceAndStyleName notNil ifTrue:[
self extractFaceAndStyleFrom:aFaceAndStyleName.
@@ -863,7 +862,7 @@
^ self
].
- self clearPreview.
+ didShow := false.
sizes := (sizes asOrderedCollection sort) collect:[:entry | entry printString].
sizeList list:sizes.
@@ -871,10 +870,14 @@
(sizes includes:(currentSize printString)) ifTrue:[
sizeList setSelectElement:currentSize printString.
showPreview ifTrue:[
- self showPreview
+ self showPreview.
+ didShow := true.
]
]
- ]
+ ].
+ didShow ifFalse:[
+ self clearPreview
+ ].
"Modified: 30.6.1997 / 17:25:46 / cg"
!
@@ -980,5 +983,5 @@
!FontPanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/FontPanel.st,v 1.68 2004-02-18 17:39:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/FontPanel.st,v 1.69 2004-02-18 23:04:20 cg Exp $'
! !