--- a/FontPanel.st Wed Jan 27 17:03:26 2016 +0100
+++ b/FontPanel.st Tue Feb 02 18:49:05 2016 +0100
@@ -609,7 +609,7 @@
encodingLabel beInvisible
].
- Screen current supportsXFTFonts ifTrue:[
+ self graphicsDevice supportsXftFonts ifTrue:[
self xftFontsOnlyHolder value: (UserPreferences current useXftFontsOnly).
xftCheckBox := CheckBox label:(resources string:'XFT Fonts Only') in:box1.
xftCheckBox model:xftFontsOnlyHolder.
@@ -1075,7 +1075,7 @@
encodingLabel label:enc.
currentEncoding := enc.
fontName := deviceFont fullName.
- (font isKindOf:XftFontDescription) ifTrue:[fontName := fontName,' (xft)'].
+ font isXftFont ifTrue:[fontName := fontName,' (xft)'].
previewField contents:(font userFriendlyName,'\\' withCRs,(self class defaultSampleStringForEncoding:enc) asString).
] ifFalse:[
previewField contents:nil.
@@ -1562,8 +1562,15 @@
!
flushListOfAvailableFonts
- XftFontDescription flushListOfAvailableFonts.
- self updateFamilyList
+ self withWaitCursorDo:[
+ "this may take some time, especially with X11 XFT fonts"
+ self graphicsDevice
+ flushListOfAvailableFonts;
+ listOfAvailableFonts.
+
+ familyList list:nil.
+ self updateFamilyList.
+ ].
!
okPressed
@@ -1574,7 +1581,7 @@
szUnitUsed := (sizeUnit ? #pt).
sz := Number readFrom:currentSize.
- (currentSize endsWith:'px') ifTrue:[
+ (currentSize endsWith:#px) ifTrue:[
szUnitUsed := #px
].
@@ -1582,7 +1589,7 @@
okAction notNil ifTrue:[
currentFamily notNil ifTrue:[
okAction value:
- (((Screen current supportsXFTFonts and:[ self xftFontsOnlyHolder value ])
+ (((self graphicsDevice supportsXftFonts and:[self xftFontsOnlyHolder value])
ifTrue:[XftFontDescription]
ifFalse:[FontDescription])
family:currentFamily