Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: openfont.h
Link against: fntstr.lib

Class TOpenFontMetrics

TOpenFontMetrics

Support

Supported from 5.0

Description

Font metrics.

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

See also:


Construction and destruction


TOpenFontMetrics()

TOpenFontMetrics();

Description

Default C++ constructor.

This creates then zero fills the object.


TOpenFontMetrics()

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


Ascent()

TInt Ascent() const;

Description

Gets the font's ascent.

Note:

Return value

TInt

The font's ascent, in pixels.

See also:


Descent()

TInt Descent() const;

Description

Gets the font's descent.

Note:

Return value

TInt

The font's descent, in pixels.

See also:


MaxDepth()

TInt MaxDepth() const;

Description

Gets the font's maximum depth.

Note:

Return value

TInt

The font's maximum depth.

See also:


MaxHeight()

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.

Note:

Return value

TInt

The maximum height of the font, in pixels.

See also:


MaxWidth()

TInt MaxWidth() const;

Description

Gets the maximum character width, in pixels.

Return value

TInt

The maximum character width, in pixels.

See also:


SetAscent()

void SetAscent(TInt aAscent);

Description

Sets the ascent.

Parameters

TInt aAscent

The ascent, in pixels.

See also:


SetDescent()

void SetDescent(TInt aDescent);

Description

Sets the descent.

Parameters

TInt aDescent

The descent, in pixels.

See also:


SetMaxDepth()

void SetMaxDepth(TInt aMaxDepth);

Description

Sets the font's maximum depth.

Parameters

TInt aMaxDepth

The font's maximum depth, in pixels.

See also:


SetMaxHeight()

void SetMaxHeight(TInt aMaxHeight);

Description

Sets the font's maximum height.

Parameters

TInt aMaxHeight

The font's maximum height, in pixels.

See also:


SetMaxWidth()

void SetMaxWidth(TInt aMaxWidth);

Description

Sets the maximum character width, in pixels.

Parameters

TInt aMaxWidth

The maximum character width, in pixels.

See also:


SetSize()

void SetSize(TInt aSize);

Description

Sets the font's size.

Parameters

TInt aSize

The font's size.

See also:


Size()

TInt Size() const;

Description

Gets the font's size.

Return value

TInt

The font's size.

See also: