Tools__FontSettingsApplication.st
changeset 16320 cd9e227fdeec
parent 16289 abe58442da28
child 16321 e6a4ab0da993
child 16460 c8ec3e7fb2e1
--- a/Tools__FontSettingsApplication.st	Sun Apr 24 15:14:33 2016 +0200
+++ b/Tools__FontSettingsApplication.st	Sun Apr 24 17:50:42 2016 +0200
@@ -647,7 +647,7 @@
 !FontSettingsApplication methodsFor:'actions'!
 
 basicReadFontSettings
-    |prefs readFont sz lookIdx idx|
+    |prefs readFont sz lookIdx idx defaultTextFont|
   
     self useXftFontsOnly value:(UserPreferences current useXftFontsOnly).
     
@@ -690,13 +690,15 @@
     ].
     
     lookIdx := nil.
-    (TextView defaultFont face = 'bold') ifTrue:[
-        lookIdx := (self lookListValues indexOf:#vage).
+    defaultTextFont := TextView defaultFont.
+    (defaultTextFont face = #bold) ifTrue:[
+        lookIdx := self lookListValues indexOf:#vage.
     ] ifFalse:[
-        (TextView defaultFont isFixedWidth) ifTrue:[
-            lookIdx := (self lookListValues indexOf:#stx).
+        "XFT fonts always return false for #isFixedWidth"
+        (defaultTextFont isXftFont or:[(defaultTextFont onDevice:self device) isFixedWidth]) ifTrue:[
+            lookIdx := self lookListValues indexOf:#stx.
         ] ifFalse:[    
-            lookIdx := (self lookListValues indexOf:#squeak).
+            lookIdx := self lookListValues indexOf:#squeak.
         ].
     ].
     self lookSelectionHolder value:lookIdx withoutNotifying:self