Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
TFontSpec Class Reference

Specifies the font specification in device independent terms. More...

#include <gdi.h>

Public Member Functions

IMPORT_C TFontSpec ()
 Default constructor.
 
IMPORT_C TFontSpec (const TDesC &aTypefaceName, TInt aHeight)
 Constructs a TFontSpec object with the specified typeface and height.
 
IMPORT_C TBool operator== (const TFontSpec &aFontSpec) const
 Compares this font specification with another.
 
IMPORT_C void InternalizeL (RReadStream &aStream)
 Internalises a font specification from a read stream.
 
IMPORT_C void ExternalizeL (RWriteStream &aStream) const
 Externalises the font specification to a write stream.
 
IMPORT_C void SetScriptTypeForMetrics (TLanguage aLanguage)
 Specifies the script with which font metrics calculation will be based on.
 
IMPORT_C TInt ScriptTypeForMetrics () const
 Returns the script with which font metrics calculation will be based on.
 

Public Attributes

TTypeface iTypeface
 The typeface.
 
TInt iHeight
 The height of the typeface (in twips).
 
TFontStyle iFontStyle
 The font style of the typeface.
 

Detailed Description

Specifies the font specification in device independent terms.

API status
Published to all clients. Released API.

Definition at line 774 of file gdi.h.

Constructor & Destructor Documentation

◆ TFontSpec() [1/2]

IMPORT_C TFontSpec::TFontSpec ( )

Default constructor.

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

(generated from Symbian Developer Library)

◆ TFontSpec() [2/2]

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

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
aTypefaceNameThe name of the typeface (e.g. "Roman"). It should be no longer than KMaxTypefaceNameLength characters in length.
aHeightThe height of the typeface, in twips.

Panic condition: GDI 6, if aTypefaceName is more than KMaxTypefaceNameLength characters long.

(generated from Symbian Developer Library)

Member Function Documentation

◆ ExternalizeL()

IMPORT_C void TFontSpec::ExternalizeL ( RWriteStream &  aStream) const

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

Leave condition: KErrNoMemory If the write action causes the stream's resources to be exhausted.

(generated from Symbian Developer Library)

◆ InternalizeL()

IMPORT_C void TFontSpec::InternalizeL ( RReadStream &  aStream)

Internalises a font specification 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
aStreamThe stream from which the font specification is to be internalised.

Leave condition: KErrNoMemory If internalisation causes an out of memory error.

(generated from Symbian Developer Library)

◆ operator==()

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

Compares this font specification with another.

Parameters
aFontSpecThe font specification to be compared with this one.

(generated from Symbian Developer Library)

◆ ScriptTypeForMetrics()

IMPORT_C TInt TFontSpec::ScriptTypeForMetrics ( ) const

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

(generated from Symbian Developer Library)

◆ SetScriptTypeForMetrics()

IMPORT_C void TFontSpec::SetScriptTypeForMetrics ( TLanguage  aLanguage)

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

Parameters
aLanguageThe language used to derive the required script.

(generated from Symbian Developer Library)

Member Data Documentation

◆ iFontStyle

TFontStyle TFontSpec::iFontStyle

The font style of the typeface.

Definition at line 790 of file gdi.h.

◆ iHeight

TInt TFontSpec::iHeight

The height of the typeface (in twips).

Definition at line 788 of file gdi.h.

◆ iTypeface

TTypeface TFontSpec::iTypeface

The typeface.

Definition at line 786 of file gdi.h.


The documentation for this class was generated from the following files: