--- a/FontDescription.st Fri Oct 14 13:44:39 2016 +0200
+++ b/FontDescription.st Fri Oct 14 14:55:56 2016 +0200
@@ -16,11 +16,11 @@
Object subclass:#FontDescription
instanceVariableNames:'family face style size encoding manufacturer name flags masks
sizeUnit pixelSize weight slant'
- classVariableNames:'BoldnessMask FixedFlag ItalicFlag OutlineFlag SerifFlag
- ShadowFlag StrikeoutFlag UnderlineFlag GenericFlag GenericFonts
- CharacterSetToFontMapping CharacterEncodingToCharacterSetMapping
- IsTrueTypeFlag OverlappingCharactersFlag DefaultEncoding
- AntialiasedFlag ScalableFlag DecorativeFlag'
+ classVariableNames:'AntialiasedFlag BoldnessMask
+ CharacterEncodingToCharacterSetMapping CharacterSetToFontMapping
+ DecorativeFlag DefaultEncoding FixedFlag GenericFlag GenericFonts
+ IsTrueTypeFlag ItalicFlag OutlineFlag OverlappingCharactersFlag
+ ScalableFlag SerifFlag ShadowFlag StrikeoutFlag UnderlineFlag'
poolDictionaries:''
category:'Graphics-Support'
!
@@ -1337,7 +1337,14 @@
myself on aDevice. This does NOT try to look for existing
or replacement fonts (i.e. can be used to get physical fonts)."
- |newFont id|
+ |newFont id xftFont|
+
+ (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