TOpenFontMetrics Class Reference

#include <openfont.h>

Link against: fntstr.lib

class TOpenFontMetrics

Detailed Description

Font metrics.

See also: CFbsFont::GetFontMetrics()

Constructor & Destructor Documentation

TOpenFontMetrics ( )

TOpenFontMetrics()[inline]

Default C++ constructor.

This creates then zero fills the object.

TOpenFontMetrics ( const CFont * )

IMPORT_CTOpenFontMetrics(const CFont *aFont)

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.

ParameterDescription
aFontThe font from which to initialise the metrics object.

Member Function Documentation

Ascent ( )

TInt Ascent()const [inline]

Gets the font's ascent.

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

See also: SetAscent()

Returns: The font's ascent, in pixels.

BaselineCorrection ( )

IMPORT_C TIntBaselineCorrection()

Gets the baseline correction applied to this font; this value is used to offset the underlinke and strikethrough positions and is used by linked fonts only.

Returns: The baseline correction associated with this font

Descent ( )

TInt Descent()const [inline]

Gets the font's descent.

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

See also: SetDescent()

Returns: The font's descent, in pixels.

MaxDepth ( )

TInt MaxDepth()const [inline]

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.

See also: SetMaxDepth()

Returns: The font's maximum depth.

MaxHeight ( )

TInt MaxHeight()const [inline]

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.

See also: SetMaxDepth()

Returns: The maximum height of the font, in pixels.

MaxWidth ( )

TInt MaxWidth()const [inline]

Gets the maximum character width, in pixels.

See also: SetMaxWidth()

Returns: The maximum character width, in pixels.

SetAscent ( TInt )

voidSetAscent(TIntaAscent)[inline]

Sets the ascent.

See also: Ascent()

ParameterDescription
aAscentThe ascent, in pixels.

SetBaselineCorrection ( TInt )

IMPORT_C voidSetBaselineCorrection(TIntaBaselineCorrection)

WARNING: Function for internal and partner use ONLY. Compatibility is not guaranteed in future releases.

SetDescent ( TInt )

voidSetDescent(TIntaDescent)[inline]

Sets the descent.

See also: Descent()

ParameterDescription
aDescentThe descent, in pixels.

SetMaxDepth ( TInt )

voidSetMaxDepth(TIntaMaxDepth)[inline]

Sets the font's maximum depth.

See also: MaxDepth()

ParameterDescription
aMaxDepthThe font's maximum depth, in pixels.

SetMaxHeight ( TInt )

voidSetMaxHeight(TIntaMaxHeight)[inline]

Sets the font's maximum height.

See also: MaxHeight()

ParameterDescription
aMaxHeightThe font's maximum height, in pixels.

SetMaxWidth ( TInt )

voidSetMaxWidth(TIntaMaxWidth)[inline]

Sets the maximum character width, in pixels.

See also: MaxWidth()

ParameterDescription
aMaxWidthThe maximum character width, in pixels.

SetSize ( TInt )

voidSetSize(TIntaSize)[inline]

Sets the font's size.

See also: Size()

ParameterDescription
aSizeThe font's size.

Size ( )

TInt Size()const [inline]

Gets the font's size.

See also: SetSize()

Returns: The font's size.