class: XftFontDescription
authorClaus Gittinger <cg@exept.de>
Sat, 13 Dec 2014 03:01:42 +0100
changeset 6659 21975a0db156
parent 6658 5a5884092c7f
child 6661 2f05e09f8a31
class: XftFontDescription changed: #family:face:style:size:sizeUnit:encoding: tuning font access.
XftFontDescription.st
--- a/XftFontDescription.st	Fri Dec 12 21:08:24 2014 +0100
+++ b/XftFontDescription.st	Sat Dec 13 03:01:42 2014 +0100
@@ -310,23 +310,38 @@
 
     |proto|
 
+    RecentlyUsedFonts notNil ifTrue:[ 
+        proto := RecentlyUsedFonts
+                detect:[:fn |
+                    fn family = familyString
+                    and:[ fn size = size and:[fn sizeUnit = sizeUnit
+                    and:[ fn face = faceString
+                    and:[ (fn style = styleString
+                          or:[ (fn style = 'oblique' and:[styleString = 'italic'])
+                          or:[ (fn style = 'italic' and:[styleString = 'oblique']) ]]) ]]]]]
+                ifNone:nil.
+        proto notNil ifTrue:[
+            ^ proto
+        ].
+    ].
+
     CachedFontList notNil ifTrue:[
-	proto := CachedFontList
-		detect:[:fn |
-		    fn family = familyString
-		    and:[ fn face = faceString
-		    and:[ (fn style = styleString
-			  or:[ (fn style = 'oblique' and:[styleString = 'italic'])
-			  or:[ (fn style = 'italic' and:[styleString = 'oblique']) ]]) ]]]
-		ifNone:nil.
-	proto notNil ifTrue:[
-	    ^ (proto shallowCopy)
-		setDevice: nil patternId: nil fontId: nil;
-		family:familyString face:faceString style:styleString size:size sizeUnit:sizeUnit encoding:encoding
-	].
+        proto := CachedFontList
+                detect:[:fn |
+                    fn family = familyString
+                    and:[ fn face = faceString
+                    and:[ (fn style = styleString
+                          or:[ (fn style = 'oblique' and:[styleString = 'italic'])
+                          or:[ (fn style = 'italic' and:[styleString = 'oblique']) ]]) ]]]
+                ifNone:nil.
+        proto notNil ifTrue:[
+            ^ (proto shallowCopy)
+                setDevice: nil patternId: nil fontId: nil;
+                family:familyString face:faceString style:styleString size:size sizeUnit:sizeUnit encoding:encoding
+        ].
     ].
     ^ super
-	family:familyString face:faceString style:styleString size:size sizeUnit:sizeUnit encoding:encoding
+        family:familyString face:faceString style:styleString size:size sizeUnit:sizeUnit encoding:encoding
 !
 
 new
@@ -2074,11 +2089,11 @@
 !XftFontDescription class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.63 2014-12-12 16:49:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.64 2014-12-13 02:01:42 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.63 2014-12-12 16:49:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XftFontDescription.st,v 1.64 2014-12-13 02:01:42 cg Exp $'
 ! !