Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

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

Class TFontSpec

class TFontSpec;

Description

Specifies the font specification in device independent terms.

Members

Defined in TFontSpec:


Construction and destruction


TFontSpec()

IMPORT_C TFontSpec();

Description

Default constructor.

The object's font style is set to the default: EPostureUpright, EStrokeWeightNormal, and EPrintPosNormal.


TFontSpec(const TDesC &,TInt)

IMPORT_C TFontSpec(const TDesC &aTypefaceName, TInt aHeight);

Description

Constructs a TFontSpec object with the specified typeface and height.

The object's font style is set to the default: EPostureUpright, EStrokeWeightNormal, and EPrintPosNormal.

Parameters

const TDesC16 &aTypefaceName

The name of the typeface (e.g. "Roman").

TInt aHeight

The height of the typeface, in twips.

[Top]


Member functions


operator==(const TFontSpec &)const

IMPORT_C TBool operator==(const TFontSpec &aFontSpec) const;

Description

Compares this font specification with another.

Parameters

const TFontSpec &aFontSpec

The font specification to be compared with this one.

Return value

TBool

ETrue, if the TFontSpecs are identical, EFalse otherwise.


InternalizeL(RReadStream &)

IMPORT_C void InternalizeL(RReadStream &aStream);

Description

Internalises a font specification 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

The stream from which the font specification is to be internalised.

Leave codes

KErrNoMemory

If internalisation causes an out of memory error.


ExternalizeL(RWriteStream &)const

IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Externalises the font specification 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 font specification is to be externalised

Leave codes

KErrNoMemory

If the write action causes the stream's resources to be exhausted.


SetScriptTypeForMetrics(TLanguage)

IMPORT_C void SetScriptTypeForMetrics(TLanguage aLanguage);

Description

Specifies the script with which font metrics calculation will be based on.

Parameters

TLanguage aLanguage

The language used to derive the required script.

[Top]


Member data


iTypeface

TTypeface iTypeface;

Description

The typeface.


iHeight

TInt iHeight;

Description

The height of the typeface (in twips).


iFontStyle

TFontStyle iFontStyle;

Description

The font style of the typeface.