Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <GDI.H>
Link against: gdi.lib

Class TTypeface

class TTypeface;

Description

Typeface name and attributes.

This class identifies a typeface by name, and contains the combination of attributes of the typeface. These attributes define whether it is a symbol typeface, whether the typeface is proportional, and whether it is serif or sans-serif.

The combination of attributes for a typeface are stored in a bitmask, with the various bits indicating different attributes. The bitmask is calculated for any particular attribute combination by ORing the enumerated value for each individual attribute.

Members

Defined in TTypeface:


Construction and destruction


TTypeface()

IMPORT_C TTypeface();

Description

Default C++ constructor.

[Top]


Member functions


operator==(const TTypeface &)const

IMPORT_C TBool operator==(const TTypeface &aTypeface) const;

Description

Compares two typefaces for equality.

Parameters

const TTypeface &aTypeface

The typeface to be compared with.

Return value

TBool

ETrue, if this TTypeface is equal to aTypeface, otherwise EFalse.


InternalizeL(RReadStream &)

IMPORT_C void InternalizeL(RReadStream &aStream);

Description

Internalises a typeface from a read stream.

The presence of this function means that the standard templated operator>>(RReadStream &,T &) (defined in s32strm.h) is available to internalise objects of this class.

Parameters

RReadStream &aStream

Stream from which the typeface is to be internalised.


ExternalizeL(RWriteStream &)const

IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Externalises a typeface to a write stream.

The presence of this function means that the standard templated operator<<(RWriteStream &,const T &) (defined in s32strm.h) is available to externalise objects of this class.

Parameters

RWriteStream &aStream

The stream to which the typeface is to be externalised.


SetAttributes(TInt)

IMPORT_C void SetAttributes(TInt aAttributes);

Description

Set the combination of attributes for this typeface.

Parameters

TInt aAttributes

A bitmap defining the combination of attributes.


SetIsProportional(TBool)

IMPORT_C void SetIsProportional(TBool aIsProportional);

Description

Sets the typeface's proportional attribute.

Parameters

TBool aIsProportional

ETrue if the typeface is a proportional typeface, otherwise EFalse.


SetIsSerif(TBool)

IMPORT_C void SetIsSerif(TBool aIsSerif);

Description

Sets the typeface's serif attribute.

Parameters

TBool aIsSerif

ETrue if the typeface is a serif typeface, otherwise EFalse.


SetIsSymbol(TBool)

IMPORT_C void SetIsSymbol(TBool aIsSymbol);

Description

Sets the typeface's symbol attribute.

Parameters

TBool aIsSymbol

ETrue if the typeface is a symbol typeface, otherwise EFalse.


Attributes()const

IMPORT_C TInt Attributes() const;

Description

Gets the combination of attributes of the typeface.

Return value

TInt

The combination of attributes of the typeface.


IsProportional()const

IMPORT_C TBool IsProportional() const;

Description

Gets the typeface's proportional attribute.

Return value

TBool

ETrue if the typeface is proportional, EFalse otherwise.


IsSerif()const

IMPORT_C TBool IsSerif() const;

Description

Gets the typeface's serif attribute.

Return value

TBool

ETrue if the typeface is a serif typeface, EFalse otherwise


IsSymbol()const

IMPORT_C TBool IsSymbol() const;

Description

Gets the typeface's symbol attribute.

Return value

TBool

ETrue if the typeface is a symbol typeface, EFalse otherwise

[Top]


Member enumerations


Enum anonymous

n/a

Description

EProportional

Typeface is a proportional typeface (e.g. Swiss)

ESerif

Typeface is a serif typeface (e.g. Times)

ESymbol

Typeface is a symbol typeface (e.g. Symbol)

[Top]


Member data


iName

TBufC< KMaxTypefaceNameLength > iName;

Description

The typeface name.