FontDescription.st
changeset 4297 10b461a37e26
parent 4146 4c46ae30bd64
child 4298 2b347bca3941
equal deleted inserted replaced
4296:240f73781089 4297:10b461a37e26
   657 	style:'oblique' 
   657 	style:'oblique' 
   658 	size:size 
   658 	size:size 
   659 	encoding:encoding
   659 	encoding:encoding
   660 !
   660 !
   661 
   661 
   662 fromLiteralArrayEncoding:encoding
   662 fromLiteralArrayEncoding:literalEncoding
   663     "read my contents from a aLiteralEncodedArray.
   663     "read my contents from a aLiteralEncodedArray.
   664      Must match to what is generated in #literalArrayEncoding"
   664      Must match to what is generated in #literalArrayEncoding"
   665 
   665 
   666     family := encoding at:2.
   666     family := literalEncoding at:2.
   667     face   := encoding at:3.
   667     face   := literalEncoding at:3.
   668     style  := encoding at:4.
   668     style  := literalEncoding at:4.
   669     size   := encoding at:5.
   669     size   := literalEncoding at:5.
       
   670     literalEncoding size > 5 ifTrue:[
       
   671         encoding := literalEncoding at:6
       
   672     ].
   670 !
   673 !
   671 
   674 
   672 literalArrayEncoding
   675 literalArrayEncoding
   673     "return myself encoded as a literal array.
   676     "return myself encoded as a literal array.
   674      Must match to what is expected in #fromLiteralArrayEncoding:"
   677      Must match to what is expected in #fromLiteralArrayEncoding:"
   677         with:self class name asSymbol
   680         with:self class name asSymbol
   678         with:family
   681         with:family
   679         with:face
   682         with:face
   680         with:style
   683         with:style
   681         with:size
   684         with:size
       
   685         with:encoding
   682 !
   686 !
   683 
   687 
   684 on:aDevice
   688 on:aDevice
   685     "given the receiver, return a device Font"
   689     "given the receiver, return a device Font"
   686 
   690 
  1128 ! !
  1132 ! !
  1129 
  1133 
  1130 !FontDescription class methodsFor:'documentation'!
  1134 !FontDescription class methodsFor:'documentation'!
  1131 
  1135 
  1132 version
  1136 version
  1133     ^ '$Header: /cvs/stx/stx/libview/FontDescription.st,v 1.56 2004-04-06 20:18:53 stefan Exp $'
  1137     ^ '$Header: /cvs/stx/stx/libview/FontDescription.st,v 1.57 2004-10-01 11:21:08 cg Exp $'
  1134 ! !
  1138 ! !
  1135 
  1139 
  1136 FontDescription initialize!
  1140 FontDescription initialize!