956 ! |
956 ! |
957 |
957 |
958 sameDeviceFontAs:aFont |
958 sameDeviceFontAs:aFont |
959 aFont species == self species ifFalse:[^ false]. |
959 aFont species == self species ifFalse:[^ false]. |
960 |
960 |
961 (family = aFont family) ifFalse:[ ^ false ]. |
961 ^ self sameFamily: aFont family |
962 (face = aFont face) ifFalse:[ ^ false ]. |
962 face: aFont face |
963 ((style = aFont style) |
963 style: aFont style |
964 or:[ (style = 'italic' and:[aFont style = 'oblique']) |
964 size: aFont size |
965 or:[ style = 'oblique' and:[aFont style = 'italic']]]) ifFalse:[ ^ false ]. |
965 unit: aFont sizeUnit |
966 |
966 pixelSize: aFont pixelSize |
967 (encoding isNil or:[encoding = aFont encoding]) ifFalse:[ ^ false ]. |
967 encoding: aFont encoding |
968 (sizeUnit ? #pt) = aFont sizeUnit ifFalse:[ ^ false ]. |
968 |
|
969 "Modified: / 29-02-2016 / 08:30:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
970 ! |
|
971 |
|
972 sameFamily: otherFamily face: otherFace style: otherStyle size: otherSize unit: otherSizeUnit pixelSize: otherPixelSize encoding: otherEncoding |
|
973 (family = otherFamily) ifFalse:[ ^ false ]. |
|
974 (face = otherFace) ifFalse:[ ^ false ]. |
|
975 ((style = otherStyle) |
|
976 or:[ (style = 'italic' and:[otherStyle = 'oblique']) |
|
977 or:[ style = 'oblique' and:[otherStyle = 'italic']]]) ifFalse:[ ^ false ]. |
|
978 |
|
979 (encoding isNil or:[encoding = otherEncoding]) ifFalse:[ ^ false ]. |
|
980 (sizeUnit ? #pt) = otherSizeUnit ifFalse:[ ^ false ]. |
969 (sizeUnit ? #pt) == #pt ifTrue:[ |
981 (sizeUnit ? #pt) == #pt ifTrue:[ |
970 (size = aFont size) ifFalse:[ ^ false ]. |
982 (size = otherSize) ifFalse:[ ^ false ]. |
971 ] ifFalse:[ |
983 ] ifFalse:[ |
972 (pixelSize = aFont pixelSize) ifFalse:[ ^ false ]. |
984 (pixelSize = otherPixelSize) ifFalse:[ ^ false ]. |
973 ]. |
985 ]. |
974 ^ true |
986 ^ true |
|
987 |
|
988 "Created: / 29-02-2016 / 08:28:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
975 ! ! |
989 ! ! |
976 |
990 |
977 !FontDescription methodsFor:'converting'! |
991 !FontDescription methodsFor:'converting'! |
978 |
992 |
979 asBold |
993 asBold |