--- a/FontDescription.st Wed Apr 25 10:04:02 2012 +0200
+++ b/FontDescription.st Wed Apr 25 18:58:41 2012 +0200
@@ -379,14 +379,14 @@
!FontDescription class methodsFor:'defaults'!
defaultEncoding
- ^ #'unicode'.
- ^ #'iso8859-1'
+ ^ #'iso10646-1'.
+"/ ^ #'iso8859-1'
"Modified: / 20-03-2012 / 23:48:24 / cg"
!
defaultFace
- ^ 'medium'
+ ^ #medium
!
defaultSize
@@ -394,7 +394,7 @@
!
defaultStyle
- ^ 'roman'
+ ^ #roman
! !
!FontDescription class methodsFor:'queries'!
@@ -434,7 +434,7 @@
fe := FontDescription fontNamePatternForCharset:ce.
fe notNil ifTrue:[^ fe].
- ^ ce ? 'iso8859*'
+ ^ ce ? self defaultEncoding.
! !
!FontDescription methodsFor:'Compatibility-ST80'!
@@ -835,6 +835,27 @@
^ self asFace:#bold
!
+asEncoding:anotherEncoding
+ |newFont|
+
+ family isNil ifTrue:[
+ "CompoundFonts do not have a family"
+ ^ self
+ ].
+ newFont := self class
+ family:family
+ face:face
+ style:style
+ size:(sizeUnit == #px ifTrue:[pixelSize] ifFalse:[size])
+ sizeUnit:sizeUnit
+ encoding:anotherEncoding.
+
+ newFont isGenericFont:self isGenericFont.
+
+ ^ newFont onDevice:self graphicsDevice.
+ "Modified: / 27-09-2006 / 13:08:11 / cg"
+!
+
asFace:anotherFace
"return the bold font corresponding to the receiver"
@@ -967,9 +988,9 @@
pixelSize := literalEncoding at:8.
].
].
- encoding := literalEncoding at:6
+ encoding := literalEncoding at:6.
] ifFalse:[
- encoding := #'iso8859-1'
+ encoding := self class defaultEncoding.
].
!
@@ -1504,11 +1525,11 @@
!FontDescription class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/FontDescription.st,v 1.77 2012-03-20 23:55:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/FontDescription.st,v 1.78 2012-04-25 16:58:41 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/FontDescription.st,v 1.77 2012-03-20 23:55:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/FontDescription.st,v 1.78 2012-04-25 16:58:41 stefan Exp $'
! !
FontDescription initialize!