FontDescr.st
author claus
Mon, 06 Feb 1995 01:38:04 +0100
changeset 89 ea2bf46eb669
parent 52 edf02eb2939c
child 109 ba47d9d6bda8
permissions -rw-r--r--
*** empty log message ***

"
 COPYRIGHT (c) 1994 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

Object subclass:#FontDescription
       instanceVariableNames:'family face style size encoding'
       classVariableNames:''
       poolDictionaries:''
       category:'Graphics-Support'
!

FontDescription comment:'
COPYRIGHT (c) 1994 by Claus Gittinger
	      All Rights Reserved

$Header: /cvs/stx/stx/libview/Attic/FontDescr.st,v 1.2 1995-02-06 00:36:20 claus Exp $
'!

!FontDescription class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1994 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

version
"
$Header: /cvs/stx/stx/libview/Attic/FontDescr.st,v 1.2 1995-02-06 00:36:20 claus Exp $
"
!

documentation
"
    FontDescription is just a place-holder for scanned font names.

    Instance variables:

    family          <String>        the fonts family ('courier', 'helvetica' etc)
    face            <String>        the fonts face ('bold', 'medium' etc)
    style           <String>        the fonts style ('roman', 'italic', 'oblique')
    size            <String>        the fonts size (not in pixels) 
    encoding        <Symbol>        the fonts encoding (usually #iso8859)
"
! !

!FontDescription class methodsFor:'instance creation'!

family:familyString face:faceString style:styleString size:sizeNum encoding:encodingSym
    ^ self new
	  family:familyString face:faceString style:styleString size:sizeNum encoding:encodingSym
! !

!FontDescription methodsFor:'accessing'!

family:familyString face:faceString style:styleString size:sizeNum encoding:encodingString
    family := familyString asSymbol.
    faceString notNil ifTrue:[
	face := faceString asSymbol.
    ].
    styleString notNil ifTrue:[
	style := styleString asSymbol.
    ].
    size := sizeNum.
    encodingString notNil ifTrue:[
	encoding := encodingString asSymbol.
    ]
!

family
    "return the family, a string"

    ^ family
!

face
    "return the face, a string"

    ^ face
!

style
    "return the style, a string"

    ^ style
!

size
    "return the size, a number"

    ^ size
!

encoding
    "return the encoding, a symbol such as #iso8859"

    ^ encoding
! !