Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: gdi.h
Link against: N/A

Class TTypeface

TTypeface

Support

Supported from 5.0

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

Defined in TTypeface:
Anonymous, Attributes(), EProportional, ESerif, ESymbol, ExternalizeL(), InternalizeL(), IsProportional(), IsSerif(), IsSymbol(), SetAttributes(), SetIsProportional(), SetIsSerif(), SetIsSymbol(), TTypeface(), iName, operator==()

See also:


Construction and destruction


TTypeface()

TTypeface();

Description

Default C++ constructor.

[Top]


Comparison


operator==()

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

Description

Compares 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.

[Top]


Streaming


ExternalizeL()

void ExternalizeL(RWriteStream& aStream) const;

Description

Externalises a typeface to a write stream.

The presence of this function means that the standard templated operator<<() (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.

Leave codes

 

This function may leave, if the write action causes the stream's resources to be exhausted.


InternalizeL()

void InternalizeL(RReadStream& aStream);

Description

Internalises a typeface from a read stream.

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

Parameters

RReadStream& aStream

Stream from which the typeface is to be internalised.

Leave codes

KErrNoMemory

If internalisation causes an out of memory error.

 

If there is a problem reading from the stream.

[Top]


Setting the typeface attributes


SetIsProportional()

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()

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()

void SetIsSymbol(TBool aIsSymbol);

Description

Sets the typeface's symbol attribute.

Parameters

TBool aIsSymbol

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

[Top]


Getting the typeface attributes


IsProportional()

TBool IsProportional() const;

Description

Gets the typeface's proportional attribute.

Return value

TBool

ETrue if the typeface is proportional, EFalse otherwise.


IsSerif()

TBool IsSerif() const;

Description

Gets the typeface's serif attribute.

Return value

TBool

ETrue if the typeface is a serif typeface, EFalse otherwise


IsSymbol()

TBool IsSymbol() const;

Description

Gets the typeface's symbol attribute.

Return value

TBool

ETrue if the typeface is a symbol typeface, EFalse otherwise

[Top]


Setting and getting attribute combinations


SetAttributes()

void SetAttributes(TInt aMask);

Description

Set the combination of attributes for this typeface.

Parameters

TInt aMask

A bitmap defining the combination of attributes.

See also:


Attributes()

TInt Attributes() const;

Description

Gets the combination of attributes of the typeface.

Return value

TInt

The combination of attributes of the typeface.

See also:

[Top]


Enumeration


Enum Anonymous

Anonymous

Description

Typeface attribute flags.

EProportional

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

ESerif

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

ESymbol

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

[Top]


Public data members


iName

TBufC<KMaxTypefaceNameLength> iName

Description

Typeface name.