Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: OPENFONT.H
Link against: fntstr.lib

Class TOpenFontMetrics

class TOpenFontMetrics;

Description

Font metrics.

Members

Defined in TOpenFontMetrics:
Ascent(), Descent(), MaxDepth(), MaxHeight(), MaxWidth(), SetAscent(), SetDescent(), SetMaxDepth(), SetMaxHeight(), SetMaxWidth(), SetSize(), Size(), TOpenFontMetrics(), TOpenFontMetrics()


Construction and destruction


TOpenFontMetrics()

inline TOpenFontMetrics();

Description

Default C++ constructor.

This creates then zero fills the object.


TOpenFontMetrics()

IMPORT_C TOpenFontMetrics(const CFont *aFont);

Description

C++ constructor with a CFont parameter.

This creates a TOpenFontMetrics and initialises it with size, ascent, maximum height, descent, maximum depth and maximum character width information from the CFont that was passed as a parameter.

Parameters

const CFont *aFont

The font from which to initialise the metrics object.

[Top]


Member functions


Size()

inline TInt Size() const;

Description

Gets the font's size.

Return value

TInt

The font's size.

See also:


Ascent()

inline TInt Ascent() const;

Description

Gets the font's ascent.

This is the ascent for the Latin character which is highest above the baseline.

Return value

TInt

The font's ascent, in pixels.

See also:


Descent()

inline TInt Descent() const;

Description

Gets the font's descent.

This is the descent for the Latin character in the font which falls furthest below the baseline.

Return value

TInt

The font's descent, in pixels.

See also:


MaxHeight()

inline TInt MaxHeight() const;

Description

Sets the font's maximum height.

Note that if this object was initialised from the CFont this will be the same as the ascent.

This is the ascent for the character which is highest above the baseline. In many fonts this will be the height of an accented character like Â, including the accent.

Return value

TInt

The maximum height of the font, in pixels.

See also:


MaxDepth()

inline TInt MaxDepth() const;

Description

Gets the font's maximum depth.

Note: If this object was initialised from the CFont this will be the same as the descent.

This is the descent for the character in the font which falls furthest below the baseline.

Return value

TInt

The font's maximum depth.

See also:


MaxWidth()

inline TInt MaxWidth() const;

Description

Gets the maximum character width, in pixels.

Return value

TInt

The maximum character width, in pixels.

See also:


SetSize()

inline void SetSize(TInt aSize);

Description

Sets the font's size.

Parameters

TInt aSize

The font's size.

See also:


SetAscent()

inline void SetAscent(TInt aAscent);

Description

Sets the ascent.

Parameters

TInt aAscent

The ascent, in pixels.

See also:


SetDescent()

inline void SetDescent(TInt aDescent);

Description

Sets the descent.

Parameters

TInt aDescent

The descent, in pixels.

See also:


SetMaxHeight()

inline void SetMaxHeight(TInt aMaxHeight);

Description

Sets the font's maximum height.

Parameters

TInt aMaxHeight

The font's maximum height, in pixels.

See also:


SetMaxDepth()

inline void SetMaxDepth(TInt aMaxDepth);

Description

Sets the font's maximum depth.

Parameters

TInt aMaxDepth

The font's maximum depth, in pixels.

See also:


SetMaxWidth()

inline void SetMaxWidth(TInt aMaxWidth);

Description

Sets the maximum character width, in pixels.

Parameters

TInt aMaxWidth

The maximum character width, in pixels.

See also: