Font.st
changeset 7624 b49d1f99b8dd
parent 7577 81657d05b6ef
child 7701 8ec4585fa762
--- a/Font.st	Fri Oct 14 14:55:56 2016 +0200
+++ b/Font.st	Fri Oct 14 14:56:04 2016 +0200
@@ -441,10 +441,17 @@
      myself on aDevice. This does NOT try to look for existing
      or replacement fonts (i.e. can be used to get physical fonts)."
 
-    |id|
+    |id xftFont|
 
     "receiver was not associated - do it now"
     device isNil ifTrue:[
+        (aDevice supportsXftFonts 
+        and:[ UserPreferences current useXFontsOnly not ]) ifTrue:[
+            xftFont := (XftFontDescription for:self) onDevice:aDevice ifAbsent:[nil].
+            xftFont notNil ifTrue:[^ xftFont].
+            UserPreferences current useXftFontsOnly ifTrue:[^ nil].
+        ].    
+        
         "ask that device for the font"
         id := aDevice 
                 getFontWithFamily:family