--- a/FontDescription.st Sun Feb 28 14:47:05 2016 +0000
+++ b/FontDescription.st Mon Feb 29 07:18:01 2016 +0000
@@ -958,20 +958,34 @@
sameDeviceFontAs:aFont
aFont species == self species ifFalse:[^ false].
- (family = aFont family) ifFalse:[ ^ false ].
- (face = aFont face) ifFalse:[ ^ false ].
- ((style = aFont style)
- or:[ (style = 'italic' and:[aFont style = 'oblique'])
- or:[ style = 'oblique' and:[aFont style = 'italic']]]) ifFalse:[ ^ false ].
+ ^ self sameFamily: aFont family
+ face: aFont face
+ style: aFont style
+ size: aFont size
+ unit: aFont sizeUnit
+ pixelSize: aFont pixelSize
+ encoding: aFont encoding
+
+ "Modified: / 29-02-2016 / 08:30:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
- (encoding isNil or:[encoding = aFont encoding]) ifFalse:[ ^ false ].
- (sizeUnit ? #pt) = aFont sizeUnit ifFalse:[ ^ false ].
+sameFamily: otherFamily face: otherFace style: otherStyle size: otherSize unit: otherSizeUnit pixelSize: otherPixelSize encoding: otherEncoding
+ (family = otherFamily) ifFalse:[ ^ false ].
+ (face = otherFace) ifFalse:[ ^ false ].
+ ((style = otherStyle)
+ or:[ (style = 'italic' and:[otherStyle = 'oblique'])
+ or:[ style = 'oblique' and:[otherStyle = 'italic']]]) ifFalse:[ ^ false ].
+
+ (encoding isNil or:[encoding = otherEncoding]) ifFalse:[ ^ false ].
+ (sizeUnit ? #pt) = otherSizeUnit ifFalse:[ ^ false ].
(sizeUnit ? #pt) == #pt ifTrue:[
- (size = aFont size) ifFalse:[ ^ false ].
+ (size = otherSize) ifFalse:[ ^ false ].
] ifFalse:[
- (pixelSize = aFont pixelSize) ifFalse:[ ^ false ].
+ (pixelSize = otherPixelSize) ifFalse:[ ^ false ].
].
^ true
+
+ "Created: / 29-02-2016 / 08:28:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!FontDescription methodsFor:'converting'!